diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2019-04-26 17:35:26 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2019-04-26 17:35:26 +0300 |
commit | 644e6df687425f6eb23a79425a769e1ce5f5437b (patch) | |
tree | 47ae341a214f5e7059dfa33c614ec96c5d3496dc | |
parent | 6a6bc63c48501027f01d16fbd211eb4425c1a1e8 (diff) | |
download | unit-644e6df687425f6eb23a79425a769e1ce5f5437b.tar.gz unit-644e6df687425f6eb23a79425a769e1ce5f5437b.tar.bz2 |
Tests: check application configuration loading.
Diffstat (limited to '')
-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/proto.py | 5 |
8 files changed, 12 insertions, 7 deletions
diff --git a/test/unit/applications/lang/go.py b/test/unit/applications/lang/go.py index 4e77118b..e4ab8ffa 100644 --- a/test/unit/applications/lang/go.py +++ b/test/unit/applications/lang/go.py @@ -25,7 +25,7 @@ class TestApplicationGo(TestApplicationProto): ) process.communicate() - self.conf( + self._load_conf( { "listeners": {"*:7080": {"pass": "applications/" + script}}, "applications": { diff --git a/test/unit/applications/lang/java.py b/test/unit/applications/lang/java.py index 30d186cd..c4390f15 100644 --- a/test/unit/applications/lang/java.py +++ b/test/unit/applications/lang/java.py @@ -58,7 +58,7 @@ class TestApplicationJava(TestApplicationProto): process = Popen(javac) process.communicate() - self.conf( + self._load_conf( { "listeners": {"*:7080": {"pass": "applications/" + script}}, "applications": { diff --git a/test/unit/applications/lang/node.py b/test/unit/applications/lang/node.py index 191cfed5..931c6596 100644 --- a/test/unit/applications/lang/node.py +++ b/test/unit/applications/lang/node.py @@ -19,7 +19,7 @@ class TestApplicationNode(TestApplicationProto): self.testdir + '/node/node_modules', ) - self.conf( + self._load_conf( { "listeners": {"*:7080": {"pass": "applications/" + script}}, "applications": { diff --git a/test/unit/applications/lang/perl.py b/test/unit/applications/lang/perl.py index d93c15e1..8aaf33a4 100644 --- a/test/unit/applications/lang/perl.py +++ b/test/unit/applications/lang/perl.py @@ -5,7 +5,7 @@ class TestApplicationPerl(TestApplicationProto): def load(self, script, name='psgi.pl'): script_path = self.current_dir + '/perl/' + script - self.conf( + self._load_conf( { "listeners": {"*:7080": {"pass": "applications/" + script}}, "applications": { diff --git a/test/unit/applications/lang/php.py b/test/unit/applications/lang/php.py index 18c126d5..99d84164 100644 --- a/test/unit/applications/lang/php.py +++ b/test/unit/applications/lang/php.py @@ -5,7 +5,7 @@ class TestApplicationPHP(TestApplicationProto): def load(self, script, name='index.php'): script_path = self.current_dir + '/php/' + script - self.conf( + self._load_conf( { "listeners": {"*:7080": {"pass": "applications/" + script}}, "applications": { diff --git a/test/unit/applications/lang/python.py b/test/unit/applications/lang/python.py index 31e9b92c..d1b5b839 100644 --- a/test/unit/applications/lang/python.py +++ b/test/unit/applications/lang/python.py @@ -8,7 +8,7 @@ class TestApplicationPython(TestApplicationProto): script_path = self.current_dir + '/python/' + script - self.conf( + self._load_conf( { "listeners": {"*:7080": {"pass": "applications/" + name}}, "applications": { diff --git a/test/unit/applications/lang/ruby.py b/test/unit/applications/lang/ruby.py index 0417a915..c2d8633e 100644 --- a/test/unit/applications/lang/ruby.py +++ b/test/unit/applications/lang/ruby.py @@ -5,7 +5,7 @@ class TestApplicationRuby(TestApplicationProto): def load(self, script, name='config.ru'): script_path = self.current_dir + '/ruby/' + script - self.conf( + self._load_conf( { "listeners": {"*:7080": {"pass": "applications/" + script}}, "applications": { diff --git a/test/unit/applications/proto.py b/test/unit/applications/proto.py index 2b865695..4105473f 100644 --- a/test/unit/applications/proto.py +++ b/test/unit/applications/proto.py @@ -24,3 +24,8 @@ class TestApplicationProto(TestControl): time.sleep(0.1) return found + + def _load_conf(self, conf): + self.assertIn( + 'success', self.conf(conf), 'load application configuration' + ) |