You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2022/03/15 11:27:51 UTC

[apisix] branch master updated: test: remove unnecessary response body data check (#6545)

This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 01da57f  test: remove unnecessary response body data check (#6545)
01da57f is described below

commit 01da57f8cacc7c5c67defba373c7efb29baf8df8
Author: John Chever <ch...@gmail.com>
AuthorDate: Tue Mar 15 19:27:40 2022 +0800

    test: remove unnecessary response body data check (#6545)
---
 t/core/config_etcd.t                  |  40 +----
 t/core/ctx.t                          |  49 +-----
 t/node/consumer-plugin.t              |  46 +-----
 t/node/ewma.t                         |  16 --
 t/node/route-status.t                 |  22 +--
 t/node/service-empty.t                |  12 +-
 t/plugin/authz-keycloak.t             |  73 --------
 t/plugin/authz-keycloak2.t            | 120 --------------
 t/plugin/aws-lambda.t                 |  22 ---
 t/plugin/azure-functions.t            |  38 +----
 t/plugin/basic-auth.t                 |  19 +--
 t/plugin/clickhouse-logger.t          |  33 ----
 t/plugin/consumer-restriction.t       | 255 ++--------------------------
 t/plugin/custom_hmac_auth.t           |  41 +----
 t/plugin/datadog.t                    |  39 +----
 t/plugin/echo.t                       |  47 ------
 t/plugin/hmac-auth.t                  |  82 ++-------
 t/plugin/hmac-auth3.t                 |  38 +----
 t/plugin/http-logger-log-format.t     |  17 +-
 t/plugin/http-logger.t                | 249 ----------------------------
 t/plugin/jwt-auth.t                   | 128 ++------------
 t/plugin/kafka-logger-log-format.t    |  16 +-
 t/plugin/kafka-logger.t               |  81 ---------
 t/plugin/key-auth.t                   |  29 +---
 t/plugin/ldap-auth.t                  |  17 +-
 t/plugin/limit-conn.t                 |  68 --------
 t/plugin/limit-conn2.t                |  25 ---
 t/plugin/limit-count-redis-cluster.t  |  30 ----
 t/plugin/limit-count-redis.t          |  27 ---
 t/plugin/limit-count.t                |  55 ------
 t/plugin/limit-req.t                  | 166 +------------------
 t/plugin/loggly.t                     |  15 +-
 t/plugin/openid-connect.t             | 303 ----------------------------------
 t/plugin/prometheus2.t                |  17 +-
 t/plugin/proxy-cache/disk.t           |  26 ---
 t/plugin/redirect.t                   |  15 +-
 t/plugin/request-id.t                 |  80 ---------
 t/plugin/rocketmq-logger-log-format.t |  16 +-
 t/plugin/rocketmq-logger.t            |  71 --------
 t/plugin/serverless.t                 | 140 ----------------
 t/plugin/skywalking-logger.t          |  41 +----
 t/plugin/skywalking.t                 |  76 ---------
 t/plugin/sls-logger.t                 |  26 ---
 t/plugin/syslog.t                     |  65 --------
 t/plugin/tcp-logger.t                 |  92 -----------
 t/plugin/udp-logger.t                 |  90 ----------
 t/plugin/uri-blocker.t                |  11 --
 t/plugin/wolf-rbac.t                  |  18 +-
 t/plugin/zipkin.t                     |  60 -------
 49 files changed, 108 insertions(+), 2954 deletions(-)

diff --git a/t/core/config_etcd.t b/t/core/config_etcd.t
index 1e98434..0d6a779 100644
--- a/t/core/config_etcd.t
+++ b/t/core/config_etcd.t
@@ -158,25 +158,6 @@ etcd:
                     },
                     "desc": "new route",
                     "uri": "/index.html"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "methods": [
-                                "GET"
-                            ],
-                            "uri": "/index.html",
-                            "desc": "new route",
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:8080": 1
-                                },
-                                "type": "roundrobin"
-                            }
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -209,26 +190,7 @@ etcd:
             local t = require("lib.test_admin").test
             local code, body = t('/apisix/admin/routes/1',
                  ngx.HTTP_GET,
-                 nil,
-                [[{
-                    "node": {
-                        "value": {
-                            "methods": [
-                                "GET"
-                            ],
-                            "uri": "/index.html",
-                            "desc": "new route",
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:8080": 1
-                                },
-                                "type": "roundrobin"
-                            }
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "get"
-                }]]
+                 nil
                 )
 
             ngx.status = code
