~spuul/nginx/trunk

« back to all changes in this revision

Viewing changes to debian/modules/nginx-lua/t/014-bugs.t

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-02-15 03:05:42 UTC
  • mfrom: (4.3.10 sid)
  • Revision ID: package-import@ubuntu.com-20140215030542-71ubtowl24vf7nfn
Tags: 1.4.5-1ubuntu1
* Resynchronise with Debian (LP: #1280511).  Remaining changes:
  - debian/patches/ubuntu-branding.patch:
    + Add Ubuntu branding to server_tokens.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# vim:set ft= ts=4 sw=4 et fdm=marker:
2
2
 
3
3
use lib 'lib';
4
 
use Test::Nginx::Socket;
 
4
use Test::Nginx::Socket::Lua;
5
5
 
6
6
#worker_connections(1014);
7
7
#master_on();
9
9
 
10
10
repeat_each(3);
11
11
 
12
 
plan tests => repeat_each() * (blocks() * 2 + 23);
 
12
plan tests => repeat_each() * (blocks() * 2 + 25);
13
13
 
14
14
our $HtmlDir = html_dir;
15
15
#warn $html_dir;
18
18
#no_long_string();
19
19
 
20
20
$ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211;
 
21
$ENV{TEST_NGINX_RESOLVER} ||= '8.8.8.8';
21
22
 
22
23
#no_shuffle();
23
24
no_long_string();
698
699
=== TEST 32: hang on upstream_next (from kindy)
699
700
--- http_config
700
701
    upstream xx {
701
 
        server 127.0.0.1:$TEST_NGINX_SERVER_PORT;
702
 
        server 127.0.0.1:$TEST_NGINX_SERVER_PORT;
 
702
        server 127.0.0.1:$TEST_NGINX_SERVER_PORT max_fails=5;
 
703
        server 127.0.0.1:$TEST_NGINX_SERVER_PORT max_fails=5;
703
704
    }
704
705
 
705
706
    server {
710
711
    }
711
712
--- config
712
713
    location = /t {
 
714
        proxy_next_upstream off;
713
715
        proxy_pass http://xx;
714
716
    }
715
 
 
716
 
    location = /bad {
717
 
        return 444;
718
 
    }
719
717
--- request
720
718
    GET /t
721
719
--- timeout: 1
814
812
not-exist.agentzh.org could not be resolved
815
813
--- timeout: 3
816
814
 
 
815
 
 
816
 
 
817
=== TEST 36: line comments in the last line of the inlined Lua code
 
818
--- config
 
819
    location /lua {
 
820
        content_by_lua 'ngx.say("ok") -- blah';
 
821
    }
 
822
--- request
 
823
GET /lua
 
824
--- response_body
 
825
ok
 
826
--- no_error_log
 
827
[error]
 
828
 
 
829
 
 
830
 
 
831
=== TEST 37: resolving names with a trailing dot
 
832
--- http_config eval
 
833
    "lua_package_path '$::HtmlDir/?.lua;./?.lua';"
 
834
--- config
 
835
    location /t {
 
836
        resolver $TEST_NGINX_RESOLVER;
 
837
        set $myhost 'agentzh.org.';
 
838
        proxy_pass http://$myhost/misc/.vimrc;
 
839
    }
 
840
--- request
 
841
GET /t
 
842
--- response_body_like: An example for a vimrc file
 
843
--- no_error_log
 
844
[error]
 
845