apisix/t/core-utils.t

26 lines
484 B
Perl

use t::APISix 'no_plan';
repeat_each(1);
no_long_string();
no_root_location();
log_level("info");
run_tests;
__DATA__
=== TEST 1: sanity
--- config
location /t {
content_by_lua_block {
local get_seed = require("apisix.core.utils").get_seed_from_urandom
ngx.say("random seed ", get_seed())
ngx.say("twice: ", get_seed() == get_seed())
}
}
--- request
GET /t
--- response_body_like eval
qr/random seed \d+\ntwice: false/