test_proxy.py (2055:84cb1ec94bae) test_proxy.py (2073:bc6ad31ce286)
1import re
2import socket
3import time
4
5import pytest
6from conftest import run_process
7from unit.applications.lang.python import TestApplicationPython
8from unit.option import option

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

70 "*:7081": {"pass": "applications/mirror"},
71 },
72 "routes": [{"action": {"proxy": "http://127.0.0.1:7081"}}],
73 "applications": {
74 "mirror": {
75 "type": self.get_application_type(),
76 "processes": {"spare": 0},
77 "path": option.test_dir + "/python/mirror",
1import re
2import socket
3import time
4
5import pytest
6from conftest import run_process
7from unit.applications.lang.python import TestApplicationPython
8from unit.option import option

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

70 "*:7081": {"pass": "applications/mirror"},
71 },
72 "routes": [{"action": {"proxy": "http://127.0.0.1:7081"}}],
73 "applications": {
74 "mirror": {
75 "type": self.get_application_type(),
76 "processes": {"spare": 0},
77 "path": option.test_dir + "/python/mirror",
78 "working_directory": option.test_dir
79 + "/python/mirror",
78 "working_directory": option.test_dir + "/python/mirror",
80 "module": "wsgi",
81 },
82 "custom_header": {
83 "type": self.get_application_type(),
84 "processes": {"spare": 0},
85 "path": option.test_dir + "/python/custom_header",
86 "working_directory": option.test_dir
87 + "/python/custom_header",

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

121 "fourth": [{"action": {"proxy": "http://127.0.0.1:7084"}}],
122 "fifth": [{"action": {"proxy": "http://127.0.0.1:7085"}}],
123 },
124 "applications": {
125 "mirror": {
126 "type": self.get_application_type(),
127 "processes": {"spare": 0},
128 "path": option.test_dir + "/python/mirror",
79 "module": "wsgi",
80 },
81 "custom_header": {
82 "type": self.get_application_type(),
83 "processes": {"spare": 0},
84 "path": option.test_dir + "/python/custom_header",
85 "working_directory": option.test_dir
86 + "/python/custom_header",

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

120 "fourth": [{"action": {"proxy": "http://127.0.0.1:7084"}}],
121 "fifth": [{"action": {"proxy": "http://127.0.0.1:7085"}}],
122 },
123 "applications": {
124 "mirror": {
125 "type": self.get_application_type(),
126 "processes": {"spare": 0},
127 "path": option.test_dir + "/python/mirror",
129 "working_directory": option.test_dir
130 + "/python/mirror",
128 "working_directory": option.test_dir + "/python/mirror",
131 "module": "wsgi",
132 }
133 },
134 }
135 ), 'proxy chain configuration'
136
137 assert self.get_http10()['status'] == 200, 'status'
138

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

497 "*:7082": {"pass": "routes"},
498 },
499 "routes": [{"action": {"proxy": "http://127.0.0.1:7082"}}],
500 "applications": {
501 "mirror": {
502 "type": self.get_application_type(),
503 "processes": {"spare": 0},
504 "path": option.test_dir + "/python/mirror",
129 "module": "wsgi",
130 }
131 },
132 }
133 ), 'proxy chain configuration'
134
135 assert self.get_http10()['status'] == 200, 'status'
136

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

495 "*:7082": {"pass": "routes"},
496 },
497 "routes": [{"action": {"proxy": "http://127.0.0.1:7082"}}],
498 "applications": {
499 "mirror": {
500 "type": self.get_application_type(),
501 "processes": {"spare": 0},
502 "path": option.test_dir + "/python/mirror",
505 "working_directory": option.test_dir
506 + "/python/mirror",
503 "working_directory": option.test_dir + "/python/mirror",
507 "module": "wsgi",
508 },
509 },
510 }
511 )
512
513 self.get_http10(no_recv=True)
514 self.get_http10(read_timeout=1)
504 "module": "wsgi",
505 },
506 },
507 }
508 )
509
510 self.get_http10(no_recv=True)
511 self.get_http10(read_timeout=1)