diff --git a/tests/integration/framework/binary/binary.go b/tests/integration/framework/binary/binary.go index 7f8c99110cf..e1626f7fc2c 100644 --- a/tests/integration/framework/binary/binary.go +++ b/tests/integration/framework/binary/binary.go @@ -60,7 +60,13 @@ func Build(t *testing.T, name string) { // Use a consistent temp dir for the binary so that the binary is cached on // subsequent runs. - binPath := filepath.Join(os.TempDir(), "dapr_integration_tests/"+name) + var tmpdir string + if runtime.GOOS == "darwin" { + tmpdir = "/tmp" + } else { + tmpdir = os.TempDir() + } + binPath := filepath.Join(tmpdir, "dapr_integration_tests/"+name) if runtime.GOOS == "windows" { binPath += ".exe" }