Skip to content

Commit

Permalink
added a test for set_rotate: current value persistency is per location.
Browse files Browse the repository at this point in the history
  • Loading branch information
agentzh committed Apr 17, 2012
1 parent 9792e8d commit 1c8e3ef
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions t/rotate.t
Expand Up @@ -221,3 +221,51 @@ a = 2
--- no_error_log
[error]
=== TEST 9: value persistence is per-location
--- config
location /incr {
set_rotate $a 0 2;
echo "a = $a";
}
location /incr2 {
set_rotate $a 0 2;
echo "a = $a";
}
location /t {
echo_location /incr;
echo_location /incr2;
echo_location /incr;
echo_location /incr2;
echo_location /incr;
echo_location /incr2;
echo_location /incr;
echo_location /incr2;
echo_location /incr;
echo_location /incr2;
echo_location /incr;
echo_location /incr2;
}
--- request
GET /t
--- response_body
a = 0
a = 0
a = 1
a = 1
a = 2
a = 2
a = 0
a = 0
a = 1
a = 1
a = 2
a = 2
--- no_error_log
[error]

0 comments on commit 1c8e3ef

Please sign in to comment.