diff --git a/api/test/e2e/label_test.go b/api/test/e2e/label_test.go index 8f8f9d5e13..5dfbd0ed0e 100644 --- a/api/test/e2e/label_test.go +++ b/api/test/e2e/label_test.go @@ -192,6 +192,37 @@ func TestLabel(t *testing.T) { ExpectStatus: http.StatusOK, ExpectBody: "{\"build\":\"17\"},{\"extra\":\"test\"},{\"version\":\"v2\"}", }, + { + Desc: "update plugin_config", + Object: ManagerApiExpect(t), + Method: http.MethodPut, + Path: "/apisix/admin/plugin_configs/1", + Body: `{ + "plugins": { + "response-rewrite": { + "headers": { + "X-VERSION":"22.0" + } + } + }, + "labels": { + "version": "v3", + "build": "16", + "extra": "test" + } + }`, + Headers: map[string]string{"Authorization": token}, + ExpectStatus: http.StatusOK, + }, + { + Desc: "get plugin_config label again to verify update", + Object: ManagerApiExpect(t), + Method: http.MethodGet, + Headers: map[string]string{"Authorization": token}, + Path: "/apisix/admin/labels/plugin_config", + ExpectStatus: http.StatusOK, + ExpectBody: "{\"build\":\"16\"},{\"extra\":\"test\"},{\"version\":\"v3\"}", + }, { Desc: "get all label", Object: ManagerApiExpect(t),