Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
  • Loading branch information
johzchen committed Mar 3, 2021
1 parent 25ea754 commit 6a13c92
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions api/test/e2e/label_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 6a13c92

Please sign in to comment.