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

« back to all changes in this revision

Viewing changes to debian/modules/nginx-lua/t/015-status.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
#worker_connections(1014);
 
7
#master_process_enabled(1);
 
8
#log_level('warn');
 
9
 
 
10
#repeat_each(120);
 
11
repeat_each(1);
 
12
 
 
13
plan tests => blocks() * repeat_each() * 2;
 
14
 
 
15
#no_diff();
 
16
#no_long_string();
 
17
 
 
18
run_tests();
 
19
 
 
20
__DATA__
 
21
 
 
22
=== TEST 1: no key found
 
23
--- config
 
24
    location /nil {
 
25
        content_by_lua '
 
26
            ngx.say(ngx.blah_blah == nil and "nil" or "not nil")
 
27
        ';
 
28
    }
 
29
--- request
 
30
GET /nil
 
31
--- response_body
 
32
nil
 
33
 
 
34
 
 
35
 
 
36
=== TEST 2: .status found
 
37
--- config
 
38
    location /nil {
 
39
        content_by_lua '
 
40
            ngx.say(ngx.status == nil and "nil" or "not nil")
 
41
        ';
 
42
    }
 
43
--- request
 
44
GET /nil
 
45
--- response_body
 
46
not nil
 
47
 
 
48
 
 
49
 
 
50
=== TEST 3: default to 0
 
51
--- config
 
52
    location /nil {
 
53
        content_by_lua '
 
54
            ngx.say(ngx.status);
 
55
        ';
 
56
    }
 
57
--- request
 
58
GET /nil
 
59
--- response_body
 
60
0
 
61
 
 
62
 
 
63
 
 
64
=== TEST 4: default to 0
 
65
--- config
 
66
    location /nil {
 
67
        content_by_lua '
 
68
            ngx.say("blah");
 
69
            ngx.say(ngx.status);
 
70
        ';
 
71
    }
 
72
--- request
 
73
GET /nil
 
74
--- response_body
 
75
blah
 
76
200
 
77
 
 
78
 
 
79
 
 
80
=== TEST 5: set 201
 
81
--- config
 
82
    location /201 {
 
83
        content_by_lua '
 
84
            ngx.status = 201;
 
85
            ngx.say("created");
 
86
        ';
 
87
    }
 
88
--- request
 
89
GET /201
 
90
--- response_body
 
91
created
 
92
--- error_code: 201
 
93
 
 
94
 
 
95
 
 
96
=== TEST 6: set "201"
 
97
--- config
 
98
    location /201 {
 
99
        content_by_lua '
 
100
            ngx.status = "201";
 
101
            ngx.say("created");
 
102
        ';
 
103
    }
 
104
--- request
 
105
GET /201
 
106
--- response_body
 
107
created
 
108
--- error_code: 201
 
109
 
 
110
 
 
111
 
 
112
=== TEST 7: set "201.7"
 
113
--- config
 
114
    location /201 {
 
115
        content_by_lua '
 
116
            ngx.status = "201.7";
 
117
            ngx.say("created");
 
118
        ';
 
119
    }
 
120
--- request
 
121
GET /201
 
122
--- response_body
 
123
created
 
124
--- error_code: 201
 
125
 
 
126
 
 
127
 
 
128
=== TEST 8: set "abc"
 
129
--- config
 
130
    location /201 {
 
131
        content_by_lua '
 
132
            ngx.status = "abc";
 
133
            ngx.say("created");
 
134
        ';
 
135
    }
 
136
--- request
 
137
GET /201
 
138
--- response_body_like: 500 Internal Server Error
 
139
--- error_code: 500
 
140
 
 
141
 
 
142
 
 
143
=== TEST 9: set blah
 
144
--- config
 
145
    location /201 {
 
146
        content_by_lua '
 
147
            ngx.blah = 201;
 
148
            ngx.say("created");
 
149
        ';
 
150
    }
 
151
--- request
 
152
GET /201
 
153
--- response_body_like: 500 Internal Server Error
 
154
--- error_code: 500
 
155