Skip to content

Commit

Permalink
Fix the problem of missing category in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
smileby committed Dec 29, 2023
1 parent 193b798 commit f2e0fc2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions t/admin/global-rules.t
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ passed
}
}
--- response_body
{"key":"/apisix/global_rules/1","value":{"id":"1","plugins":{"proxy-rewrite":{"uri":"/","use_real_request_uri_unsafe":false}}}}
{"key":"/apisix/global_rules/1","value":{"id":"1","plugins":{"proxy-rewrite":{"category":"Transformation","uri":"/","use_real_request_uri_unsafe":false}}}}
--- request
GET /t

Expand Down Expand Up @@ -439,7 +439,7 @@ GET /t
}
}
--- response_body
{"key":"/apisix/global_rules/1","value":{"id":"1","plugins":{"proxy-rewrite":{"uri":"/","use_real_request_uri_unsafe":false}}}}
{"key":"/apisix/global_rules/1","value":{"id":"1","plugins":{"category":"Transformation","proxy-rewrite":{"uri":"/","use_real_request_uri_unsafe":false}}}}
--- request
GET /t

Expand Down Expand Up @@ -474,7 +474,7 @@ GET /t
}
}
--- response_body
{"key":"/apisix/global_rules/1","value":{"id":"1","plugins":{"proxy-rewrite":{"uri":"/","use_real_request_uri_unsafe":false}}}}
{"key":"/apisix/global_rules/1","value":{"id":"1","plugins":{"category":"Transformation","proxy-rewrite":{"uri":"/","use_real_request_uri_unsafe":false}}}}
--- request
GET /t

Expand Down
2 changes: 1 addition & 1 deletion t/admin/global-rules2.t
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ __DATA__
}
}
--- response_body
{"key":"/apisix/global_rules/1","value":{"id":"1","plugins":{"proxy-rewrite":{"uri":"/","use_real_request_uri_unsafe":false}}}}
{"key":"/apisix/global_rules/1","value":{"id":"1","plugins":{"proxy-rewrite":{"category":"Transformation","uri":"/","use_real_request_uri_unsafe":false}}}}
Expand Down
2 changes: 1 addition & 1 deletion t/control/services.t
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ services:
}
}
--- response_body
{"id":"5","plugins":{"limit-count":{"allow_degradation":false,"count":2,"key":"remote_addr","key_type":"var","policy":"local","rejected_code":503,"show_limit_quota_header":true,"time_window":60}},"upstream":{"hash_on":"vars","nodes":[{"host":"127.0.0.1","port":1980,"weight":1}],"pass_host":"pass","scheme":"http","type":"roundrobin"}}
{"id":"5","plugins":{"limit-count":{"allow_degradation":false,"category":"Traffic","count":2,"key":"remote_addr","key_type":"var","policy":"local","rejected_code":503,"show_limit_quota_header":true,"time_window":60}},"upstream":{"hash_on":"vars","nodes":[{"host":"127.0.0.1","port":1980,"weight":1}],"pass_host":"pass","scheme":"http","type":"roundrobin"}}
Expand Down
2 changes: 1 addition & 1 deletion t/plugin/ip-restriction.t
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ __DATA__
--- request
GET /t
--- response_body
{"message":"Your IP address is not allowed","whitelist":["10.255.254.0/24","192.168.0.0/16"]}
{"category":"Security","message":"Your IP address is not allowed","whitelist":["10.255.254.0/24","192.168.0.0/16"]}
Expand Down

0 comments on commit f2e0fc2

Please sign in to comment.