test_proxy.py (1414:5bf805f38a40) test_proxy.py (1465:21454676e14b)
1import re
2import time
3import socket
4import unittest
5from unit.applications.lang.python import TestApplicationPython
6
7
8class TestProxy(TestApplicationPython):

--- 587 unchanged lines hidden (view full) ---

596 self.assertIn(
597 'error',
598 self.conf(
599 [{"action": {"proxy": 'http://[::7080'}}], 'routes'
600 ),
601 'proxy ipv6 invalid 4',
602 )
603
1import re
2import time
3import socket
4import unittest
5from unit.applications.lang.python import TestApplicationPython
6
7
8class TestProxy(TestApplicationPython):

--- 587 unchanged lines hidden (view full) ---

596 self.assertIn(
597 'error',
598 self.conf(
599 [{"action": {"proxy": 'http://[::7080'}}], 'routes'
600 ),
601 'proxy ipv6 invalid 4',
602 )
603
604 @unittest.skip('not yet')
605 def test_proxy_loop(self):
604 def test_proxy_loop(self):
605 self.skip_alerts.extend(
606 [
607 r'socket.*failed',
608 r'accept.*failed',
609 r'new connections are not accepted',
610 ]
611 )
606 self.conf(
607 {
608 "listeners": {
609 "*:7080": {"pass": "routes"},
610 "*:7081": {"pass": "applications/mirror"},
611 "*:7082": {"pass": "routes"},
612 },
613 "routes": [{"action": {"proxy": "http://127.0.0.1:7082"}}],

--- 6 unchanged lines hidden (view full) ---

620 + "/python/mirror",
621 "module": "wsgi",
622 },
623 },
624 }
625 )
626
627 self.get_http10(no_recv=True)
612 self.conf(
613 {
614 "listeners": {
615 "*:7080": {"pass": "routes"},
616 "*:7081": {"pass": "applications/mirror"},
617 "*:7082": {"pass": "routes"},
618 },
619 "routes": [{"action": {"proxy": "http://127.0.0.1:7082"}}],

--- 6 unchanged lines hidden (view full) ---

626 + "/python/mirror",
627 "module": "wsgi",
628 },
629 },
630 }
631 )
632
633 self.get_http10(no_recv=True)
634 self.get_http10(read_timeout=1)
628
629if __name__ == '__main__':
630 TestProxy.main()
635
636if __name__ == '__main__':
637 TestProxy.main()