diff options
Diffstat (limited to '')
-rw-r--r-- | test/test_access_log.py | 4 | ||||
-rw-r--r-- | test/test_configuration.py | 16 | ||||
-rw-r--r-- | test/test_php_basic.py | 18 | ||||
-rw-r--r-- | test/test_python_basic.py | 18 | ||||
-rw-r--r-- | test/test_tls.py | 11 | ||||
-rw-r--r-- | test/unit/applications/lang/go.py | 2 | ||||
-rw-r--r-- | test/unit/applications/lang/java.py | 2 | ||||
-rw-r--r-- | test/unit/applications/lang/node.py | 2 | ||||
-rw-r--r-- | test/unit/applications/lang/perl.py | 2 | ||||
-rw-r--r-- | test/unit/applications/lang/php.py | 2 | ||||
-rw-r--r-- | test/unit/applications/lang/python.py | 2 | ||||
-rw-r--r-- | test/unit/applications/lang/ruby.py | 2 | ||||
-rw-r--r-- | test/unit/applications/tls.py | 2 |
13 files changed, 44 insertions, 39 deletions
diff --git a/test/test_access_log.py b/test/test_access_log.py index c9588e61..f1dae8ea 100644 --- a/test/test_access_log.py +++ b/test/test_access_log.py @@ -92,7 +92,7 @@ Connection: close def test_access_log_ipv6(self): self.load('empty') - self.conf({"[::1]:7080": {"application": "empty"}}, 'listeners') + self.conf({"[::1]:7080": {"pass": "applications/empty"}}, 'listeners') self.get(sock_type='ipv6') @@ -110,7 +110,7 @@ Connection: close addr = self.testdir + '/sock' - self.conf({"unix:" + addr: {"application": "empty"}}, 'listeners') + self.conf({"unix:" + addr: {"pass": "applications/empty"}}, 'listeners') self.get(sock_type='unix', addr=addr) diff --git a/test/test_configuration.py b/test/test_configuration.py index 74596ed8..51c6f6a2 100644 --- a/test/test_configuration.py +++ b/test/test_configuration.py @@ -200,7 +200,7 @@ class TestConfiguration(TestControl): def test_listeners_no_app(self): self.assertIn( 'error', - self.conf({"*:7080": {"application": "app"}}, 'listeners'), + self.conf({"*:7080": {"pass": "applications/app"}}, 'listeners'), 'listeners no app', ) @@ -209,7 +209,7 @@ class TestConfiguration(TestControl): 'success', self.conf( { - "listeners": {"*:7080": {"application": "app"}}, + "listeners": {"*:7080": {"pass": "applications/app"}}, "applications": { "app": { "type": "python", @@ -228,7 +228,7 @@ class TestConfiguration(TestControl): 'success', self.conf( { - "listeners": {"127.0.0.1:7080": {"application": "app"}}, + "listeners": {"127.0.0.1:7080": {"pass": "applications/app"}}, "applications": { "app": { "type": "python", @@ -247,7 +247,7 @@ class TestConfiguration(TestControl): 'success', self.conf( { - "listeners": {"[::1]:7080": {"application": "app"}}, + "listeners": {"[::1]:7080": {"pass": "applications/app"}}, "applications": { "app": { "type": "python", @@ -274,7 +274,7 @@ class TestConfiguration(TestControl): 'error', self.conf( { - "listeners": {"127.0.0.1": {"application": "app"}}, + "listeners": {"127.0.0.1": {"pass": "applications/app"}}, "applications": { "app": { "type": "python", @@ -295,7 +295,7 @@ class TestConfiguration(TestControl): 'success', self.conf( { - "listeners": {"*:7080": {"application": name}}, + "listeners": {"*:7080": {"pass": "applications/" + name}}, "applications": { name: { "type": "python", @@ -327,7 +327,7 @@ class TestConfiguration(TestControl): for a in range(apps) }, "listeners": { - "*:" + str(7000 + a): {"application": "app-" + str(a)} + "*:" + str(7000 + a): {"pass": "applications/app-" + str(a)} for a in range(apps) }, } @@ -350,7 +350,7 @@ class TestConfiguration(TestControl): } for a in range(999) }, - "listeners": {"*:7001": {"application": "app-1"}}, + "listeners": {"*:7001": {"pass": "applications/app-1"}}, } self.assertIn('success', self.conf(conf)) diff --git a/test/test_php_basic.py b/test/test_php_basic.py index d579afee..02ff81de 100644 --- a/test/test_php_basic.py +++ b/test/test_php_basic.py @@ -14,7 +14,7 @@ class TestPHPBasic(TestControl): } conf_basic = { - "listeners": {"*:7080": {"application": "app"}}, + "listeners": {"*:7080": {"pass": "applications/app"}}, "applications": conf_app, } @@ -82,7 +82,7 @@ class TestPHPBasic(TestControl): self.assertEqual( self.conf_get()['listeners'], - {"*:7080": {"application": "app"}}, + {"*:7080": {"pass": "applications/app"}}, 'listeners', ) @@ -91,7 +91,7 @@ class TestPHPBasic(TestControl): self.assertEqual( self.conf_get('listeners'), - {"*:7080": {"application": "app"}}, + {"*:7080": {"pass": "applications/app"}}, 'listeners prefix', ) @@ -100,29 +100,29 @@ class TestPHPBasic(TestControl): self.assertEqual( self.conf_get('listeners/*:7080'), - {"application": "app"}, + {"pass": "applications/app"}, 'listeners prefix 2', ) def test_php_change_listener(self): self.conf(self.conf_basic) - self.conf({"*:7081": {"application": "app"}}, 'listeners') + self.conf({"*:7081": {"pass": "applications/app"}}, 'listeners') self.assertEqual( self.conf_get('listeners'), - {"*:7081": {"application": "app"}}, + {"*:7081": {"pass": "applications/app"}}, 'change listener', ) def test_php_add_listener(self): self.conf(self.conf_basic) - self.conf({"application": "app"}, 'listeners/*:7082') + self.conf({"pass": "applications/app"}, 'listeners/*:7082') self.assertEqual( self.conf_get('listeners'), { - "*:7080": {"application": "app"}, - "*:7082": {"application": "app"}, + "*:7080": {"pass": "applications/app"}, + "*:7082": {"pass": "applications/app"}, }, 'add listener', ) diff --git a/test/test_python_basic.py b/test/test_python_basic.py index c425718d..9987e886 100644 --- a/test/test_python_basic.py +++ b/test/test_python_basic.py @@ -14,7 +14,7 @@ class TestPythonBasic(TestControl): } conf_basic = { - "listeners": {"*:7080": {"application": "app"}}, + "listeners": {"*:7080": {"pass": "applications/app"}}, "applications": conf_app, } @@ -95,7 +95,7 @@ class TestPythonBasic(TestControl): self.assertEqual( self.conf_get()['listeners'], - {"*:7080": {"application": "app"}}, + {"*:7080": {"pass": "applications/app"}}, 'listeners', ) @@ -104,7 +104,7 @@ class TestPythonBasic(TestControl): self.assertEqual( self.conf_get('listeners'), - {"*:7080": {"application": "app"}}, + {"*:7080": {"pass": "applications/app"}}, 'listeners prefix', ) @@ -113,29 +113,29 @@ class TestPythonBasic(TestControl): self.assertEqual( self.conf_get('listeners/*:7080'), - {"application": "app"}, + {"pass": "applications/app"}, 'listeners prefix 2', ) def test_python_change_listener(self): self.conf(self.conf_basic) - self.conf({"*:7081": {"application": "app"}}, 'listeners') + self.conf({"*:7081": {"pass": "applications/app"}}, 'listeners') self.assertEqual( self.conf_get('listeners'), - {"*:7081": {"application": "app"}}, + {"*:7081": {"pass": "applications/app"}}, 'change listener', ) def test_python_add_listener(self): self.conf(self.conf_basic) - self.conf({"application": "app"}, 'listeners/*:7082') + self.conf({"pass": "applications/app"}, 'listeners/*:7082') self.assertEqual( self.conf_get('listeners'), { - "*:7080": {"application": "app"}, - "*:7082": {"application": "app"}, + "*:7080": {"pass": "applications/app"}, + "*:7082": {"pass": "applications/app"}, }, 'add listener', ) diff --git a/test/test_tls.py b/test/test_tls.py index 573e4ae1..5b669ddf 100644 --- a/test/test_tls.py +++ b/test/test_tls.py @@ -18,12 +18,17 @@ class TestTLS(TestApplicationTLS): def add_tls(self, application='empty', cert='default', port=7080): self.conf( - {"application": application, "tls": {"certificate": cert}}, + { + "pass": "applications/" + application, + "tls": {"certificate": cert} + }, 'listeners/*:' + str(port), ) def remove_tls(self, application='empty', port=7080): - self.conf({"application": application}, 'listeners/*:' + str(port)) + self.conf( + {"pass": "applications/" + application}, 'listeners/*:' + str(port) + ) def test_tls_listener_option_add(self): self.load('empty') @@ -482,7 +487,7 @@ basicConstraints = critical,CA:TRUE""" read_timeout=1, ) - self.conf({"application": "empty"}, 'listeners/*:7080') + self.conf({"pass": "applications/empty"}, 'listeners/*:7080') self.conf_delete('/certificates/default') try: diff --git a/test/unit/applications/lang/go.py b/test/unit/applications/lang/go.py index 4852459c..4e77118b 100644 --- a/test/unit/applications/lang/go.py +++ b/test/unit/applications/lang/go.py @@ -27,7 +27,7 @@ class TestApplicationGo(TestApplicationProto): self.conf( { - "listeners": {"*:7080": {"application": script}}, + "listeners": {"*:7080": {"pass": "applications/" + script}}, "applications": { script: { "type": "external", diff --git a/test/unit/applications/lang/java.py b/test/unit/applications/lang/java.py index 91bfb9ec..30d186cd 100644 --- a/test/unit/applications/lang/java.py +++ b/test/unit/applications/lang/java.py @@ -60,7 +60,7 @@ class TestApplicationJava(TestApplicationProto): self.conf( { - "listeners": {"*:7080": {"application": script}}, + "listeners": {"*:7080": {"pass": "applications/" + script}}, "applications": { script: { "unit_jars": self.pardir + '/build', diff --git a/test/unit/applications/lang/node.py b/test/unit/applications/lang/node.py index f1b99cc7..191cfed5 100644 --- a/test/unit/applications/lang/node.py +++ b/test/unit/applications/lang/node.py @@ -21,7 +21,7 @@ class TestApplicationNode(TestApplicationProto): self.conf( { - "listeners": {"*:7080": {"application": script}}, + "listeners": {"*:7080": {"pass": "applications/" + script}}, "applications": { script: { "type": "external", diff --git a/test/unit/applications/lang/perl.py b/test/unit/applications/lang/perl.py index 6970873d..d93c15e1 100644 --- a/test/unit/applications/lang/perl.py +++ b/test/unit/applications/lang/perl.py @@ -7,7 +7,7 @@ class TestApplicationPerl(TestApplicationProto): self.conf( { - "listeners": {"*:7080": {"application": script}}, + "listeners": {"*:7080": {"pass": "applications/" + script}}, "applications": { script: { "type": "perl", diff --git a/test/unit/applications/lang/php.py b/test/unit/applications/lang/php.py index c4043764..18c126d5 100644 --- a/test/unit/applications/lang/php.py +++ b/test/unit/applications/lang/php.py @@ -7,7 +7,7 @@ class TestApplicationPHP(TestApplicationProto): self.conf( { - "listeners": {"*:7080": {"application": script}}, + "listeners": {"*:7080": {"pass": "applications/" + script}}, "applications": { script: { "type": "php", diff --git a/test/unit/applications/lang/python.py b/test/unit/applications/lang/python.py index 8c2c8707..31e9b92c 100644 --- a/test/unit/applications/lang/python.py +++ b/test/unit/applications/lang/python.py @@ -10,7 +10,7 @@ class TestApplicationPython(TestApplicationProto): self.conf( { - "listeners": {"*:7080": {"application": name}}, + "listeners": {"*:7080": {"pass": "applications/" + name}}, "applications": { name: { "type": "python", diff --git a/test/unit/applications/lang/ruby.py b/test/unit/applications/lang/ruby.py index 94086d26..0417a915 100644 --- a/test/unit/applications/lang/ruby.py +++ b/test/unit/applications/lang/ruby.py @@ -7,7 +7,7 @@ class TestApplicationRuby(TestApplicationProto): self.conf( { - "listeners": {"*:7080": {"application": script}}, + "listeners": {"*:7080": {"pass": "applications/" + script}}, "applications": { script: { "type": "ruby", diff --git a/test/unit/applications/tls.py b/test/unit/applications/tls.py index 1e1f3675..83cc1a03 100644 --- a/test/unit/applications/tls.py +++ b/test/unit/applications/tls.py @@ -78,7 +78,7 @@ distinguished_name = req_distinguished_name self.conf( { - "listeners": {"*:7080": {"application": name}}, + "listeners": {"*:7080": {"pass": "applications/" + name}}, "applications": { name: { "type": "python", |