Skip to content

Commit 980e092

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 44a13b1 commit 980e092

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

cli/azd/internal/repository/detect_confirm_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313

1414
"github.com/azure/azure-dev/cli/azd/internal/appdetect"
1515
"github.com/azure/azure-dev/cli/azd/pkg/input"
16-
"github.com/azure/azure-dev/cli/azd/test/ostest"
1716
"github.com/stretchr/testify/require"
1817
)
1918

@@ -35,7 +34,7 @@ func Test_detectConfirm_confirm(t *testing.T) {
3534
err = os.MkdirAll(javaDir, 0700)
3635
require.NoError(t, err)
3736

38-
ostest.Chdir(t, dir)
37+
t.Chdir(dir)
3938

4039
tests := []struct {
4140
name string

0 commit comments

Comments
 (0)