Skip to content

Commit 2cc0558

Browse files
committed
[config] minor fixes
1 parent 2057b1c commit 2cc0558

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ var ErrMissingAWSCreds = errors.New("AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, A
2020
// Load reads configuration from various sources and unmarshals it into a given struct.
2121
//
2222
// It looks for configuration in the following order (later overrides earlier):
23-
// 1. S3, if `withS3` is provided.
24-
// 2. Local file, if `withYaml` is provided.
23+
// 1. S3, if `WithS3YAML` is provided.
24+
// 2. Local file, if `WithLocalYAML` is provided.
2525
// 3. `.env` file in the current working directory.
2626
// 4. Environment variables.
2727
//

config/config_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ feature_flags:
9292
// TestLoadWithS3OptionAndMissingCredentials tests loading configuration with S3 option and missing credentials
9393
func TestLoadWithS3OptionAndMissingCredentials(t *testing.T) {
9494
// Ensure AWS credentials are not set
95-
os.Unsetenv("AWS_ACCESS_KEY_ID")
96-
os.Unsetenv("AWS_SECRET_ACCESS_KEY")
97-
os.Unsetenv("AWS_REGION")
95+
t.Setenv("AWS_ACCESS_KEY_ID", "")
96+
t.Setenv("AWS_SECRET_ACCESS_KEY", "")
97+
t.Setenv("AWS_REGION", "")
9898

9999
var cfg TestConfig
100100
err := config.Load(&cfg, config.WithS3YAML("test-bucket", "test-key"))

0 commit comments

Comments
 (0)