test-nginx
test-nginx copied to clipboard
somewhat array related in line 1102
have a look:
https://travis-ci.org/chipitsine/stream-lua-nginx-module/builds/128381568#L590
is fails in line 1102
# Failed test 'TEST 13: ngx.log() big data - pattern "Undefined subroutine &Test::Base::Filter::ARRAY called at (eval 46) line 1, <DATA> line 1." should match a line in error.log (req 0)'
# at /usr/local/share/perl/5.18.2/Test/Nginx/Socket.pm line 1102.
ok 3 - TEST 13: ngx.log() big data - status code ok
looks like stream is not wrapped in array like http ?
@chipitsine I never saw this before. Are you using the latest git master version of Test::Nginx?
@chipitsine That test case always passes for me, on several different machines:
$ prove -I../test-nginx/lib t/009-log.t
t/009-log.t ..
1..10
# I found ONLY: maybe you're debugging?
ok 1 - TEST 13: ngx.log() big data - status code ok
ok 2 - TEST 13: ngx.log() big data - pattern "(?^:ah{1970}b)" matches a line in error.log (req 0)
ok 3 - TEST 13: ngx.log() big data - status code ok
ok 4 - TEST 13: ngx.log() big data - pattern "(?^:ah{1970}b)" matches a line in error.log (req 1)
# Looks like you planned 10 tests but ran 4.
BTW, to run a single test case, you can just add a --- ONLY line to that test block. No need to manually remove all other test cases in the same file.
Please ensure you have read through my tutorials on Test::Nginx to save your time :)
https://openresty.gitbooks.io/programming-openresty/content/testing/index.html
I install Test::Nginx by the following:
git clone https://github.com/openresty/test-nginx.git cd test-nginx && sudo cpanm . && cd ..