tzssangglass commented on code in PR #7168:
URL: https://github.com/apache/apisix/pull/7168#discussion_r885396934
##########
t/plugin/proxy-cache/disk.t:
##########
@@ -707,3 +707,54 @@ GET /t
--- error_code: 400
--- response_body eval
qr/failed to check the configuration of plugin proxy-cache err/
+
+
+
+=== TEST 28: nil vars for cache_key
+--- config
+ location /t {
+ content_by_lua_block {
+ local t = require("lib.test_admin").test
+ local code, body = t('/apisix/admin/routes/1',
+ ngx.HTTP_PUT,
+ [[{
+ "plugins": {
+ "proxy-cache": {
+ "cache_key": ["$arg_foo", "$arg_bar",
"$arg_baz"],
+ "cache_zone": "disk_cache_one",
+ "cache_bypass": ["$arg_bypass"],
+ "cache_method": ["GET"],
+ "cache_http_status": [200],
+ "hide_cache_headers": true,
+ "no_cache": ["$arg_no_cache"]
+ }
+ },
+ "upstream": {
+ "nodes": {
+ "127.0.0.1:1986": 1
+ },
+ "type": "roundrobin"
+ },
+ "uri": "/hello*"
+ }]]
+ )
+
+ if code >= 300 then
+ ngx.status = code
+ end
+ ngx.say(body)
+ }
+ }
+--- request
+GET /t
+--- error_code: 200
Review Comment:
we can remove this, it will be checked by default
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]