asyncioproxy-ticket
Last change
on this file since e3e0de1 was
e3e0de1,
checked in by Fiona Klute <fiona.klute@…>, 2 years ago
|
https-test-client.py: Make host and port configurable per connection
Both variables can use environment variables. If unset they default to
TEST_TARGET and TEST_PORT. This makes it possible to connect to
different servers in one test, for example in proxy tests to check
that the backend server is behaving as expected.
|
-
Property mode set to
100644
|
File size:
725 bytes
|
Line | |
---|
1 | # The reverse proxy can't access the backend (certificate validation |
---|
2 | # fails) |
---|
3 | - !connection |
---|
4 | gnutls_params: |
---|
5 | - x509cafile=authority/x509.pem |
---|
6 | actions: |
---|
7 | - !request |
---|
8 | path: /proxy/test.txt |
---|
9 | expect: |
---|
10 | status: 502 |
---|
11 | body: |
---|
12 | contains: |
---|
13 | - 'Proxy Error' |
---|
14 | - 'Error reading from remote server' |
---|
15 | |
---|
16 | # Check if the proxy itself works correctly and presents the expected |
---|
17 | # bad certificate |
---|
18 | - !connection |
---|
19 | host: '${BACKEND_HOST}' |
---|
20 | port: '${BACKEND_PORT}' |
---|
21 | gnutls_params: |
---|
22 | - x509cafile=authority/x509.pem |
---|
23 | - verify-hostname=imposter.example |
---|
24 | actions: |
---|
25 | - !request |
---|
26 | path: /test.txt |
---|
27 | expect: |
---|
28 | status: 200 |
---|
29 | body: |
---|
30 | exactly: | |
---|
31 | test |
---|
Note: See
TracBrowser
for help on using the repository browser.