Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

somewhat array related in line 1102 #35

Open
chipitsine opened this issue May 6, 2016 · 3 comments
Open

somewhat array related in line 1102 #35

chipitsine opened this issue May 6, 2016 · 3 comments

Comments

@chipitsine
Copy link
Contributor

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 ?

@agentzh
Copy link
Member

agentzh commented May 6, 2016

@chipitsine I never saw this before. Are you using the latest git master version of Test::Nginx?

@agentzh
Copy link
Member

agentzh commented May 6, 2016

@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

@chipitsine
Copy link
Contributor Author

I install Test::Nginx by the following:

git clone https://github.com/openresty/test-nginx.git
cd test-nginx && sudo cpanm . && cd ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants