Skip to content

Commit a198c98

Browse files
committed
fix using local replace for tests
1 parent 45209b7 commit a198c98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

controllers/vmware/test/controllers_suite_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ var _ = AfterSuite(func() {
110110
})
111111

112112
func findModuleDir(module string) string {
113-
cmd := exec.Command("go", "mod", "download", "-json", module)
113+
cmd := exec.Command("go", "list", "-json", "-m", module)
114114
out, err := cmd.Output()
115115
if err != nil {
116-
klog.Fatalf("Failed to run go mod to find module %q directory", module)
116+
klog.Fatalf("Failed to run go list to find module %q directory", module)
117117
}
118118
info := struct{ Dir string }{}
119119
if err := json.Unmarshal(out, &info); err != nil {
120-
klog.Fatalf("Failed to unmarshal output from go mod command: %v", err)
120+
klog.Fatalf("Failed to unmarshal output from go list command: %v", err)
121121
} else if info.Dir == "" {
122122
klog.Fatalf("Failed to find go module %q directory, received %v", module, string(out))
123123
}

0 commit comments

Comments
 (0)