Skip to content

Commit 0ade878

Browse files
fix(sscs-env-var): fix typos
1 parent 2f1bbbc commit 0ade878

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

internal/commands/util/configuration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

internal/wrappers/scan-overview-http.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type ScanOverviewHTTPWrapper struct {
1919
}
2020

2121
func 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)

0 commit comments

Comments
 (0)