diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2019-01-23 21:05:05 +0300 |
---|---|---|
committer | John Cai <jcai@gitlab.com> | 2019-01-23 21:05:05 +0300 |
commit | a59c5d19745c207addcf59d1d6956eca1937648f (patch) | |
tree | e46d5bf8ffdf0378c9399c3b7b2630f3b01e8e13 /client | |
parent | 9bbd87b1e13b8f37fc24db6644a0c146e4711a45 (diff) |
Fix tests that used long unix socket paths
Diffstat (limited to 'client')
-rw-r--r-- | client/dial_test.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/client/dial_test.go b/client/dial_test.go index a7edd5598..9c3e392a8 100644 --- a/client/dial_test.go +++ b/client/dial_test.go @@ -6,7 +6,6 @@ import ( "fmt" "net" "os" - "path/filepath" "strings" "testing" @@ -41,12 +40,11 @@ func TestDial(t *testing.T) { require.NoError(t, err, "start listeners: %v. %s", err) defer stop() - wd, err := os.Getwd() - require.NoError(t, err, "getwd: %v. %s", err) - unixSocketAbsPath := connectionMap["unix"] - unixSocketRelPath, err := filepath.Rel(wd, unixSocketAbsPath) - require.NoError(t, err, "relative path failure: %v. %s", err) + + unixSocketRelPath := "testdata/gitaly.socket" + require.NoError(t, os.RemoveAll(unixSocketRelPath)) + require.NoError(t, os.Symlink(unixSocketAbsPath, unixSocketRelPath)) tests := []struct { name string |