Skip to content

Commit 2ee8f02

Browse files
committed
fix test on Windows
1 parent 2525975 commit 2ee8f02

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

cli/azd/pkg/infra/provisioning/provider_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ func TestOptions_GetWithDefaults(t *testing.T) {
264264
}
265265

266266
func TestOptions_AbsolutePath(t *testing.T) {
267-
projectPath := filepath.Join(string(filepath.Separator), "tmp", "project")
267+
rootPath := t.TempDir()
268+
projectPath := filepath.Join(rootPath, "project")
269+
absoluteLayerPath := filepath.Join(rootPath, "shared", "infra")
268270

269271
tests := []struct {
270272
name string
@@ -281,9 +283,9 @@ func TestOptions_AbsolutePath(t *testing.T) {
281283
{
282284
name: "keeps absolute path",
283285
options: Options{
284-
Path: filepath.Join(string(filepath.Separator), "shared", "infra"),
286+
Path: absoluteLayerPath,
285287
},
286-
expected: filepath.Join(string(filepath.Separator), "shared", "infra"),
288+
expected: absoluteLayerPath,
287289
},
288290
}
289291

0 commit comments

Comments
 (0)