Skip to content

Commit 2b30fe5

Browse files
authored
fix: fix flaky TestCreateSignedSTSIdentityRequest (#53265)
This commit prevents the test from loading an AWS config file that may set a region that conflicts with the test cases.
1 parent ef1f254 commit 2b30fe5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: lib/auth/join/iam/iam_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ func TestCreateSignedSTSIdentityRequest(t *testing.T) {
3838
t.Setenv("AWS_SECRET_ACCESS_KEY", "FAKE_KEY")
3939
t.Setenv("AWS_SESSION_TOKEN", "FAKE_SESSION_TOKEN")
4040

41+
// If the user has an AWS config file that sets a region, it conflicts with
42+
// the test cases. Disable loading a config file by setting a nonexistent path.
43+
t.Setenv("AWS_CONFIG_FILE", "fake-file-this-must-not-exist")
44+
4145
const challenge = "asdf12345"
4246

4347
for desc, tc := range map[string]struct {

0 commit comments

Comments
 (0)