File tree Expand file tree Collapse file tree 1 file changed +7
-19
lines changed Expand file tree Collapse file tree 1 file changed +7
-19
lines changed Original file line number Diff line number Diff line change @@ -16,39 +16,28 @@ our $http_config = <<'_EOC_';
16
16
}
17
17
_EOC_
18
18
19
- worker_connections(128);
20
19
run_tests();
21
20
22
- no_diff();
23
-
24
21
__DATA__
25
22
26
23
=== TEST 1: sanity
27
- --- http_config
28
- upstream database {
29
- postgres_server 127.0.0.1:$TEST_NGINX_POSTGRESQL_PORT
30
- dbname=ngx_test user=ngx_test password=ngx_test;
31
- }
32
-
33
- server {
34
- listen 8100;
35
-
36
- location / {
37
- echo -n "it works!";
38
- }
39
- }
24
+ --- http_config eval: $::http_config
40
25
--- config
41
26
location /eval {
42
27
eval_subrequest_in_memory off;
43
28
44
29
eval $backend {
45
30
postgres_pass database;
46
- postgres_query "select 'http ://127.0.0.1:8100 '";
31
+ postgres_query "select '$scheme ://127.0.0.1:$server_port/echo '";
47
32
postgres_output value 0 0;
48
33
}
49
34
50
35
proxy_pass $backend;
51
36
}
37
+
38
+ location /echo {
39
+ echo -n "it works!";
40
+ }
52
41
--- request
53
42
GET /eval
54
43
--- error_code: 200
@@ -57,7 +46,7 @@ Content-Type: text/plain
57
46
--- response_body eval
58
47
"it works!"
59
48
--- timeout: 10
60
- --- skip_nginx2 : 3: < 0.8.25 or >= 0.8.42
49
+ --- skip_nginx : 3: < 0.8.25
61
50
62
51
63
52
@@ -83,4 +72,3 @@ Content-Type: text/plain
83
72
--- response_body eval
84
73
"test"
85
74
--- timeout: 10
86
- --- skip_nginx: 3: >= 0.8.42
You can’t perform that action at this time.
0 commit comments