diff --git a/t/core/ctx.t b/t/core/ctx.t
index 7e28f0c..c652f2e 100644
--- a/t/core/ctx.t
+++ b/t/core/ctx.t
@@ -223,19 +223,12 @@ route_id: 1
                  ngx.HTTP_PUT,
                  [[{
                     "desc": "new_service"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "desc": "new_service"
-                        },
-                        "key": "/apisix/services/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -606,20 +599,11 @@ consumer_name: consumer_name is nil
                     "log_format": {
                         "service_name": "$service_name"
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "log_format": {
-                                "service_name": "$service_name"
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
-
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -783,16 +767,6 @@ qr/request log: \{"route_id":"1"\}/
                     "log_format": {
                         "route_name": "$route_name"
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "log_format": {
-                                "route_name": "$route_name"
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -928,17 +902,6 @@ qr/request log: \{"route_id":"1"\}/
                         "route_name": "$route_name",
                         "service_name": "$service_name"
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "log_format": {
-                                "route_name": "$route_name",
-                                "service_name": "$service_name"
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/node/consumer-plugin.t b/t/node/consumer-plugin.t
index 2764080..1007bed 100644
--- a/t/node/consumer-plugin.t
+++ b/t/node/consumer-plugin.t
@@ -43,29 +43,12 @@ __DATA__
                             "key": "auth-one"
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "jack",
-                            "plugins": {
-                                "limit-count": {
-                                    "count": 2,
-                                    "time_window": 60,
-                                    "rejected_code": 503,
-                                    "key": "remote_addr"
-                                },
-                                "key-auth": {
-                                    "key": "auth-one"
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -273,29 +256,12 @@ GET /t
                                 "clock_skew": 1
                             }
                         }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "John_Doe",
-                            "desc": "new consumer",
-                            "plugins": {
-                                "key-auth": {
-                                    "key": "consumer-plugin-John_Doe"
-                                },
-                                "hmac-auth": {
-                                    "access_key": "my-access-key",
-                                    "secret_key": "my-secret-key",
-                                    "clock_skew": 1
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
diff --git a/t/node/ewma.t b/t/node/ewma.t
index 53bf848..6b2d99e 100644
--- a/t/node/ewma.t
+++ b/t/node/ewma.t
@@ -40,22 +40,6 @@ __DATA__
                             "type": "ewma"
                         },
                         "uri": "/ewma"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 100,
-                                    "127.0.0.1:1981": 100
-                                },
-                                "type": "ewma"
-                            },
-                            "uri": "/ewma"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/node/route-status.t b/t/node/route-status.t
index 1061ea5..24ac4ca 100644
--- a/t/node/route-status.t
+++ b/t/node/route-status.t
@@ -88,16 +88,7 @@ hello world
 
             local code, body = t('/apisix/admin/routes/1',
                 ngx.HTTP_PATCH,
-                core.json.encode(data),
-                [[{
-                    "node": {
-                        "value": {
-                            "status": 0
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "compareAndSwap"
-                }]]
+                core.json.encode(data)
                 )
 
             if code >= 300 then
@@ -185,16 +176,7 @@ hello world
 
             local code, body = t('/apisix/admin/routes/1',
                 ngx.HTTP_PATCH,
-                core.json.encode(data),
-                [[{
-                    "node": {
-                        "value": {
-                            "status": 0
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "compareAndSwap"
-                }]]
+                core.json.encode(data)
                 )
 
             if code >= 300 then
diff --git a/t/node/service-empty.t b/t/node/service-empty.t
index fa09475..7c6c635 100644
--- a/t/node/service-empty.t
+++ b/t/node/service-empty.t
@@ -33,16 +33,12 @@ __DATA__
             local t = require("lib.test_admin").test
             local code, body = t('/apisix/admin/services/1',
                 ngx.HTTP_PUT,
-                '{}',
-                [[{
-                    "node": {
-                        "value": {"id":"1"}
-                    },
-                    "action": "set"
-                }]]
+                '{}'
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
diff --git a/t/plugin/authz-keycloak.t b/t/plugin/authz-keycloak.t
index f844754..ad8ba89 100644
--- a/t/plugin/authz-keycloak.t
+++ b/t/plugin/authz-keycloak.t
@@ -293,30 +293,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/hello1"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "authz-keycloak": {
-                                    "token_endpoint": "https://127.0.0.1:8443/auth/realms/University/protocol/openid-connect/token",
-                                    "permissions": ["course_resource#delete"],
-                                    "client_id": "course_management",
-                                    "grant_type": "urn:ietf:params:oauth:grant-type:uma-ticket",
-                                    "timeout": 3000
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello1"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -390,31 +366,6 @@ Error while sending authz request to https://127.0.0.1:8443/auth/realms/Universi
                             "type": "roundrobin"
                         },
                         "uri": "/hello1"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "authz-keycloak": {
-                                    "token_endpoint": "https://127.0.0.1:8443/auth/realms/University/protocol/openid-connect/token",
-                                    "permissions": ["course_resource#delete"],
-                                    "client_id": "course_management",
-                                    "grant_type": "urn:ietf:params:oauth:grant-type:uma-ticket",
-                                    "timeout": 3000,
-                                    "ssl_verify": false
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello1"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -487,30 +438,6 @@ Request denied: HTTP 401 Unauthorized. Body: {"error":"HTTP 401 Unauthorized"}
                             "type": "roundrobin"
                         },
                         "uri": "/hello1"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "authz-keycloak": {
-                                    "token_endpoint": "http://127.0.0.1:8443/auth/realms/University/protocol/openid-connect/token",
-                                    "client_id": "course_management",
-                                    "grant_type": "urn:ietf:params:oauth:grant-type:uma-ticket",
-                                    "policy_enforcement_mode": "ENFORCING",
-                                    "timeout": 3000
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello1"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/authz-keycloak2.t b/t/plugin/authz-keycloak2.t
index 953828d..48d8874 100644
--- a/t/plugin/authz-keycloak2.t
+++ b/t/plugin/authz-keycloak2.t
@@ -48,30 +48,6 @@ __DATA__
                             "type": "roundrobin"
                         },
                         "uri": "/hello1"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "authz-keycloak": {
-                                    "token_endpoint": "http://127.0.0.1:8090/auth/realms/University/protocol/openid-connect/token",
-                                    "permissions": ["course_resource#view"],
-                                    "client_id": "course_management",
-                                    "grant_type": "urn:ietf:params:oauth:grant-type:uma-ticket",
-                                    "timeout": 3000
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello1"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -189,30 +165,6 @@ Invalid bearer token
                             "type": "roundrobin"
                         },
                         "uri": "/hello1"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "authz-keycloak": {
-                                    "discovery": "http://127.0.0.1:8090/auth/realms/University/.well-known/uma2-configuration",
-                                    "permissions": ["course_resource#view"],
-                                    "client_id": "course_management",
-                                    "grant_type": "urn:ietf:params:oauth:grant-type:uma-ticket",
-                                    "timeout": 3000
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello1"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -330,30 +282,6 @@ Invalid bearer token
                             "type": "roundrobin"
                         },
                         "uri": "/hello1"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "authz-keycloak": {
-                                    "token_endpoint": "http://127.0.0.1:8090/auth/realms/University/protocol/openid-connect/token",
-                                    "permissions": ["course_resource#delete"],
-                                    "client_id": "course_management",
-                                    "grant_type": "urn:ietf:params:oauth:grant-type:uma-ticket",
-                                    "timeout": 3000
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello1"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -444,30 +372,6 @@ true
                             "type": "roundrobin"
                         },
                         "uri": "/course/foo"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "authz-keycloak": {
-                                    "discovery": "http://127.0.0.1:8090/auth/realms/University/.well-known/uma2-configuration",
-                                    "client_id": "course_management",
-                                    "client_secret": "d1ec69e9-55d2-4109-a3ea-befa071579d5",
-                                    "lazy_load_paths": true,
-                                    "http_method_as_scope": true
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/course/foo"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -702,30 +606,6 @@ true
                             "type": "roundrobin"
                         },
                         "uri": "/course/foo"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "authz-keycloak": {
-                                    "discovery": "http://127.0.0.1:8090/auth/realms/University/.well-known/uma2-configuration",
-                                    "audience": "course_management",
-                                    "client_secret": "d1ec69e9-55d2-4109-a3ea-befa071579d5",
-                                    "lazy_load_paths": true,
-                                    "http_method_as_scope": true
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/course/foo"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/aws-lambda.t b/t/plugin/aws-lambda.t
index 78a1149..e941d84 100644
--- a/t/plugin/aws-lambda.t
+++ b/t/plugin/aws-lambda.t
@@ -132,28 +132,6 @@ property "authorization" validation failed: property "iam" validation failed: pr
                             }
                         },
                         "uri": "/aws"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "aws-lambda": {
-                                    "keepalive": true,
-                                    "timeout": 3000,
-                                    "ssl_verify": true,
-                                    "keepalive_timeout": 60000,
-                                    "keepalive_pool": 5,
-                                    "function_uri": "http://localhost:8765/httptrigger",
-                                    "authorization": {
-                                        "apikey": "testkey"
-                                    }
-                                }
-                            },
-                            "uri": "/aws"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/azure-functions.t b/t/plugin/azure-functions.t
index c629ec8..2ab2f91 100644
--- a/t/plugin/azure-functions.t
+++ b/t/plugin/azure-functions.t
@@ -141,31 +141,6 @@ property "function_uri" is required
                             "type": "roundrobin"
                         },
                         "uri": "/azure"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "azure-functions": {
-                                    "keepalive": true,
-                                    "timeout": 3000,
-                                    "ssl_verify": true,
-                                    "keepalive_timeout": 60000,
-                                    "keepalive_pool": 5,
-                                    "function_uri": "http://localhost:8765/httptrigger"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/azure"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -335,17 +310,8 @@ Authz-Header - must_not_be_overrided
                 ngx.HTTP_PUT,
                 [[{
                     "master_apikey":"metadata_key"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "master_apikey": "metadata_key",
-                            "master_clientid": ""
-                        },
-                        "key": "/apisix/plugin_metadata/azure-functions"
-                    },
-                    "action": "set"
-                }]])
+                }]]
+                )
 
             if code >= 300 then
                 ngx.status = code
diff --git a/t/plugin/basic-auth.t b/t/plugin/basic-auth.t
index 069d8c1..3f0030f 100644
--- a/t/plugin/basic-auth.t
+++ b/t/plugin/basic-auth.t
@@ -86,24 +86,11 @@ done
                             "password": "bar"
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "foo",
-                            "plugins": {
-                                "basic-auth": {
-                                    "username": "foo",
-                                    "password": "bar"
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
-
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
diff --git a/t/plugin/clickhouse-logger.t b/t/plugin/clickhouse-logger.t
index 69e1a6f..5426ce0 100644
--- a/t/plugin/clickhouse-logger.t
+++ b/t/plugin/clickhouse-logger.t
@@ -161,39 +161,6 @@ property "endpoint_addr" is required
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "action":"set",
-                    "node":{
-                        "value":{
-                            "uri":"/opentracing",
-                            "upstream":{
-                                "scheme":"http",
-                                "nodes":{
-                                    "127.0.0.1:1982":1
-                                }
-                            },
-                            "plugins":{
-                                "clickhouse-logger":{
-                                    "batch_max_size":1,
-                                    "max_retry_count":0,
-                                    "retry_delay":1,
-                                    "ssl_verify":true,
-                                    "endpoint_addr":"http://127.0.0.1:10420/clickhouse-logger/test",
-                                    "password":"a",
-                                    "buffer_duration":60,
-                                    "timeout":3,
-                                    "user":"default",
-                                    "name":"clickhouse-logger",
-                                    "database":"default",
-                                    "logtable":"t",
-                                    "inactive_timeout":1
-                                }
-                            },
-                            "id":"1"
-                        },
-                        "key":"/apisix/routes/1"
-                    }
                 }]]
                 )
 
diff --git a/t/plugin/consumer-restriction.t b/t/plugin/consumer-restriction.t
index 5fc39e0..0914481 100644
--- a/t/plugin/consumer-restriction.t
+++ b/t/plugin/consumer-restriction.t
@@ -91,24 +91,11 @@ done
                             "password": "123456"
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "jack1",
-                            "plugins": {
-                                "basic-auth": {
-                                    "username": "jack2019",
-                                    "password": "123456"
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
-
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -136,24 +123,11 @@ passed
                             "password": "123456"
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "jack2",
-                            "plugins": {
-                                "basic-auth": {
-                                    "username": "jack2020",
-                                    "password": "123456"
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
-
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -806,25 +780,11 @@ hello world
                         "type": "roundrobin"
                     },
                     "desc": "new service 001"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "desc": "new service 001"
-                        },
-                        "key": "/apisix/services/1"
-                    },
-                    "action": "set"
                 }]]
                 )
-
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -857,31 +817,11 @@ passed
                             "rejected_code": 401
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "jack",
-                            "plugins": {
-                                "hmac-auth": {
-                                    "access_key": "my-access-key",
-                                    "secret_key": "my-secret-key",
-                                    "algorithm": "hmac-sha256",
-                                    "clock_skew": 0
-                                },
-                                "consumer-restriction": {
-                                    "type": "service_id",
-                                    "whitelist": [ "1" ],
-                                    "rejected_code": 401
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
-
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -915,28 +855,6 @@ passed
                         "hmac-auth": {}
                     }
 
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "methods": [
-                                "GET"
-                            ],
-                            "uri": "/hello",
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "service_id": 1,
-                            "plugins": {
-                                "hmac-auth": {}
-                            }
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -1028,25 +946,11 @@ passed
                         "type": "roundrobin"
                     },
                     "desc": "new service 002"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "desc": "new service 002"
-                        },
-                        "key": "/apisix/services/2"
-                    },
-                    "action": "set"
                 }]]
                 )
