From f36d99ef077adf0c98511e2f0d763cf0ace1cc62 Mon Sep 17 00:00:00 2001 From: Michael Engelhardt Date: Sat, 21 Nov 2020 22:41:55 +0100 Subject: [PATCH] add test for nested context --- config/web_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/web_test.go b/config/web_test.go index 7d0df8b8..d9d22be5 100644 --- a/config/web_test.go +++ b/config/web_test.go @@ -31,6 +31,8 @@ var validContextRootTests = []struct { {"Multiple slashes at start", "//status", "/status/"}, {"Mutliple slashes at start and end", "///status////", "/status/"}, {"Contains '@' in path'", "me@/status/gatus", "/me@/status/gatus/"}, + {"nested context with trailing slash", "/status/gatus/", "/status/gatus/"}, + {"nested context without trailing slash", "/status/gatus/system", "/status/gatus/system/"}, } func TestWebConfig_ValidContextRoots(t *testing.T) { @@ -42,7 +44,7 @@ func TestWebConfig_ValidContextRoots(t *testing.T) { } // invalidContextRootTests contains all tests for context root which are -// expected to +// expected to fail and stop program execution var invalidContextRootTests = []struct { name string path string