Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2021-02-08 06:41:48 +0300
committerJaime Martinez <jmartinez@gitlab.com>2021-02-15 02:17:24 +0300
commit94aec6c9c1b6b1131c1a39a0abcee49fb29a0e50 (patch)
treecfe0f9a77fc65f7736098a720fcda062ae393c88 /internal/testhelpers
parent871e535e1e4be37eb014247d7412002ab9ae304e (diff)
Add TestVFSReconfigureTransport
Diffstat (limited to 'internal/testhelpers')
-rw-r--r--internal/testhelpers/testhelpers.go11
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
}