Changeset 1546:0902a4539c99 in nginx-tests


Ignore:
Timestamp:
01/17/20 19:36:34 (5 weeks ago)
Author:
Sergey Kandaurov <pluknet@…>
Branch:
default
Phase:
public
Message:

Tests: added rewrite "break" directive test for valid location.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rewrite.t

    r1535 r1546  
    2222select STDOUT; $| = 1;
    2323
    24 my $t = Test::Nginx->new()->has(qw/http rewrite/)->plan(22)
     24my $t = Test::Nginx->new()->has(qw/http rewrite proxy/)->plan(23)
    2525        ->write_file_expand('nginx.conf', <<'EOF');
    2626
     
    130130            rewrite ^(.*) $1?c=$1;
    131131            return 200 "uri:$uri args:$args";
     132        }
     133
     134        location /break {
     135            rewrite ^ /return200;
     136            break;
     137            proxy_pass http://127.0.0.1:8080/return204;
    132138        }
    133139    }
     
    232238        'escape with added args');
    233239
    234 ###############################################################################
     240# break
     241
     242TODO: {
     243local $TODO = 'not yet' unless $t->has_version('1.17.8');
     244
     245like(http_get('/break'), qr/200/, 'valid_location reset');
     246
     247}
     248
     249###############################################################################
Note: See TracChangeset for help on using the changeset viewer.