Skip to content

Commit

Permalink
fix: rename the environment variable according the naming convention (#…
Browse files Browse the repository at this point in the history
…121)

* fix: rename the environment variable according the naming convention

* add a test
  • Loading branch information
afdesk authored Oct 6, 2023
1 parent 4daf80c commit 741a1d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/etc/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type AquaCSP struct {

ScannerCLIOverrideRegistryCredentials bool `env:"SCANNER_CLI_OVERRIDE_REGISTRY_CREDENTIALS" envDefault:"false"`

ReportDelete bool `env:"AQUA_REPORT_DELETE" envDefault:"true"`
ReportDelete bool `env:"SCANNER_AQUA_REPORT_DELETE" envDefault:"true"`
}

type RedisStore struct {
Expand Down
3 changes: 2 additions & 1 deletion pkg/etc/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func TestGetConfig(t *testing.T) {
"SCANNER_CLI_REGISTER_IMAGES": "Compliant",
"SCANNER_CLI_OVERRIDE_REGISTRY_CREDENTIALS": "true",
"SCANNER_REDIS_URL": "redis://localhost:6379",
"SCANNER_AQUA_REPORT_DELETE": "false",
},
expectedConfig: Config{
API: API{
Expand All @@ -105,7 +106,7 @@ func TestGetConfig(t *testing.T) {
ScannerCLIShowNegligible: false,
ScannerCLIRegisterImages: Compliant,
ScannerCLIOverrideRegistryCredentials: true,
ReportDelete: true,
ReportDelete: false,
},
RedisStore: RedisStore{
Namespace: "harbor.scanner.aqua:store",
Expand Down

0 comments on commit 741a1d2

Please sign in to comment.