-
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -1080,28 +984,6 @@ passed
                         "hmac-auth": {}
                     }
 
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "methods": [
-                                "GET"
-                            ],
-                            "uri": "/hello",
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "service_id": 2,
-                            "plugins": {
-                                "hmac-auth": {}
-                            }
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -1201,27 +1083,6 @@ qr/\{"message":"The service_id is forbidden."\}/
                             "rejected_code": 401
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "jack",
-                            "plugins": {
-                                "hmac-auth": {
-                                    "access_key": "my-access-key",
-                                    "secret_key": "my-secret-key",
-                                    "algorithm": "hmac-sha256",
-                                    "clock_skew": 0
-                                },
-                                "consumer-restriction": {
-                                    "type": "service_id",
-                                    "blacklist": [ "1" ],
-                                    "rejected_code": 401
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -1259,28 +1120,6 @@ passed
                         "hmac-auth": {}
                     }
 
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "methods": [
-                                "GET"
-                            ],
-                            "uri": "/hello",
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "service_id": 1,
-                            "plugins": {
-                                "hmac-auth": {}
-                            }
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -1379,28 +1218,6 @@ qr/\{"message":"The service_id is forbidden."\}/
                         "hmac-auth": {}
                     }
 
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "methods": [
-                                "GET"
-                            ],
-                            "uri": "/hello",
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "service_id": 2,
-                            "plugins": {
-                                "hmac-auth": {}
-                            }
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -1497,27 +1314,6 @@ passed
                             "rejected_code": 401
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "jack",
-                            "plugins": {
-                                "hmac-auth": {
-                                    "access_key": "my-access-key",
-                                    "secret_key": "my-secret-key",
-                                    "algorithm": "hmac-sha256",
-                                    "clock_skew": 0
-                                },
-                                "consumer-restriction": {
-                                    "type": "route_id",
-                                    "whitelist": [ "1" ],
-                                    "rejected_code": 401
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -1612,27 +1408,6 @@ passed
                             "rejected_code": 401
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "jack",
-                            "plugins": {
-                                "hmac-auth": {
-                                    "access_key": "my-access-key",
-                                    "secret_key": "my-secret-key",
-                                    "algorithm": "hmac-sha256",
-                                    "clock_skew": 0
-                                },
-                                "consumer-restriction": {
-                                    "type": "route_id",
-                                    "blacklist": [ "1" ],
-                                    "rejected_code": 401
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/custom_hmac_auth.t b/t/plugin/custom_hmac_auth.t
index 249840b..48066e2 100644
--- a/t/plugin/custom_hmac_auth.t
+++ b/t/plugin/custom_hmac_auth.t
@@ -44,26 +44,12 @@ __DATA__
                             "clock_skew": 10
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "jack",
-                            "plugins": {
-                                "hmac-auth": {
-                                    "access_key": "my-access-key",
-                                    "secret_key": "my-secret-key",
-                                    "algorithm": "hmac-sha256",
-                                    "clock_skew": 10
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -303,26 +289,11 @@ passed
                             "clock_skew": 1
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "pony",
-                            "plugins": {
-                                "hmac-auth": {
-                                    "access_key": "my-access-key2",
-                                    "secret_key": "my-secret-key2",
-                                    "algorithm": "hmac-sha256",
-                                    "clock_skew": 1
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
-
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
diff --git a/t/plugin/datadog.t b/t/plugin/datadog.t
index 3448e43..8dade74 100644
--- a/t/plugin/datadog.t
+++ b/t/plugin/datadog.t
@@ -80,21 +80,8 @@ done
                  [[{
                         "host":"127.0.0.1",
                         "port": 8125
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "namespace": "apisix",
-                            "host": "127.0.0.1",
-                            "constant_tags": [
-                                "source:apisix"
-                            ],
-                            "port": 8125
-                        },
-                        "key": "/apisix/plugin_metadata/datadog"
-                    },
-                    "action": "set"
-                }]])
+                }]]
+                )
 
             if code >= 300 then
                 ngx.status = code
@@ -119,28 +106,6 @@ done
                         },
                         "name": "datadog",
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "datadog": {
-                                    "batch_max_size": 1,
-                                    "max_retry_count": 0
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing",
-                            "name": "datadog"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/echo.t b/t/plugin/echo.t
index f9af4d0..99aec41 100644
--- a/t/plugin/echo.t
+++ b/t/plugin/echo.t
@@ -96,30 +96,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                               "echo": {
-                                "before_body": "before the body modification ",
-                                "body":"hello upstream",
-                                "headers": {
-                                    "Location":"https://www.iresty.com"
-                                 },
-                               }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -175,29 +151,6 @@ Authorization: userpass
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                               "echo": {
-                                "before_body": "before the body modification ",
-                                "headers": {
-                                    "Location":"https://www.iresty.com"
-                                }
-                               }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/hmac-auth.t b/t/plugin/hmac-auth.t
index 4de139b..1895a84 100644
--- a/t/plugin/hmac-auth.t
+++ b/t/plugin/hmac-auth.t
@@ -40,26 +40,12 @@ __DATA__
                             "clock_skew": 10
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "jack",
-                            "plugins": {
-                                "hmac-auth": {
-                                    "access_key": "my-access-key",
-                                    "secret_key": "my-secret-key",
-                                    "algorithm": "hmac-sha256",
-                                    "clock_skew": 10
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -412,26 +398,11 @@ passed
                             "clock_skew": 0
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "robin",
-                            "plugins": {
-                                "hmac-auth": {
-                                    "access_key": "my-access-key3",
-                                    "secret_key": "my-secret-key3",
-                                    "algorithm": "hmac-sha256",
-                                    "clock_skew": 0
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
-
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -476,26 +447,12 @@ X-HMAC-ACCESS-KEY: my-access-key3
                             "clock_skew": 1
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "pony",
-                            "plugins": {
-                                "hmac-auth": {
-                                    "access_key": "my-access-key2",
-                                    "secret_key": "my-secret-key2",
-                                    "algorithm": "hmac-sha256",
-                                    "clock_skew": 1
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -719,27 +676,12 @@ GET /hello
                             "signed_headers": ["x-custom-header-a", "x-custom-header-b"]
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "cook",
-                            "plugins": {
-                                "hmac-auth": {
-                                    "access_key": "my-access-key5",
-                                    "secret_key": "my-secret-key5",
-                                    "algorithm": "hmac-sha256",
-                                    "clock_skew": 0,
-                                    "signed_headers": ["x-custom-header-a", "x-custom-header-b"]
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
diff --git a/t/plugin/hmac-auth3.t b/t/plugin/hmac-auth3.t
index d90dcbc..3a60cf7 100644
--- a/t/plugin/hmac-auth3.t
+++ b/t/plugin/hmac-auth3.t
@@ -54,26 +54,11 @@ __DATA__
                             "validate_request_body": true
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "robin",
-                            "plugins": {
-                                "hmac-auth": {
-                                    "access_key": "my-access-key",
-                                    "secret_key": "my-secret-key",
-                                    "algorithm": "hmac-sha256",
-                                    "validate_request_body": true
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
-
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -313,23 +298,6 @@ passed
                             "max_req_body": 1024
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "robin",
-                            "plugins": {
-                                "hmac-auth": {
-                                    "access_key": "my-access-key",
-                                    "secret_key": "my-secret-key",
-                                    "algorithm": "hmac-sha256",
-                                    "validate_request_body": true,
-                                    "max_req_body": 1024
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/http-logger-log-format.t b/t/plugin/http-logger-log-format.t
index 6d2b99f..3afc2ff 100644
--- a/t/plugin/http-logger-log-format.t
+++ b/t/plugin/http-logger-log-format.t
@@ -38,22 +38,11 @@ __DATA__
                         "@timestamp": "$time_iso8601",
                         "client_ip": "$remote_addr"
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "log_format": {
-                                "host": "$host",
-                                "@timestamp": "$time_iso8601",
-                                "client_ip": "$remote_addr"
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
-
-            ngx.status = code
+            if code >=300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
diff --git a/t/plugin/http-logger.t b/t/plugin/http-logger.t
index f13d39e..02bdb6d 100644
--- a/t/plugin/http-logger.t
+++ b/t/plugin/http-logger.t
@@ -134,31 +134,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "http-logger": {
-                                    "uri": "http://127.0.0.1:1982/hello",
-                                    "batch_max_size": 1,
-                                    "max_retry_count": 1,
-                                    "retry_delay": 2,
-                                    "buffer_duration": 2,
-                                    "inactive_timeout": 2
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -213,31 +188,6 @@ Batch Processor[http logger] successfully processed the entries
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "http-logger": {
-                                    "uri": "http://127.0.0.1:8888/hello-world-http",
-                                    "batch_max_size": 1,
-                                    "max_retry_count": 1,
-                                    "retry_delay": 2,
-                                    "buffer_duration": 2,
-                                    "inactive_timeout": 2
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -293,32 +243,6 @@ Batch Processor[http logger] successfully processed the entries
                             "type": "roundrobin"
                         },
                         "uri": "/hello1"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "http-logger": {
-                                    "uri": "https://127.0.0.1:8888/hello-world-http",
-                                    "batch_max_size": 1,
-                                    "max_retry_count": 1,
-                                    "retry_delay": 2,
-                                    "buffer_duration": 2,
-                                    "inactive_timeout": 2,
-                                    "ssl_verify": true
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello1"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -374,32 +298,6 @@ failed to perform SSL with host[127.0.0.1] port[8888] handshake failed
                             "type": "roundrobin"
                         },
                         "uri": "/hello1"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "http-logger": {
-                                    "uri": "https://127.0.0.1:9999/hello-world-http",
-                                    "batch_max_size": 1,
-                                    "max_retry_count": 1,
-                                    "retry_delay": 2,
-                                    "buffer_duration": 2,
-                                    "inactive_timeout": 2,
-                                    "ssl_verify": false
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello1"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -454,31 +352,6 @@ Batch Processor[http logger] successfully processed the entries
                             "type": "roundrobin"
                         },
                         "uri": "/hello1"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "http-logger": {
-                                    "uri": "https://127.0.0.1:9999/hello-world-http",
-                                    "batch_max_size": 2,
-                                    "max_retry_count": 1,
-                                    "retry_delay": 2,
-                                    "buffer_duration": 2,
-                                    "inactive_timeout": 2
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello1"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -549,31 +422,6 @@ Batch Processor[http logger] successfully processed the entries
                             "type": "roundrobin"
                         },
                         "uri": "/hello1"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "http-logger": {
-                                    "uri": "http://127.0.0.1:9991/hello-world-http",
-                                    "batch_max_size": 1,
-                                    "max_retry_count": 1,
-                                    "retry_delay": 2,
-                                    "buffer_duration": 2,
-                                    "inactive_timeout": 2
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello1"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -670,31 +518,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "http-logger": {
-                                    "uri": "http://127.0.0.1:1982/hello",
-                                    "batch_max_size": 1,
-                                    "max_retry_count": 1,
-                                    "retry_delay": 2,
-                                    "buffer_duration": 2,
-                                    "inactive_timeout": 2
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -731,31 +554,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "http-logger": {
-                                    "uri": "http://127.0.0.1:1982/hello1",
-                                    "batch_max_size": 1,
-                                    "max_retry_count": 1,
-                                    "retry_delay": 2,
-                                    "buffer_duration": 2,
-                                    "inactive_timeout": 2
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -848,27 +646,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "http-logger": {
-                                    "uri": "http://127.0.0.1:1982/hello",
-                                    "ssl_verify": false
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -913,32 +690,6 @@ passed
                             "type": "roundrobin"
                         },
                         "uri": "/hello1"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "http-logger": {
-                                    "uri": "https://127.0.0.1:9999/hello-world-http",
-                                    "batch_max_size": 1,
-                                    "max_retry_count": 1,
-                                    "retry_delay": 2,
-                                    "buffer_duration": 2,
-                                    "inactive_timeout": 2,
-                                    "ssl_verify": true
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello1"
-                        },
-                        "key": "/apisix/routes/1"
-                   },
-                    "action": "set"
                 }]]
                 )
             if code >= 300 then
diff --git a/t/plugin/jwt-auth.t b/t/plugin/jwt-auth.t
index c5ec543..87eb580 100644
--- a/t/plugin/jwt-auth.t
+++ b/t/plugin/jwt-auth.t
@@ -93,24 +93,12 @@ done
                             "secret": "my-secret-key"
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "jack",
-                            "plugins": {
-                                "jwt-auth": {
-                                    "key": "user-key",
-                                    "secret": "my-secret-key"
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -359,24 +347,12 @@ code: true body: passed
                             "base64_secret": true
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "jack",
-                            "plugins": {
-                                "jwt-auth": {
-                                    "key": "user-key",
-                                    "secret": "fo4XKdZ1xSrIZyms4q2BwPrW5lMpls9qqy5tiAk2esc=",
-                                    "base64_secret": true
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
-            ngx.status = code
+
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -565,25 +541,12 @@ property "key" is required
                             "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIBOgIBAAJBAKebDxlvQMGyEesAL1r1nIJBkSdqu3Hr7noq/0ukiZqVQLSJPMOv\n0oxQSutvvK3hoibwGakDOza+xRITB7cs2cECAwEAAQJAYPWh6YvjwWobVYC45Hz7\n+pqlt1DWeVQMlN407HSWKjdH548ady46xiQuZ5Cfx3YyCcnsfVWaQNbC+jFbY4YL\nwQIhANfASwz8+2sKg1xtvzyaChX5S5XaQTB+azFImBJumixZAiEAxt93Td6JH1RF\nIeQmD/K+DClZMqSrliUzUqJnCPCzy6kCIAekDsRh/UF4ONjAJkKuLedDUfL3rNFb\n2M4BBSm58wnZAiEAwYLMOg8h6kQ7iMDRcI9I8diCHM8yz0SfbfbsvzxIFxECICXs\nYvIufaZvBa8f+E/9CAN [...]
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "kerouac",
-                            "plugins": {
-                                "jwt-auth": {
-                                    "key": "user-key-rs256",
-                                    "algorithm": "RS256",
-                                    "public_key": "-----BEGIN PUBLIC KEY-----\nMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKebDxlvQMGyEesAL1r1nIJBkSdqu3Hr\n7noq/0ukiZqVQLSJPMOv0oxQSutvvK3hoibwGakDOza+xRITB7cs2cECAwEAAQ==\n-----END PUBLIC KEY-----",
-                                    "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIBOgIBAAJBAKebDxlvQMGyEesAL1r1nIJBkSdqu3Hr7noq/0ukiZqVQLSJPMOv\n0oxQSutvvK3hoibwGakDOza+xRITB7cs2cECAwEAAQJAYPWh6YvjwWobVYC45Hz7\n+pqlt1DWeVQMlN407HSWKjdH548ady46xiQuZ5Cfx3YyCcnsfVWaQNbC+jFbY4YL\nwQIhANfASwz8+2sKg1xtvzyaChX5S5XaQTB+azFImBJumixZAiEAxt93Td6JH1RF\nIeQmD/K+DClZMqSrliUzUqJnCPCzy6kCIAekDsRh/UF4ONjAJkKuLedDUfL3rNFb\n2M4BBSm58wnZAiEAwYLMOg8h6kQ7iMDRcI9I8diCHM8yz0SfbfbsvzxIFxECICXs\nYvIufaZvBa8 [...]
-                                    }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
-            ngx.status = code
+
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -671,24 +634,7 @@ hello world
                             }
                         }
                     }
-                ]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "kerouac",
-                            "plugins": {
-                                "jwt-auth": {
-                                    "key": "user-key-rs256",
-                                    "algorithm": "RS256",
-                                    "public_key": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDGxOfVe/seP5T/V8pkS5YNAPRC\n3Ffxxedi7v0pyZh/4d4p9Qx0P9wOmALwlOq4Ftgks311pxG0zL0LcTJY4ikbc3r0\nh8SM0yhj9UV1VGtuia4YakobvpM9U+kq3lyIMO9ZPRez0cP3AJIYCt5yf8E7bNYJ\njbJNjl8WxvM1tDHqVQIDAQAB\n-----END PUBLIC KEY-----",
-                                    ]] .. [[
-                                    "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAKBgQDGxOfVe/seP5T/V8pkS5YNAPRC3Ffxxedi7v0pyZh/4d4p9Qx0\nP9wOmALwlOq4Ftgks311pxG0zL0LcTJY4ikbc3r0h8SM0yhj9UV1VGtuia4Yakob\nvpM9U+kq3lyIMO9ZPRez0cP3AJIYCt5yf8E7bNYJjbJNjl8WxvM1tDHqVQIDAQAB\nAoGAYFy9eAXvLC7u8QuClzT9vbgksvVXvWKQVqo+GbAeOoEpz3V5YDJFYN3ZLwFC\n+ZQ5nTFXNV6Veu13CMEMA4NBIa8I4r3aYzSjq7X7UEBkLDBtEUge52mYakNfXD8D\nqViHkyJqvtVnBl7jNZVqbBderQnXA0kigaeZPL3+hkYKBgECQQDmiDbUL3FBynLy\nNX6/JdAbO4g [...]
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
-                }]]
+                ]]
                 )
             ngx.status = code
             ngx.say(body)
@@ -806,24 +752,7 @@ hello world
                             }
                         }
                     }
-                ]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "kerouac",
-                            "plugins": {
-                                "jwt-auth": {
-                                    "key": "user-key-rs256",
-                                    "algorithm": "RS256",
-                                    "public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv5LHjZ4FxQ9jk6eQGDRt\noRwFVkLq+dUBebs97hrzirokVr2B+RoxqdLfKAM+AsN2DadawZ2GqlCV9DL0/gz6\nnWSqTQpWbQ8c7CrF31EkIHUYRzZvWy17K3WC9Odk/gM1FVd0HbZ2Rjuqj9ADeeqx\nnj9npDqKrMODOENy31SqZNerWZsdgGkML5JYbX5hbI2L9LREvRU21fDgSfGL6Mw4\nNaxnnzcvll4yqwrBELSeDZEAt0+e/p1dO7moxF+b1pFkh9vQl6zGvnvf8fOqn5Ex\ntLHXVzgx752PHMwmuj9mO1ko6p8FOM0JHDnooI+5rwK4j3I27Ho5nnatVWUaxK4U\n8wIDAQAB\n-----EN [...]
-                                    ]] .. [[
-                                    "private_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAv5LHjZ4FxQ9jk6eQGDRtoRwFVkLq+dUBebs97hrzirokVr2B\n+RoxqdLfKAM+AsN2DadawZ2GqlCV9DL0/gz6nWSqTQpWbQ8c7CrF31EkIHUYRzZv\nWy17K3WC9Odk/gM1FVd0HbZ2Rjuqj9ADeeqxnj9npDqKrMODOENy31SqZNerWZsd\ngGkML5JYbX5hbI2L9LREvRU21fDgSfGL6Mw4Naxnnzcvll4yqwrBELSeDZEAt0+e\n/p1dO7moxF+b1pFkh9vQl6zGvnvf8fOqn5ExtLHXVzgx752PHMwmuj9mO1ko6p8F\nOM0JHDnooI+5rwK4j3I27Ho5nnatVWUaxK4U8wIDAQABAoIBAFsFQC73H8KrNyKW\ngI4fit77U0X [...]
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
-                }]]
+                ]]
                 )
             ngx.status = code
             ngx.say(body)
@@ -939,22 +868,6 @@ hello world
                             "public_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIBOgIBAAJBAKebDxlvQMGyEesAL1r1nIJBkSdqu3Hr7noq/0ukiZqVQLSJPMOv\n0oxQSutvvK3hoibwGakDOza+xRITB7cs2cECAwEAAQJAYPWh6YvjwWobVYC45Hz7\n+pqlt1DWeVQMlN407HSWKjdH548ady46xiQuZ5Cfx3YyCcnsfVWaQNbC+jFbY4YL\nwQIhANfASwz8+2sKg1xtvzyaChX5S5XaQTB+azFImBJumixZAiEAxt93Td6JH1RF\nIeQmD/K+DClZMqSrliUzUqJnCPCzy6kCIAekDsRh/UF4ONjAJkKuLedDUfL3rNFb\n2M4BBSm58wnZAiEAwYLMOg8h6kQ7iMDRcI9I8diCHM8yz0SfbfbsvzxIFxECICXs\nYvIufaZvBa8f+E/9CANl [...]
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "kerouac",
-                            "plugins": {
-                                "jwt-auth": {
-                                    "key": "user-key-rs256",
-                                    "algorithm": "RS256",
-                                    "private_key": "-----BEGIN PUBLIC KEY-----\nMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKebDxlvQMGyEesAL1r1nIJBkSdqu3Hr\n7noq/0ukiZqVQLSJPMOv0oxQSutvvK3hoibwGakDOza+xRITB7cs2cECAwEAAQ==\n-----END PUBLIC KEY-----",
-                                    "public_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIBOgIBAAJBAKebDxlvQMGyEesAL1r1nIJBkSdqu3Hr7noq/0ukiZqVQLSJPMOv\n0oxQSutvvK3hoibwGakDOza+xRITB7cs2cECAwEAAQJAYPWh6YvjwWobVYC45Hz7\n+pqlt1DWeVQMlN407HSWKjdH548ady46xiQuZ5Cfx3YyCcnsfVWaQNbC+jFbY4YL\nwQIhANfASwz8+2sKg1xtvzyaChX5S5XaQTB+azFImBJumixZAiEAxt93Td6JH1RF\nIeQmD/K+DClZMqSrliUzUqJnCPCzy6kCIAekDsRh/UF4ONjAJkKuLedDUfL3rNFb\n2M4BBSm58wnZAiEAwYLMOg8h6kQ7iMDRcI9I8diCHM8yz0SfbfbsvzxIFxECICXs\nYvIufaZvBa8f [...]
-                                    }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
             ngx.status = code
@@ -1044,21 +957,6 @@ qr/{"algorithm":"HS512","base64_secret":false,"exp":86400,"key":"123","secret":"
                             "secret": "my-secret-key"
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "kerouac",
-                            "plugins": {
-                                "jwt-auth": {
-                                    "key": "user-key-HS512",
-                                    "algorithm": "HS512",
-                                    "secret": "my-secret-key"
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/kafka-logger-log-format.t b/t/plugin/kafka-logger-log-format.t
index 37f4249..f2cd204 100644
--- a/t/plugin/kafka-logger-log-format.t
+++ b/t/plugin/kafka-logger-log-format.t
@@ -38,22 +38,12 @@ __DATA__
                         "@timestamp": "$time_iso8601",
                         "client_ip": "$remote_addr"
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "log_format": {
-                                "host": "$host",
-                                "@timestamp": "$time_iso8601",
-                                "client_ip": "$remote_addr"
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
diff --git a/t/plugin/kafka-logger.t b/t/plugin/kafka-logger.t
index 0cc68fe..5b894ab 100644
--- a/t/plugin/kafka-logger.t
+++ b/t/plugin/kafka-logger.t
@@ -129,33 +129,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                 "kafka-logger": {
-                                    "broker_list" :
-                                      {
-                                        "127.0.0.1":9092
-                                      },
-                                    "kafka_topic" : "test2",
-                                    "key" : "key1",
-                                    "timeout" : 1,
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
             if code >= 300 then
@@ -206,34 +179,6 @@ hello world
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "kafka-logger": {
-                                    "broker_list" :
-                                      {
-                                        "127.0.0.1":9092,
-                                        "127.0.0.1":9093
-                                      },
-                                    "kafka_topic" : "test2",
-                                    "producer_type": "sync",
-                                    "key" : "key1",
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
             if code >= 300 then
@@ -445,32 +390,6 @@ qr/send data to kafka: \{.*"upstream":"127.0.0.1:1980"/
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                 "kafka-logger": {
-                                    "broker_list" :
-                                      {
-                                        "127.0.0.1":9092
-                                      },
-                                    "kafka_topic" : "test2",
-                                    "timeout" : 1,
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
             if code >= 300 then
diff --git a/t/plugin/key-auth.t b/t/plugin/key-auth.t
index bb37bb0..22c0a36 100644
--- a/t/plugin/key-auth.t
+++ b/t/plugin/key-auth.t
@@ -84,23 +84,12 @@ done
                             "key": "auth-one"
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "jack",
-                            "plugins": {
-                                "key-auth": {
-                                    "key": "auth-one"
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -233,18 +222,6 @@ apikey: auth-13
                         "key-auth": {
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "error",
-                            "plugins": {
-                                "key-auth": {
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/ldap-auth.t b/t/plugin/ldap-auth.t
index f5963aa..f100108 100644
--- a/t/plugin/ldap-auth.t
+++ b/t/plugin/ldap-auth.t
@@ -90,23 +90,12 @@ done
                             "user_dn": "cn=user01,ou=users,dc=example,dc=org"
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "user01",
-                            "plugins": {
-                                "ldap-auth": {
-                                    "user_dn": "cn=user01,ou=users,dc=example,dc=org"
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
diff --git a/t/plugin/limit-conn.t b/t/plugin/limit-conn.t
index e5b8934..282ff3f 100644
--- a/t/plugin/limit-conn.t
+++ b/t/plugin/limit-conn.t
@@ -139,30 +139,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/limit_conn"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-conn": {
-                                    "conn": 100,
-                                    "burst": 50,
-                                    "default_conn_delay": 0.1,
-                                    "rejected_code": 503,
-                                    "key": "remote_addr"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/limit_conn"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -225,30 +201,6 @@ GET /test_concurrency
                             "type": "roundrobin"
                         },
                         "uri": "/limit_conn"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-conn": {
-                                    "conn": 2,
-                                    "burst": 1,
-                                    "default_conn_delay": 0.1,
-                                    "rejected_code": 503,
-                                    "key": "remote_addr"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/limit_conn"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -823,26 +775,6 @@ limit key: 10.10.10.2route
                             "type": "roundrobin"
                         },
                         "uri": "/limit_conn"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-conn": {
-                                    "rejected_code": 503
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/limit_conn"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
             )
 
diff --git a/t/plugin/limit-conn2.t b/t/plugin/limit-conn2.t
index b1cc122..b15133c 100644
--- a/t/plugin/limit-conn2.t
+++ b/t/plugin/limit-conn2.t
@@ -366,31 +366,6 @@ request latency is nil
                             "type": "roundrobin"
                         },
                         "uri": "/limit_conn"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-conn": {
-                                    "conn": 1,
-                                    "burst": 0,
-                                    "default_conn_delay": 0.1,
-                                    "rejected_code": 503,
-                                    "key": "$http_a $http_b",
-                                    "key_type": "var_combination"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/limit_conn"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/limit-count-redis-cluster.t b/t/plugin/limit-count-redis-cluster.t
index 8343a6f..7f5eb2c 100644
--- a/t/plugin/limit-count-redis-cluster.t
+++ b/t/plugin/limit-count-redis-cluster.t
@@ -150,36 +150,6 @@ passed
                         },
                         "type": "roundrobin"
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-count": {
-                                    "count": 2,
-                                    "time_window": 60,
-                                    "rejected_code": 503,
-                                    "key": "remote_addr",
-                                    "policy": "redis-cluster",
-                                    "redis_timeout": 1000,
-                                    "redis_cluster_nodes": [
-                                        "127.0.0.1:5000",
-                                        "127.0.0.1:5001"
-                                    ],
-                                    "redis_cluster_name": "redis-cluster-1"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/limit-count-redis.t b/t/plugin/limit-count-redis.t
index 0062346..7186031 100644
--- a/t/plugin/limit-count-redis.t
+++ b/t/plugin/limit-count-redis.t
@@ -152,33 +152,6 @@ passed
                         },
                         "type": "roundrobin"
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-count": {
-                                    "count": 2,
-                                    "time_window": 60,
-                                    "rejected_code": 503,
-                                    "key": "remote_addr",
-                                    "policy": "redis",
-                                    "redis_host": "127.0.0.1",
-                                    "redis_port": 6379,
-                                    "redis_timeout": 1000
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/limit-count.t b/t/plugin/limit-count.t
index d9c6d1d..f150c01 100644
--- a/t/plugin/limit-count.t
+++ b/t/plugin/limit-count.t
@@ -557,17 +557,6 @@ passed
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-count": {
-                                    "rejected_code": 503
-                                }
-                            }
-                        }
-                    }
                 }]]
                 )
 
@@ -605,17 +594,6 @@ passed
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-count": {
-                                    "rejected_code": 503
-                                }
-                            }
-                        }
-                    }
                 }]]
                 )
 
