Skip to content

Commit 14d2a4c

Browse files
spboyerCopilot
andcommitted
Fix Test_parseExecutableFiles CI failure
Replace ostest.Chdir (raw os.Chdir) with t.Chdir in detect_confirm_test.go. The t.Chdir API integrates properly with Go 1.26's testing framework for process-wide cwd changes, preventing subtle test state corruption that caused subsequent tests in the same package to fail on CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 44b0869 commit 14d2a4c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

cli/azd/internal/repository/detect_confirm_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ func Test_detectConfirm_confirm(t *testing.T) {
3535
err = os.MkdirAll(javaDir, 0700)
3636
require.NoError(t, err)
3737

38+
t.Chdir(dir)
39+
3840
tests := []struct {
3941
name string
4042
detection []appdetect.Project

0 commit comments

Comments
 (0)