From 6455efa5d327377b41e708a063d1b7a71a131165 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 17 Dec 2019 10:11:45 -0700 Subject: admin: POST /... expands and appends all array elements Makes it easy to append many items to an array in one command --- admin_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'admin_test.go') diff --git a/admin_test.go b/admin_test.go index e8563b7..cfb4ab7 100644 --- a/admin_test.go +++ b/admin_test.go @@ -77,6 +77,12 @@ func TestUnsyncedConfigAccess(t *testing.T) { payload: `"d"`, expect: `{"foo": "jet", "bar": {"aa": "bb"}, "list": ["a", "b", "c", "d"]}`, }, + { + method: "POST", + path: "/list/...", + payload: `["e", "f", "g"]`, + expect: `{"foo": "jet", "bar": {"aa": "bb"}, "list": ["a", "b", "c", "d", "e", "f", "g"]}`, + }, } { err := unsyncedConfigAccess(tc.method, rawConfigKey+tc.path, []byte(tc.payload), nil) -- cgit v1.2.3