File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ func TestWriteSingleConfigKeyStringNonExistingFile_CreatingTheFileAndWritesTheKe
130130 asserts .NotNil (t , file )
131131}
132132
133- func TestChangedOnlyScsScanOverviewPathInConfigFile_ConfigFileExistsWithDefaultValues_OnlyAscaPortChangedSuccess (t * testing.T ) {
133+ func TestChangedOnlyScsScanOverviewPathInConfigFile_ConfigFileExistsWithDefaultValues_OnlyScsScanOverviewPathChangedSuccess (t * testing.T ) {
134134 configuration .LoadConfiguration ()
135135 configFilePath , _ := configuration .GetConfigFilePath ()
136136
@@ -146,7 +146,7 @@ func TestChangedOnlyScsScanOverviewPathInConfigFile_ConfigFileExistsWithDefaultV
146146
147147 // Assert all the other properties are the same
148148 for key , value := range oldConfig {
149- if key != cxAscaPort {
149+ if key != cxScsScanOverviewPath {
150150 asserts .Equal (t , value , config [key ])
151151 }
152152 }
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ type ScanOverviewHTTPWrapper struct {
1919}
2020
2121func NewHTTPScanOverviewWrapper (path string ) ScanOverviewWrapper {
22- validPath := configurePath (path )
22+ validPath := setDefaultPath (path )
2323 return & ScanOverviewHTTPWrapper {
2424 path : validPath ,
2525 }
@@ -64,10 +64,9 @@ func (r *ScanOverviewHTTPWrapper) GetSCSOverviewByScanID(scanID string) (
6464 }
6565}
6666
67- // configurePath checks if the path is the default path, if not it writes the default path to the config file
68- func configurePath (path string ) string {
67+ // setDefaultPath checks if the path is the default path, if not it writes the default path to the config file
68+ func setDefaultPath (path string ) string {
6969 if path != defaultPath {
70- viper .Set (commonParams .ScsScanOverviewPathKey , defaultPath )
7170 configFilePath , err := configuration .GetConfigFilePath ()
7271 if err != nil {
7372 logger .PrintfIfVerbose ("Error getting config file path: %v" , err )
You can’t perform that action at this time.
0 commit comments