This repository was archived by the owner on Mar 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ server {
8
8
}
9
9
10
10
location /path1 {
11
- set $backend_upstream "https://service2 .myapi.com/v1/path1";
11
+ set $backend_upstream "https://service1 .myapi.com/v1/path1";
12
12
proxy_pass $backend_upstream;
13
13
}
14
14
15
15
location ~ ^/path1/(?<id>.*)$ {
16
- set $backend_upstream "https://service1 .myapi.com/v1/path1/";
16
+ set $backend_upstream "https://service2 .myapi.com/v1/path1/";
17
17
proxy_pass $backend_upstream$id;
18
18
}
19
19
Original file line number Diff line number Diff line change 18
18
expect ( result . code ) . to eq ( 200 )
19
19
end
20
20
it "proxy to service2" do
21
- expect ( result . body ) . to eq ( "https://service2 .myapi.com/v1/path1" )
21
+ expect ( result . body ) . to eq ( "https://service1 .myapi.com/v1/path1" )
22
22
end
23
23
it "response header does not contain nginx version" do
24
24
expect ( result . headers [ :server ] ) . to eq ( "nginx" )
31
31
expect ( result . code ) . to eq ( 200 )
32
32
end
33
33
it "proxy to service1" do
34
- expect ( result . body ) . to eq ( "https://service1 .myapi.com/v1/path1/some_id" )
34
+ expect ( result . body ) . to eq ( "https://service2 .myapi.com/v1/path1/some_id" )
35
35
end
36
36
it "response header does not contain nginx version" do
37
37
expect ( result . headers [ :server ] ) . to eq ( "nginx" )
You can’t perform that action at this time.
0 commit comments