@@ -655,17 +633,6 @@ passed
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-count": {
-                                    "rejected_code": 503
-                                }
-                            }
-                        }
-                    }
                 }]]
                 )
 
@@ -696,17 +663,6 @@ passed
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-count": {
-                                    "rejected_code": 503
-                                }
-                            }
-                        }
-                    }
                 }]]
                 )
 
@@ -746,17 +702,6 @@ passed
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-count": {
-                                    "rejected_code": 503
-                                }
-                            }
-                        }
-                    }
                 }]]
                 )
 
diff --git a/t/plugin/limit-req.t b/t/plugin/limit-req.t
index 976fb2c..ec75b67 100644
--- a/t/plugin/limit-req.t
+++ b/t/plugin/limit-req.t
@@ -105,30 +105,6 @@ done
                         },
                         "desc": "upstream_node",
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-req": {
-                                    "rate": 4,
-                                    "burst": 2,
-                                    "rejected_code": 503,
-                                    "key": "remote_addr"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "desc": "upstream_node",
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -180,29 +156,6 @@ passed
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-req": {
-                                    "rate": 0.1,
-                                    "burst": 0.1,
-                                    "rejected_code": 503,
-                                    "key": "remote_addr"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -254,29 +207,6 @@ passed
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-req": {
-                                    "rate": -1,
-                                    "burst": 0.1,
-                                    "rejected_code": 503,
-                                    "key": "remote_addr"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -406,18 +336,6 @@ passed
                         },
                         "desc": "upstream_node",
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-req": {
-                                    "rejected_code": 503,
-                                    "key": "remote_addr"
-                                }
-                            }
-                        }
-                    }
                 }]]
                 )
 
