diff options
Diffstat (limited to 'community/rest-server/0001-Move-TestIsUserPath-to-correct-package.patch')
-rw-r--r-- | community/rest-server/0001-Move-TestIsUserPath-to-correct-package.patch | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/community/rest-server/0001-Move-TestIsUserPath-to-correct-package.patch b/community/rest-server/0001-Move-TestIsUserPath-to-correct-package.patch deleted file mode 100644 index 5c3932f849..0000000000 --- a/community/rest-server/0001-Move-TestIsUserPath-to-correct-package.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 69ed06aa661590ae74e4e839f71f6861d5fb4243 Mon Sep 17 00:00:00 2001 -From: Alexander Neumann <alexander@bumpern.de> -Date: Tue, 20 Mar 2018 20:45:59 +0100 -Subject: [PATCH] Move TestIsUserPath to correct package - ---- - cmd/rest-server/main_test.go | 21 --------------------- - handlers_test.go | 21 +++++++++++++++++++++ - 2 files changed, 21 insertions(+), 21 deletions(-) - -diff --git a/cmd/rest-server/main_test.go b/cmd/rest-server/main_test.go -index 44b06a2..b2a71e1 100644 ---- a/cmd/rest-server/main_test.go -+++ b/cmd/rest-server/main_test.go -@@ -71,24 +71,3 @@ func TestTLSSettings(t *testing.T) { - }) - } - } -- --func TestIsUserPath(t *testing.T) { -- var tests = []struct { -- username string -- path string -- result bool -- }{ -- {"foo", "/", false}, -- {"foo", "/foo", true}, -- {"foo", "/foo/", true}, -- {"foo", "/foo/bar", true}, -- {"foo", "/foobar", false}, -- } -- -- for _, test := range tests { -- result := isUserPath(test.username, test.path) -- if result != test.result { -- t.Errorf("isUserPath(%q, %q) was incorrect, got: %v, want: %v.", test.username, test.path, result, test.result) -- } -- } --} -diff --git a/handlers_test.go b/handlers_test.go -index 6536a26..f6cdbaa 100644 ---- a/handlers_test.go -+++ b/handlers_test.go -@@ -37,3 +37,24 @@ func TestJoin(t *testing.T) { - }) - } - } -+ -+func TestIsUserPath(t *testing.T) { -+ var tests = []struct { -+ username string -+ path string -+ result bool -+ }{ -+ {"foo", "/", false}, -+ {"foo", "/foo", true}, -+ {"foo", "/foo/", true}, -+ {"foo", "/foo/bar", true}, -+ {"foo", "/foobar", false}, -+ } -+ -+ for _, test := range tests { -+ result := isUserPath(test.username, test.path) -+ if result != test.result { -+ t.Errorf("isUserPath(%q, %q) was incorrect, got: %v, want: %v.", test.username, test.path, result, test.result) -+ } -+ } -+} --- -2.18.0 - |