Skip to content

Commit 8be9855

Browse files
committed
tests: Add a few tests for different http methods
1 parent 8a82914 commit 8be9855

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

t/methods.t

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
use strict;
2+
use warnings;
3+
4+
use File::Basename qw(dirname);
5+
6+
use lib dirname(__FILE__) . "/lib";
7+
8+
use Test::Nginx::Socket tests => 2;
9+
use Test::More;
10+
use Test::Nginx::UploadModule;
11+
12+
no_long_string();
13+
no_shuffle();
14+
run_tests();
15+
16+
__DATA__
17+
=== TEST 1: OPTIONS request
18+
--- config
19+
location /upload/ {
20+
upload_pass @upstream;
21+
upload_resumable on;
22+
upload_set_form_field "upload_tmp_path" "$upload_tmp_path";
23+
upload_cleanup 400 404 499 500-505;
24+
}
25+
--- request
26+
OPTIONS /upload/
27+
--- error_code: 200
28+
29+
=== TEST 2: http2 OPTIONS request
30+
--- http2
31+
--- config
32+
location /upload/ {
33+
upload_pass @upstream;
34+
upload_resumable on;
35+
upload_set_form_field "upload_tmp_path" "$upload_tmp_path";
36+
upload_cleanup 400 404 499 500-505;
37+
}
38+
--- request
39+
OPTIONS /upload/
40+
--- error_code: 200

0 commit comments

Comments
 (0)