liuxiran commented on a change in pull request #2345:
URL: https://github.com/apache/apisix/pull/2345#discussion_r502122002



##########
File path: t/admin/consumers.t
##########
@@ -223,3 +223,78 @@ GET /t
 {"error_msg":"missing consumer name"}
 --- no_error_log
 [error]
+
+
+
+=== TEST 7: add consumer with labels
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/consumers',
+                ngx.HTTP_PUT,
+                [[{
+                     "username":"jack",
+                     "desc": "new consumer",
+                     "labels": {
+                         "build":"16",
+                         "env":"production",
+                         "version":"v2"
+                     }
+                }]],
+                [[{
+                    "node": {
+                        "value": {
+                            "username": "jack",
+                            "desc": "new consumer",
+                            "labels": {

Review comment:
       node does not support `labels`, so here may need to remove `labels`?

##########
File path: apisix/schema_def.lua
##########
@@ -555,6 +580,14 @@ _M.ssl = {
             type = "integer",
             minimum = 1588262400,  -- 2020/5/1 0:0:0
         },
+        labels = {

Review comment:
       > we could use label to distinguish among dozens of SSLs according to 
their usage
   
   agree +1




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to