@@ -456,29 +374,12 @@ passed
                             "key": "consumer_name"
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "new_consumer",
-                            "plugins": {
-                               "key-auth": {
-                                    "key": "auth-jack"
-                                },
-                                "limit-req": {
-                                    "rate": 3,
-                                    "burst": 2,
-                                    "rejected_code": 403,
-                                    "key": "consumer_name"
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
@@ -510,25 +411,6 @@ passed
                         },
                         "desc": "upstream_node",
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "key-auth": {}
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "desc": "upstream_node",
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -579,25 +461,6 @@ apikey: auth-jack
                             "key": "consumer_name"
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "new_consumer",
-                            "plugins": {
-                               "key-auth": {
-                                    "key": "auth-jack"
-                                },
-                                "limit-req": {
-                                    "rate": 0.1,
-                                    "burst": 0.1,
-                                    "rejected_code": 403,
-                                    "key": "consumer_name"
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -649,29 +512,6 @@ apikey: auth-jack
                         },
                         "desc": "upstream_node",
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "limit-req": {
-                                    "rate": 2,
-                                    "burst": 1,
-                                    "key": "consumer_name"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "desc": "upstream_node",
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/loggly.t b/t/plugin/loggly.t
index 09e54eb..f2b27b8 100644
--- a/t/plugin/loggly.t
+++ b/t/plugin/loggly.t
@@ -191,19 +191,8 @@ passed
                  [[{
                         "host":"127.0.0.1",
                         "port": 8126
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "host": "127.0.0.1",
-                            "protocol": "syslog",
-                            "timeout": 5000,
-                            "port": 8126
-                        },
-                        "key": "/apisix/plugin_metadata/loggly"
-                    },
-                    "action": "set"
-                }]])
+                }]]
+                )
 
             if code >= 300 then
                 ngx.status = code
