Skip to content

Commit 82c09e2

Browse files
committed
change dir in unit test so Go project is detected
1 parent 7db89b6 commit 82c09e2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/scaffold/crd_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ func TestCRD(t *testing.T) {
4141
AbsProjectPath: filepath.Join(filepath.Dir(filepath.Dir(absPath)), tfDir),
4242
ProjectName: filepath.Base(tfDir),
4343
}
44+
if err := os.Chdir(cfg.AbsProjectPath); err != nil {
45+
t.Fatal(err)
46+
}
4447
err = s.Execute(cfg, &Crd{Resource: r})
4548
if err != nil {
4649
t.Fatalf("failed to execute the scaffold: (%v)", err)

0 commit comments

Comments
 (0)