diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2023-11-08 18:37:02 +0000 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2023-11-08 18:37:02 +0000 |
commit | 0b85fe29f7e49c88cab88aa9303d5885fa9c9dd5 (patch) | |
tree | 329ee87058eea8631596c802c23f39b78ad9446b /test/test_static_fallback.py | |
parent | 78c133d0ca3c343135e123a087970837afdebed1 (diff) | |
download | unit-0b85fe29f7e49c88cab88aa9303d5885fa9c9dd5.tar.gz unit-0b85fe29f7e49c88cab88aa9303d5885fa9c9dd5.tar.bz2 |
Tests: 8XXX used as default port range.
After the launch of the project, the testing infrastructure was shared with
nginx project in some cases. To avoid port overlap, a decision was made
to shift the port range for Unit tests. This problem was resolved a long time
ago and is no longer relevant, so it is now safe to use port 8XXX range as the
default, as it is more appropriate for testing purposes.
Diffstat (limited to 'test/test_static_fallback.py')
-rw-r--r-- | test/test_static_fallback.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test_static_fallback.py b/test/test_static_fallback.py index ffc888ab..25e466a3 100644 --- a/test/test_static_fallback.py +++ b/test/test_static_fallback.py @@ -19,8 +19,8 @@ def setup_method_fixture(temp_dir): assert 'success' in client.conf( { "listeners": { - "*:7080": {"pass": "routes"}, - "*:7081": {"pass": "routes"}, + "*:8080": {"pass": "routes"}, + "*:8081": {"pass": "routes"}, }, "routes": [{"action": {"share": f'{assets_dir}$uri'}}], "applications": {}, @@ -108,13 +108,13 @@ def test_static_fallback_proxy(): assert 'success' in client.conf( [ { - "match": {"destination": "*:7081"}, + "match": {"destination": "*:8081"}, "action": {"return": 200}, }, { "action": { "share": "/blah", - "fallback": {"proxy": "http://127.0.0.1:7081"}, + "fallback": {"proxy": "http://127.0.0.1:8081"}, } }, ], @@ -136,11 +136,11 @@ def test_static_fallback_proxy_loop(skip_alert): ) action_update( - {"share": "/blah", "fallback": {"proxy": "http://127.0.0.1:7080"}} + {"share": "/blah", "fallback": {"proxy": "http://127.0.0.1:8080"}} ) client.get(no_recv=True) - assert 'success' in client.conf_delete('listeners/*:7081') + assert 'success' in client.conf_delete('listeners/*:8081') client.get(read_timeout=1) @@ -152,6 +152,6 @@ def test_static_fallback_invalid(): check_error({"share": "/blah", "fallback": ""}) check_error({"return": 200, "fallback": {"share": "/blah"}}) check_error( - {"proxy": "http://127.0.0.1:7081", "fallback": {"share": "/blah"}} + {"proxy": "http://127.0.0.1:8081", "fallback": {"share": "/blah"}} ) check_error({"fallback": {"share": "/blah"}}) |