diff --git a/t/plugin/openid-connect.t b/t/plugin/openid-connect.t
index 349e43c..a97898d 100644
--- a/t/plugin/openid-connect.t
+++ b/t/plugin/openid-connect.t
@@ -119,32 +119,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "openid-connect": {
-                                    "client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH",
-                                    "client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa",
-                                    "discovery": "http://127.0.0.1:1980/.well-known/openid-configuration",
-                                    "redirect_uri": "https://iresty.com",
-                                    "ssl_verify": false,
-                                    "timeout": 10,
-                                    "scope": "apisix"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -225,38 +199,6 @@ true
                             "type": "roundrobin"
                         },
                         "uri": "/*"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "openid-connect": {
-                                    "client_id": "course_management",
-                                    "client_secret": "d1ec69e9-55d2-4109-a3ea-befa071579d5",
-                                    "discovery": "http://127.0.0.1:8090/auth/realms/University/.well-known/openid-configuration",
-                                    "redirect_uri": "http://127.0.0.1:]] .. ngx.var.server_port .. [[/authenticated",
-                                    "ssl_verify": false,
-                                    "timeout": 10,
-                                    "realm": "University",
-                                    "introspection_endpoint_auth_method": "client_secret_post",
-                                    "introspection_endpoint": "http://127.0.0.1:8090/auth/realms/University/protocol/openid-connect/token/introspect",
-                                    "set_access_token_header": true,
-                                    "access_token_in_authorization_header": false,
-                                    "set_id_token_header": true,
-                                    "set_userinfo_header": true
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/*"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -368,38 +310,6 @@ x-userinfo: ey.*
                             "type": "roundrobin"
                         },
                         "uri": "/*"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "openid-connect": {
-                                    "client_id": "course_management",
-                                    "client_secret": "d1ec69e9-55d2-4109-a3ea-befa071579d5",
-                                    "discovery": "http://127.0.0.1:8090/auth/realms/University/.well-known/openid-configuration",
-                                    "redirect_uri": "http://127.0.0.1:]] .. ngx.var.server_port .. [[/authenticated",
-                                    "ssl_verify": false,
-                                    "timeout": 10,
-                                    "realm": "University",
-                                    "introspection_endpoint_auth_method": "client_secret_post",
-                                    "introspection_endpoint": "http://127.0.0.1:8090/auth/realms/University/protocol/openid-connect/token/introspect",
-                                    "set_access_token_header": true,
-                                    "access_token_in_authorization_header": true,
-                                    "set_id_token_header": false,
-                                    "set_userinfo_header": false
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/*"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -504,33 +414,6 @@ x-real-ip: 127.0.0.1
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "openid-connect": {
-                                    "client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH",
-                                    "client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa",
-                                    "discovery": "https://samples.auth0.com/.well-known/openid-configuration",
-                                    "redirect_uri": "https://iresty.com",
-                                    "ssl_verify": false,
-                                    "timeout": 10,
-                                    "bearer_only": true,
-                                    "scope": "apisix"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -604,37 +487,6 @@ OIDC introspection failed: Invalid Authorization header format.
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{ "node": {
-                        "value": {
-                            "plugins": {
-                                "openid-connect": {
-                                    "client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH",
-                                    "client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa",
-                                    "discovery": "https://samples.auth0.com/.well-known/openid-configuration",
-                                    "redirect_uri": "https://iresty.com",
-                                    "ssl_verify": false,
-                                    "timeout": 10,
-                                    "bearer_only": true,
-                                    "scope": "apisix",
-                                    "public_key": "-----BEGIN PUBLIC KEY-----\n]] ..
-                                        [[MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANW16kX5SMrMa2t7F2R1w6Bk/qpjS4QQ\n]] ..
-                                        [[hnrbED3Dpsl9JXAx90MYsIWp51hBxJSE/EPVK8WF/sjHK1xQbEuDfEECAwEAAQ==\n]] ..
-                                        [[-----END PUBLIC KEY-----",
-                                    "token_signing_alg_values_expected": "RS256"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -716,37 +568,6 @@ true
                             "type": "roundrobin"
                         },
                         "uri": "/uri"
-                }]],
-                [[{ "node": {
-                        "value": {
-                            "plugins": {
-                                "openid-connect": {
-                                    "client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH",
-                                    "client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa",
-                                    "discovery": "https://samples.auth0.com/.well-known/openid-configuration",
-                                    "redirect_uri": "https://iresty.com",
-                                    "ssl_verify": false,
-                                    "timeout": 10,
-                                    "bearer_only": true,
-                                    "scope": "apisix",
-                                    "public_key": "-----BEGIN PUBLIC KEY-----\n]] ..
-                                        [[MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANW16kX5SMrMa2t7F2R1w6Bk/qpjS4QQ\n]] ..
-                                        [[hnrbED3Dpsl9JXAx90MYsIWp51hBxJSE/EPVK8WF/sjHK1xQbEuDfEECAwEAAQ==\n]] ..
-                                        [[-----END PUBLIC KEY-----",
-                                    "token_signing_alg_values_expected": "RS256"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/uri"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -817,40 +638,6 @@ x-real-ip: 127.0.0.1
                             "type": "roundrobin"
                         },
                         "uri": "/uri"
-                }]],
-                [[{ "node": {
-                        "value": {
-                            "plugins": {
-                                "openid-connect": {
-                                    "client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH",
-                                    "client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa",
-                                    "discovery": "https://samples.auth0.com/.well-known/openid-configuration",
-                                    "redirect_uri": "https://iresty.com",
-                                    "ssl_verify": false,
-                                    "timeout": 10,
-                                    "bearer_only": true,
-                                    "scope": "apisix",
-                                    "public_key": "-----BEGIN PUBLIC KEY-----\n]] ..
-                                        [[MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANW16kX5SMrMa2t7F2R1w6Bk/qpjS4QQ\n]] ..
-                                        [[hnrbED3Dpsl9JXAx90MYsIWp51hBxJSE/EPVK8WF/sjHK1xQbEuDfEECAwEAAQ==\n]] ..
-                                        [[-----END PUBLIC KEY-----",
-                                    "token_signing_alg_values_expected": "RS256",
-                                    "access_token_in_authorization_header": true,
-                                    "set_id_token_header": false,
-                                    "set_userinfo_header": false
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/uri"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -916,37 +703,6 @@ x-real-ip: 127.0.0.1
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{ "node": {
-                        "value": {
-                            "plugins": {
-                                "openid-connect": {
-                                    "client_id": "kbyuFDidLLm280LIwVFiazOqjO3ty8KH",
-                                    "client_secret": "60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa",
-                                    "discovery": "https://samples.auth0.com/.well-known/openid-configuration",
-                                    "redirect_uri": "https://iresty.com",
-                                    "ssl_verify": false,
-                                    "timeout": 10,
-                                    "bearer_only": true,
-                                    "scope": "apisix",
-                                    "public_key": "-----BEGIN PUBLIC KEY-----\n]] ..
-                                        [[MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANW16kX5SMrMa2t7F2R1w6Bk/qpjS4QQ\n]] ..
-                                        [[hnrbED3Dpsl9JXAx90MYsIWp51hBxJSE/EPVK8WF/sjHK1xQbEuDfEECAwEAAQ==\n]] ..
-                                        [[-----END PUBLIC KEY-----",
-                                    "token_signing_alg_values_expected": "RS256"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -1025,35 +781,6 @@ jwt signature verification failed
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "openid-connect": {
-                                    "client_id": "course_management",
-                                    "client_secret": "d1ec69e9-55d2-4109-a3ea-befa071579d5",
-                                    "discovery": "http://127.0.0.1:8090/auth/realms/University/.well-known/openid-configuration",
-                                    "redirect_uri": "http://localhost:3000",
-                                    "ssl_verify": false,
-                                    "timeout": 10,
-                                    "bearer_only": true,
-                                    "realm": "University",
-                                    "introspection_endpoint_auth_method": "client_secret_post",
-                                    "introspection_endpoint": "http://127.0.0.1:8090/auth/realms/University/protocol/openid-connect/token/introspect"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -1225,36 +952,6 @@ GET /t
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "openid-connect": {
-                                    "client_id": "course_management",
-                                    "client_secret": "d1ec69e9-55d2-4109-a3ea-befa071579d5",
-                                    "discovery": "http://127.0.0.1:8090/auth/realms/University/.well-known/openid-configuration",
-                                    "redirect_uri": "http://localhost:3000",
-                                    "ssl_verify": false,
-                                    "timeout": 10,
-                                    "bearer_only": true,
-                                    "use_jwks": true,
-                                    "realm": "University",
-                                    "introspection_endpoint_auth_method": "client_secret_post",
-                                    "introspection_endpoint": "http://127.0.0.1:8090/auth/realms/University/protocol/openid-connect/token/introspect"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/prometheus2.t b/t/plugin/prometheus2.t
index 9626f58..a543389 100644
--- a/t/plugin/prometheus2.t
+++ b/t/plugin/prometheus2.t
@@ -148,23 +148,12 @@ qr/apisix_bandwidth\{type="egress",route="1",service="",consumer="",node=""\} \d
                             "key": "auth-one"
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "jack",
-                            "plugins": {
-                                "key-auth": {
-                                    "key": "auth-one"
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
diff --git a/t/plugin/proxy-cache/disk.t b/t/plugin/proxy-cache/disk.t
index 5f759d8..a1b09d1 100644
--- a/t/plugin/proxy-cache/disk.t
+++ b/t/plugin/proxy-cache/disk.t
@@ -87,32 +87,6 @@ __DATA__
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                   }]],
-                   [[{
-                       "node": {
-                        "value": {
-                            "uri": "/hello",
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "plugins": {
-                                "proxy-cache":{
-                                    "cache_zone":"disk_cache_one",
-                                    "hide_cache_headers":true,
-                                    "cache_bypass":["$arg_bypass"],
-                                    "cache_key":["$host","$request_uri"],
-                                    "no_cache":["$arg_no_cache"],
-                                    "cache_http_status":[200],
-                                    "cache_method":["GET"]
-                                }
-                            }
-                        },
-                        "key": "/apisix/routes/1"
-                        },
-                        "action": "set"
                    }]]
                    )
 
diff --git a/t/plugin/redirect.t b/t/plugin/redirect.t
index 2d18139..2f2b9ab 100644
--- a/t/plugin/redirect.t
+++ b/t/plugin/redirect.t
@@ -582,19 +582,12 @@ location /t {
 
         local code, body = t.test('/apisix/admin/ssl/1',
             ngx.HTTP_PUT,
-            core.json.encode(data),
-            [[{
-                "node": {
-                    "value": {
-                        "sni": "test.com"
-                    },
-                    "key": "/apisix/ssl/1"
-                },
-                "action": "set"
-            }]]
+            core.json.encode(data)
             )
 
-        ngx.status = code
+        if code >= 300 then
+            ngx.status = code
+        end
         ngx.say(body)
     }
 }
diff --git a/t/plugin/request-id.t b/t/plugin/request-id.t
index 2888870..fb73437 100644
--- a/t/plugin/request-id.t
+++ b/t/plugin/request-id.t
@@ -94,25 +94,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                            "request-id": {
-                            }
-                        },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -224,27 +205,6 @@ true
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                            "request-id": {
-                                "header_name": "Custom-Header-Name",
-                                "include_in_response": true
-                            }
-                        },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -306,26 +266,6 @@ request header present
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                            "request-id": {
-                                "include_in_response": false
-                            }
-                        },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -516,26 +456,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                            "request-id": {
-                                "algorithm": "snowflake"
-                            }
-                        },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
             if code >= 300 then
diff --git a/t/plugin/rocketmq-logger-log-format.t b/t/plugin/rocketmq-logger-log-format.t
index b3a364b..14e0f68 100644
--- a/t/plugin/rocketmq-logger-log-format.t
+++ b/t/plugin/rocketmq-logger-log-format.t
@@ -38,22 +38,12 @@ __DATA__
                         "@timestamp": "$time_iso8601",
                         "client_ip": "$remote_addr"
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "log_format": {
-                                "host": "$host",
-                                "@timestamp": "$time_iso8601",
-                                "client_ip": "$remote_addr"
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
diff --git a/t/plugin/rocketmq-logger.t b/t/plugin/rocketmq-logger.t
index 1355d3d..e35c49c 100644
--- a/t/plugin/rocketmq-logger.t
+++ b/t/plugin/rocketmq-logger.t
@@ -126,30 +126,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                 "rocketmq-logger": {
-                                    "nameserver_list" : [ "127.0.0.1:9876" ],
-                                    "topic" : "test2",
-                                    "key" : "key1",
-                                    "timeout" : 1,
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
             if code >= 300 then
@@ -197,30 +173,6 @@ hello world
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "rocketmq-logger": {
-                                    "nameserver_list" : [ "127.0.0.1:9877" ],
-                                    "topic" : "test2",
-                                    "producer_type": "sync",
-                                    "key" : "key1",
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
             if code >= 300 then
@@ -426,29 +378,6 @@ qr/send data to rocketmq: \{.*"upstream":"127.0.0.1:1980"/
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                 "rocketmq-logger": {
-                                    "nameserver_list" : [ "127.0.0.1:9876" ],
-                                    "topic" : "test2",
-                                    "timeout" : 1,
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
             if code >= 300 then
diff --git a/t/plugin/serverless.t b/t/plugin/serverless.t
index f30b44e..3d891aa 100644
--- a/t/plugin/serverless.t
+++ b/t/plugin/serverless.t
@@ -179,26 +179,6 @@ done
                         "type": "roundrobin"
                     },
                     "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "serverless-post-function": {
-                                    "functions" : ["return function() ngx.log(ngx.ERR, 'serverless post function'); ngx.exit(201); end"]
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -246,26 +226,6 @@ serverless post function
                         "type": "roundrobin"
                     },
                     "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "serverless-pre-function": {
-                                    "functions" : ["return function() ngx.log(ngx.ERR, 'serverless pre function'); ngx.exit(201); end"]
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -316,29 +276,6 @@ serverless pre function
                         "type": "roundrobin"
                     },
                     "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "serverless-pre-function": {
-                                    "functions" : ["return function() ngx.log(ngx.ERR, 'serverless pre function'); end"]
-                                },
-                                "serverless-post-function": {
-                                    "functions" : ["return function() ngx.log(ngx.ERR, 'serverless post function'); ngx.exit(201); end"]
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -388,27 +325,6 @@ serverless post function
                         "type": "roundrobin"
                     },
                     "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "serverless-pre-function": {
-                                    "phase": "log",
-                                    "functions" : ["return function() ngx.log(ngx.ERR, 'serverless pre function'); end"]
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -456,27 +372,6 @@ serverless pre function
                         "type": "roundrobin"
                     },
                     "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "serverless-pre-function": {
-                                    "phase": "rewrite",
-                                    "functions" : ["return function() ngx.log(ngx.ERR, 'one'); end", "return function() ngx.log(ngx.ERR, 'two'); end"]
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -525,27 +420,6 @@ two
                         "type": "roundrobin"
                     },
                     "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "serverless-pre-function": {
-                                    "phase": "log",
-                            "functions" : ["local count = 1; return function() count = count + 1;ngx.log(ngx.ERR, 'serverless pre function:', count); end"]
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -586,20 +460,6 @@ serverless pre function:2
                         }
                     },
                     "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "serverless-pre-function": {
-                                    "functions" : ["return function() if ngx.var.scheme == \"http\" and ngx.var.host == \"foo.com\" then ngx.header[\"Location\"] = \"https://foo.com\" .. ngx.var.request_uri; ngx.exit(ngx.HTTP_MOVED_PERMANENTLY); end; end"]
-                                }
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/skywalking-logger.t b/t/plugin/skywalking-logger.t
index 2c9c314..3f733ef 100644
--- a/t/plugin/skywalking-logger.t
+++ b/t/plugin/skywalking-logger.t
@@ -146,31 +146,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "skywalking-logger": {
-                                    "endpoint_addr": "http://127.0.0.1:1986",
-                                    "batch_max_size": 1,
-                                    "max_retry_count": 1,
-                                    "retry_delay": 2,
-                                    "buffer_duration": 2,
-                                    "inactive_timeout": 2
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -235,22 +210,12 @@ qr/failed to parse trace_context header:/
                         "@timestamp": "$time_iso8601",
                         "client_ip": "$remote_addr"
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "log_format": {
-                                "host": "$host",
-                                "@timestamp": "$time_iso8601",
-                                "client_ip": "$remote_addr"
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
diff --git a/t/plugin/skywalking.t b/t/plugin/skywalking.t
index 565fe32..6509c96 100644
--- a/t/plugin/skywalking.t
+++ b/t/plugin/skywalking.t
@@ -79,25 +79,6 @@ __DATA__
                         "type": "roundrobin"
                     },
                     "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "skywalking": {
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -153,26 +134,6 @@ skywalking run prepareForReport
                         "type": "roundrobin"
                     },
                     "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "skywalking": {
-                                    "sample_ratio": 0.00001
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -221,23 +182,6 @@ qr/skywalking run \w+/
                         "type": "roundrobin"
                     },
                     "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -286,26 +230,6 @@ rewrite phase of skywalking plugin
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "skywalking": {
-                                    "sample_ratio": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/sls-logger.t b/t/plugin/sls-logger.t
index 296372c..11db664 100644
--- a/t/plugin/sls-logger.t
+++ b/t/plugin/sls-logger.t
@@ -122,32 +122,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "sls-logger": {
-                                    "host": "100.100.99.135",
-                                    "port": 10009,
-                                    "project": "your_project",
-                                    "logstore": "your_logstore",
-                                    "access_key_id": "your_access_key_id",
-                                    "access_key_secret": "your_access_key_secret",
-                                    "timeout": 30000
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/syslog.t b/t/plugin/syslog.t
index 7fc4395..31d3cc7 100644
--- a/t/plugin/syslog.t
+++ b/t/plugin/syslog.t
@@ -116,27 +116,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                              "syslog": {
-                                 "host" : "127.0.0.1",
-                                 "port" : 5044
-                              }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
             if code >= 300 then
@@ -293,28 +272,6 @@ unlock with key route#1
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "syslog": {
-                                    "host": "127.0.0.1",
-                                    "port": 5044,
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -348,28 +305,6 @@ unlock with key route#1
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "syslog": {
-                                    "host": "127.0.0.1",
-                                    "port": 5045,
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/tcp-logger.t b/t/plugin/tcp-logger.t
index 9513864..d0555de 100644
--- a/t/plugin/tcp-logger.t
+++ b/t/plugin/tcp-logger.t
@@ -114,28 +114,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "tcp-logger": {
-                                    "host": "127.0.0.1",
-                                    "port": 5044,
-                                    "tls": false
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -189,30 +167,6 @@ hello world
                             "type": "roundrobin"
                         },
                         "uri": "/hello"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "tcp-logger": {
-                                    "host": "312.0.0.1",
-                                    "port": 2000,
-                                    "batch_max_size": 1,
-                                    "max_retry_count": 2,
-                                    "retry_delay": 0
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/hello"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -260,29 +214,6 @@ failed to connect to TCP server: host[312.0.0.1] port[2000]
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "tcp-logger": {
-                                    "host": "127.0.0.1",
-                                    "port": 5044,
-                                    "tls": false,
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -317,29 +248,6 @@ failed to connect to TCP server: host[312.0.0.1] port[2000]
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "tcp-logger": {
-                                    "host": "127.0.0.1",
-                                    "port": 5045,
-                                    "tls": false,
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/udp-logger.t b/t/plugin/udp-logger.t
index aed279b..41796d3 100644
--- a/t/plugin/udp-logger.t
+++ b/t/plugin/udp-logger.t
@@ -113,28 +113,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "udp-logger": {
-                                    "host": "127.0.0.1",
-                                    "port": 2000,
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -186,28 +164,6 @@ opentracing
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "udp-logger": {
-                                    "host": "312.0.0.1",
-                                    "port": 2000,
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -255,29 +211,6 @@ failed to connect to UDP server: host[312.0.0.1] port[2000]
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "udp-logger": {
-                                    "host": "127.0.0.1",
-                                    "port": 2000,
-                                    "tls": false,
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -312,29 +245,6 @@ failed to connect to UDP server: host[312.0.0.1] port[2000]
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "udp-logger": {
-                                    "host": "127.0.0.1",
-                                    "port": 2001,
-                                    "tls": false,
-                                    "batch_max_size": 1
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1982": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
diff --git a/t/plugin/uri-blocker.t b/t/plugin/uri-blocker.t
index 2aee13e..997afbb 100644
--- a/t/plugin/uri-blocker.t
+++ b/t/plugin/uri-blocker.t
@@ -142,17 +142,6 @@ location /t {
                     "type": "roundrobin"
                 },
                 "uri": "/hello"
-            }]],
-            [[{
-                "node": {
-                    "value": {
-                        "plugins": {
-                            "uri-blocker": {
-                                "block_rules": ["aa"]
-                            }
-                        }
-                    }
-                }
             }]]
             )
 
diff --git a/t/plugin/wolf-rbac.t b/t/plugin/wolf-rbac.t
index 0909f5e..67aaacd 100644
--- a/t/plugin/wolf-rbac.t
+++ b/t/plugin/wolf-rbac.t
@@ -139,24 +139,12 @@ done
                             "server": "http://127.0.0.1:1982"
                         }
                     }
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "username": "wolf_rbac_unit_test",
-                            "plugins": {
-                                "wolf-rbac": {
-                                    "appid": "wolf-rbac-app",
-                                    "server": "http://127.0.0.1:1982"
-                                }
-                            }
-                        }
-                    },
-                    "action": "set"
                 }]]
                 )
 
-            ngx.status = code
+            if code >= 300 then
+                ngx.status = code
+            end
             ngx.say(body)
         }
     }
diff --git a/t/plugin/zipkin.t b/t/plugin/zipkin.t
index d975563..8ab1e0f 100644
--- a/t/plugin/zipkin.t
+++ b/t/plugin/zipkin.t
@@ -114,28 +114,6 @@ done
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "zipkin": {
-                                    "endpoint": "http://127.0.0.1:1980/mock_zipkin?server_addr=127.0.0.1",
-                                    "sample_ratio": 1,
-                                    "service_name":"APISIX"
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -184,27 +162,6 @@ GET /opentracing
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                                "zipkin": {
-                                    "endpoint": "http://127.0.0.1:9999/mock_zipkin",
-                                    "sample_ratio": 0.00001
-                                }
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )
 
@@ -250,23 +207,6 @@ opentracing
                             "type": "roundrobin"
                         },
                         "uri": "/opentracing"
-                }]],
-                [[{
-                    "node": {
-                        "value": {
-                            "plugins": {
-                            },
-                            "upstream": {
-                                "nodes": {
-                                    "127.0.0.1:1980": 1
-                                },
-                                "type": "roundrobin"
-                            },
-                            "uri": "/opentracing"
-                        },
-                        "key": "/apisix/routes/1"
-                    },
-                    "action": "set"
                 }]]
                 )