diff --git a/go/logic/test_utils.go b/go/logic/test_utils.go index f552cfc76..cdcfcee84 100644 --- a/go/logic/test_utils.go +++ b/go/logic/test_utils.go @@ -4,8 +4,8 @@ import ( "context" "fmt" + "os" "path/filepath" - "runtime" "github.com/github/gh-ost/go/base" "github.com/github/gh-ost/go/mysql" @@ -68,9 +68,7 @@ func newTestMigrationContext() *base.MigrationContext { migrationContext.PanicOnWarnings = true migrationContext.AllowedRunningOnMaster = true - //nolint:dogsled - _, filename, _, _ := runtime.Caller(0) - migrationContext.ServeSocketFile = filepath.Join(filepath.Dir(filename), "../../tmp/gh-ost.sock") + migrationContext.ServeSocketFile = filepath.Join(os.TempDir(), "gh-ost.sock") return migrationContext }