aboutsummaryrefslogtreecommitdiffhomepage
path: root/admin_test.go
diff options
context:
space:
mode:
authorNorman Soetbeer <[email protected]>2023-10-11 22:24:29 +0200
committerGitHub <[email protected]>2023-10-11 20:24:29 +0000
commit0e204b730aa2b1fa0835336b1117eff8c420f713 (patch)
treee1cb44e7d54e347e57ea9c5b3c95dc529b1d1d22 /admin_test.go
parentfae195ac7eb9f4b0e9436384cd0529a11355e367 (diff)
downloadcaddy-0e204b730aa2b1fa0835336b1117eff8c420f713.tar.gz
caddy-0e204b730aa2b1fa0835336b1117eff8c420f713.zip
admin: Respond with 4xx on non-existing config path (#5870)v2.7.5
Co-authored-by: Matt Holt <[email protected]>
Diffstat (limited to 'admin_test.go')
-rw-r--r--admin_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/admin_test.go b/admin_test.go
index 04aa8867f..9137a8881 100644
--- a/admin_test.go
+++ b/admin_test.go
@@ -76,6 +76,12 @@ func TestUnsyncedConfigAccess(t *testing.T) {
expect: `{"foo": "jet", "bar": {"aa": "bb"}, "list": ["a", "b", "c"]}`,
},
{
+ method: "DELETE",
+ path: "/bar/qq",
+ expect: `{"foo": "jet", "bar": {"aa": "bb"}, "list": ["a", "b", "c"]}`,
+ shouldErr: true,
+ },
+ {
method: "POST",
path: "/list",
payload: `"e"`,