~ubuntu-branches/ubuntu/natty/nginx/natty-updates

« back to all changes in this revision

Viewing changes to debian/modules/nginx-lua/t/017-exec.t

  • Committer: Bazaar Package Importer
  • Author(s): Michael Lustfield, Micheal Lustfield, Kartik Mistry
  • Date: 2011-03-03 23:39:07 UTC
  • mfrom: (4.2.29 sid)
  • Revision ID: james.westby@ubuntu.com-20110303233907-y48yifhfnn5qjuxz
Tags: 0.8.54-4
[Micheal Lustfield]
* debian/nginx-{full,light,extras}.default:
  + Added comment about alternative to ULIMIT.
* debian/nginx-{full,light,extras}.init.d:
  + Added quotes around a test variable. (Closes: #610946, LP: #699736)
* debian/patches/609343-log-time-iso8601.diff:
  + Added patch to add $time_iso8601 variable to logs. (Closes: #609343)
* Clean up old logrotate files. (Closes: #608983, Closes: #610289)
  + Added Files:
    - debian/nginx-common.preinst
  + Modified Files:
    - debian/rules
  + Moved debian/nginx-common.logrotate to debian/logrotate.
* Added common files to nginx-common package. (Closes: #610290)
  + Removed Files:
    - debian/nginx-full.dirs
    - debian/nginx-light.dirs
    - debian/nginx-full.install
    - debian/nginx-light.install
    - debian/nginx-extras.install
    - debian/nginx.*
  + Added Files:
    - debian/nginx-common.default
    - debian/nginx-common.dirs
    - debian/nginx-common.init.d
    - debian/nginx-common.install
    - debian/nginx-common.manpages
    - debian/logrotate
  + Modified Files:
    - debian/nginx-extras.dirs
    - debian/control
    - debian/rules
* debian/nginx-*.install: (Closes: #609797)
  + Removed NEWS.Debian from nginx-{full,light,extras}.install.
  + Added NEWS.Debian to nginx-common.install.
* nginx-common.postinst:
  + Enforce /var/log/nginx mode and user:group. (Closes: #610983)
  + Enforce /var/log/nginx/*.log mode and user:group. (Closes: #612832)
* debian/rules:
  + Added --with-file-aio to nginx-extras. (Closes: #613175)
  + Removed split clients and user id modules from nginx-light.
* debian/conf/sites-available/default:
  + Fixed a minor typo ( s/Quickstart/QuickStart/ ). (Closes: #613355)
* debian/conf/mime.types:
  + Changed xml type to application/xhtml+xml. (Closes: #613851)
* debian/help/docs/fcgiwrap:
  + Removed Ubuntu specific line in docs. (Closes: #614987)
* debian/conf/sites-available/default:
  + Fixed a pointer to a file. (Closes: #614980)

[Kartik Mistry]
* debian/*.lintian-overrides:
  + Add Lintian overrides for nginx man page. We've manpage in nginx-common
    binary

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vim:set ft= ts=4 sw=4 et fdm=marker:
 
2
 
 
3
use lib 'lib';
 
4
use Test::Nginx::Socket;
 
5
 
 
6
repeat_each(2);
 
7
 
 
8
plan tests => blocks() * repeat_each() * 2;
 
9
 
 
10
#no_diff();
 
11
#no_long_string();
 
12
 
 
13
run_tests();
 
14
 
 
15
__DATA__
 
16
 
 
17
=== TEST 1: sanity
 
18
--- config
 
19
    location /read {
 
20
        content_by_lua '
 
21
            ngx.exec("/hi");
 
22
            ngx.say("Hi");
 
23
        ';
 
24
    }
 
25
    location /hi {
 
26
        echo "Hello";
 
27
    }
 
28
--- request
 
29
GET /read
 
30
--- response_body
 
31
Hello
 
32
 
 
33
 
 
34
 
 
35
=== TEST 2: empty uri arg
 
36
--- config
 
37
    location /read {
 
38
        content_by_lua '
 
39
            ngx.exec("");
 
40
            ngx.say("Hi");
 
41
        ';
 
42
    }
 
43
    location /hi {
 
44
        echo "Hello";
 
45
    }
 
46
--- request
 
47
GET /read
 
48
--- response_body_like: 500 Internal Server Error
 
49
--- error_code: 500
 
50
 
 
51
 
 
52
 
 
53
=== TEST 3: no arg
 
54
--- config
 
55
    location /read {
 
56
        content_by_lua '
 
57
            ngx.exec();
 
58
            ngx.say("Hi");
 
59
        ';
 
60
    }
 
61
    location /hi {
 
62
        echo "Hello";
 
63
    }
 
64
--- request
 
65
GET /read
 
66
--- response_body_like: 500 Internal Server Error
 
67
--- error_code: 500
 
68
 
 
69
 
 
70
 
 
71
=== TEST 4: too many args
 
72
--- config
 
73
    location /read {
 
74
        content_by_lua '
 
75
            ngx.exec(1, 2, 3, 4);
 
76
            ngx.say("Hi");
 
77
        ';
 
78
    }
 
79
    location /hi {
 
80
        echo "Hello";
 
81
    }
 
82
--- request
 
83
GET /read
 
84
--- response_body_like: 500 Internal Server Error
 
85
--- error_code: 500
 
86
 
 
87
 
 
88
 
 
89
=== TEST 5: null uri
 
90
--- config
 
91
    location /read {
 
92
        content_by_lua '
 
93
            ngx.exec(nil)
 
94
            ngx.say("Hi")
 
95
        ';
 
96
    }
 
97
    location /hi {
 
98
        echo "Hello";
 
99
    }
 
100
--- request
 
101
GET /read
 
102
--- response_body_like: 500 Internal Server Error
 
103
--- error_code: 500
 
104
 
 
105
 
 
106
 
 
107
=== TEST 6: user args
 
108
--- config
 
109
    location /read {
 
110
        content_by_lua '
 
111
            ngx.exec("/hi", "Yichun Zhang")
 
112
            ngx.say("Hi")
 
113
        ';
 
114
    }
 
115
    location /hi {
 
116
        echo Hello $query_string;
 
117
    }
 
118
--- request
 
119
GET /read
 
120
--- response_body
 
121
Hello Yichun Zhang
 
122
 
 
123
 
 
124
 
 
125
=== TEST 7: args in uri
 
126
--- config
 
127
    location /read {
 
128
        content_by_lua '
 
129
            ngx.exec("/hi?agentzh")
 
130
            ngx.say("Hi")
 
131
        ';
 
132
    }
 
133
    location /hi {
 
134
        echo Hello $query_string;
 
135
    }
 
136
--- request
 
137
GET /read
 
138
--- response_body
 
139
Hello agentzh
 
140
 
 
141
 
 
142
 
 
143
=== TEST 8: args in uri and user args
 
144
--- config
 
145
    location /read {
 
146
        content_by_lua '
 
147
            ngx.exec("/hi?a=Yichun", "b=Zhang")
 
148
            ngx.say("Hi")
 
149
        ';
 
150
    }
 
151
    location /hi {
 
152
        echo Hello $query_string;
 
153
    }
 
154
--- request
 
155
GET /read
 
156
--- response_body
 
157
Hello a=Yichun&b=Zhang
 
158
 
 
159
 
 
160
 
 
161
=== TEST 9: args in uri and user args
 
162
--- config
 
163
    location /read {
 
164
        content_by_lua '
 
165
            ngx.exec("@hi?a=Yichun", "b=Zhang")
 
166
            ngx.say("Hi")
 
167
        ';
 
168
    }
 
169
    location @hi {
 
170
        echo Hello $query_string;
 
171
    }
 
172
--- request
 
173
GET /read
 
174
--- response_body
 
175
Hello 
 
176