diff options
| author | Andrei Belov <defan@nginx.com> | 2020-04-16 18:27:26 +0300 |
|---|---|---|
| committer | Andrei Belov <defan@nginx.com> | 2020-04-16 18:27:26 +0300 |
| commit | 74f32d26b91f49d3392605e81c1597b375890b60 (patch) | |
| tree | adfc67dfc86461441bde65512f745ce27bd6ea28 /test/test_routing_tls.py | |
| parent | 2ff9df10ef1df43c935c870175e52473dad2c21a (diff) | |
| parent | 9877087756144d3bdf343d0d4e91e1efbcc62c93 (diff) | |
| download | unit-1.17.0-1.tar.gz unit-1.17.0-1.tar.bz2 | |
Merged with the default branch.1.17.0-1
Diffstat (limited to 'test/test_routing_tls.py')
| -rw-r--r-- | test/test_routing_tls.py | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/test/test_routing_tls.py b/test/test_routing_tls.py index c6648095..36bd9057 100644 --- a/test/test_routing_tls.py +++ b/test/test_routing_tls.py @@ -2,9 +2,9 @@ from unit.applications.tls import TestApplicationTLS class TestRoutingTLS(TestApplicationTLS): - prerequisites = {'modules': ['python', 'openssl']} + prerequisites = {'modules': ['openssl']} - def test_routes_match_scheme(self): + def test_routes_match_scheme_tls(self): self.certificate() self.assertIn( @@ -21,35 +21,21 @@ class TestRoutingTLS(TestApplicationTLS): "routes": [ { "match": {"scheme": "http"}, - "action": {"pass": "applications/empty"}, + "action": {"return": 200}, }, { "match": {"scheme": "https"}, - "action": {"pass": "applications/204_no_content"}, + "action": {"return": 201}, }, ], - "applications": { - "empty": { - "type": "python", - "processes": {"spare": 0}, - "path": self.current_dir + "/python/empty", - "module": "wsgi", - }, - "204_no_content": { - "type": "python", - "processes": {"spare": 0}, - "path": self.current_dir - + "/python/204_no_content", - "module": "wsgi", - }, - }, + "applications": {}, } ), 'scheme configure', ) self.assertEqual(self.get()['status'], 200, 'http') - self.assertEqual(self.get_ssl(port=7081)['status'], 204, 'https') + self.assertEqual(self.get_ssl(port=7081)['status'], 201, 'https') if __name__ == '__main__': |
