File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -437,7 +437,43 @@ qr/.*\/specific_status.*/
437437
438438
439439
440- === TEST 20: invalid x-request-id should not crash
440+ === TEST 20: recreate route for invalid x-request-id test
441+ --- config
442+ location /t {
443+ content_by_lua_block {
444+ local t = require("lib.test_admin").test
445+ local code, body = t('/apisix/admin/routes/1',
446+ ngx.HTTP_PUT,
447+ [[{
448+ "plugins": {
449+ "opentelemetry": {
450+ "sampler": {
451+ "name": "always_on"
452+ }
453+ }
454+ },
455+ "upstream": {
456+ "nodes": {
457+ "127.0.0.1:1980": 1
458+ },
459+ "type": "roundrobin"
460+ },
461+ "uri": "/opentracing"
462+ }]]
463+ )
464+
465+ if code >= 300 then
466+ ngx.status = code
467+ end
468+ ngx.say(body)
469+ }
470+ }
471+ --- request
472+ GET /t
473+
474+
475+
476+ === TEST 21: invalid x-request-id should not crash
441477--- request
442478GET /opentracing
443479--- more_headers
@@ -446,4 +482,4 @@ X-Request-Id: 550e8400-e29b-41d4-a716-446655440000
446482--- response_body
447483opentracing
448484--- no_error_log
449- [error]
485+ [error]
You can’t perform that action at this time.
0 commit comments