diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2021-02-08 06:41:48 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2021-02-15 02:17:24 +0300 |
commit | 94aec6c9c1b6b1131c1a39a0abcee49fb29a0e50 (patch) | |
tree | cfe0f9a77fc65f7736098a720fcda062ae393c88 /internal/testhelpers | |
parent | 871e535e1e4be37eb014247d7412002ab9ae304e (diff) |
Add TestVFSReconfigureTransport
Diffstat (limited to 'internal/testhelpers')
-rw-r--r-- | internal/testhelpers/testhelpers.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/internal/testhelpers/testhelpers.go b/internal/testhelpers/testhelpers.go index f731166b..3ec97a79 100644 --- a/internal/testhelpers/testhelpers.go +++ b/internal/testhelpers/testhelpers.go @@ -63,8 +63,17 @@ func AssertLogContains(t *testing.T, wantLogEntry string, entries []*logrus.Entr func ToFileProtocol(t *testing.T, path string) string { t.Helper() + wd := Getwd(t) + + return fmt.Sprintf("file://%s/%s", wd, path) +} + +// Getwd must return current working directory +func Getwd(t *testing.T) string { + t.Helper() + wd, err := os.Getwd() require.NoError(t, err) - return fmt.Sprintf("file://%s/%s", wd, path) + return wd } |