Skip to content

Commit e50c2e0

Browse files
committed
fix test config dir
1 parent 10d2421 commit e50c2e0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/integration_testing/assume_e2e_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ func TestAssumeCommandE2E(t *testing.T) {
5959
tempDir := t.TempDir()
6060
homeDir := filepath.Join(tempDir, "home")
6161
awsDir := filepath.Join(homeDir, ".aws")
62-
grantedDir := filepath.Join(homeDir, ".granted")
62+
// Use XDG_CONFIG_HOME to set custom config directory
63+
xdgConfigHome := filepath.Join(tempDir, "config")
64+
grantedDir := filepath.Join(xdgConfigHome, "granted")
6365

6466
for _, dir := range []string{awsDir, grantedDir} {
6567
err := os.MkdirAll(dir, 0755)
@@ -94,7 +96,7 @@ FileBackend = ""
9496
env := []string{
9597
fmt.Sprintf("HOME=%s", homeDir),
9698
fmt.Sprintf("AWS_CONFIG_FILE=%s", awsConfigPath),
97-
fmt.Sprintf("GRANTED_STATE_DIR=%s", grantedDir),
99+
fmt.Sprintf("XDG_CONFIG_HOME=%s", xdgConfigHome),
98100
"GRANTED_QUIET=true", // Suppress output messages
99101
"FORCE_NO_ALIAS=true", // Skip alias configuration
100102
"FORCE_ASSUME_CLI=true", // Force assume mode

0 commit comments

Comments
 (0)