diff options
author | Andrei Belov <defan@nginx.com> | 2020-05-28 18:13:06 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2020-05-28 18:13:06 +0300 |
commit | 733c14e991d6b2d5bdae5202ae9f090d022bc956 (patch) | |
tree | 120562db5d30e5f4f51d001397f765f5cebab999 /test/test_share_fallback.py | |
parent | 6a8d4571d7fc89a951b4da80c39a93fcaa634406 (diff) | |
parent | 9d8e476c4e3695019b0a1fe3696d3411a8393de6 (diff) | |
download | unit-733c14e991d6b2d5bdae5202ae9f090d022bc956.tar.gz unit-733c14e991d6b2d5bdae5202ae9f090d022bc956.tar.bz2 |
Merged with the default branch.
Diffstat (limited to 'test/test_share_fallback.py')
-rw-r--r-- | test/test_share_fallback.py | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/test/test_share_fallback.py b/test/test_share_fallback.py index c51e43ee..ca5e2678 100644 --- a/test/test_share_fallback.py +++ b/test/test_share_fallback.py @@ -1,5 +1,5 @@ import os -import unittest + from unit.applications.proto import TestApplicationProto @@ -125,18 +125,23 @@ class TestStatic(TestApplicationProto): self.assertEqual(resp['status'], 200, 'fallback proxy status') self.assertEqual(resp['body'], '', 'fallback proxy') - @unittest.skip('not yet') - def test_fallback_proxy_cycle(self): + def test_fallback_proxy_loop(self): + self.skip_alerts.extend( + [ + r'open.*/blah/index.html.*failed', + r'accept.*failed', + r'socket.*failed', + r'new connections are not accepted', + ] + ) + self.action_update( - { - "share": "/blah", - "fallback": {"proxy": "http://127.0.0.1:7080"}, - } + {"share": "/blah", "fallback": {"proxy": "http://127.0.0.1:7080"}} ) - self.assertNotEqual(self.get()['status'], 200, 'fallback cycle') + self.get(no_recv=True) self.assertIn('success', self.conf_delete('listeners/*:7081')) - self.assertNotEqual(self.get()['status'], 200, 'fallback cycle 2') + self.get(read_timeout=1) def test_fallback_invalid(self): def check_error(conf): |