From 94aec6c9c1b6b1131c1a39a0abcee49fb29a0e50 Mon Sep 17 00:00:00 2001 From: Jaime Martinez Date: Mon, 8 Feb 2021 14:41:48 +1100 Subject: Add TestVFSReconfigureTransport --- internal/testhelpers/testhelpers.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'internal/testhelpers') 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 } -- cgit v1.2.3