Skip to content

Commit

Permalink
request_start_time: add testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
drawing committed Nov 9, 2023
1 parent e2be2f9 commit c562d36
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/test-nginx/cases/req-start-time-variable.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -*- mode: conf -*-
# vim:set ft= ts=4 sw=4 et fdm=marker:

use lib 'lib';
use Test::Nginx::Socket::Lua;

log_level('warn');

repeat_each(2);

plan tests => repeat_each() * (blocks() * 3);

no_long_string();
run_tests();

__DATA__

=== TEST 1: start time
--- config
location = /start {
return 200 $request_start_time;
}
--- request
GET /start
--- response_body_like: ^\d\d/[A-Z][a-z]{2}/\d{4}:\d\d:\d\d:\d\d [+-]\d{4}$
--- no_error_log
[error]

0 comments on commit c562d36

Please sign in to comment.