mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-28 19:03:24 +01:00
add test for nested context
This commit is contained in:
parent
9af8a02f05
commit
f36d99ef07
@ -31,6 +31,8 @@ var validContextRootTests = []struct {
|
|||||||
{"Multiple slashes at start", "//status", "/status/"},
|
{"Multiple slashes at start", "//status", "/status/"},
|
||||||
{"Mutliple slashes at start and end", "///status////", "/status/"},
|
{"Mutliple slashes at start and end", "///status////", "/status/"},
|
||||||
{"Contains '@' in path'", "me@/status/gatus", "/me@/status/gatus/"},
|
{"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) {
|
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
|
// invalidContextRootTests contains all tests for context root which are
|
||||||
// expected to
|
// expected to fail and stop program execution
|
||||||
var invalidContextRootTests = []struct {
|
var invalidContextRootTests = []struct {
|
||||||
name string
|
name string
|
||||||
path string
|
path string
|
||||||
|
Loading…
Reference in New Issue
Block a user