summaryrefslogtreecommitdiffhomepage
path: root/test/unit/applications
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2019-04-26 17:35:26 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2019-04-26 17:35:26 +0300
commit644e6df687425f6eb23a79425a769e1ce5f5437b (patch)
tree47ae341a214f5e7059dfa33c614ec96c5d3496dc /test/unit/applications
parent6a6bc63c48501027f01d16fbd211eb4425c1a1e8 (diff)
downloadunit-644e6df687425f6eb23a79425a769e1ce5f5437b.tar.gz
unit-644e6df687425f6eb23a79425a769e1ce5f5437b.tar.bz2
Tests: check application configuration loading.
Diffstat (limited to '')
-rw-r--r--test/unit/applications/lang/go.py2
-rw-r--r--test/unit/applications/lang/java.py2
-rw-r--r--test/unit/applications/lang/node.py2
-rw-r--r--test/unit/applications/lang/perl.py2
-rw-r--r--test/unit/applications/lang/php.py2
-rw-r--r--test/unit/applications/lang/python.py2
-rw-r--r--test/unit/applications/lang/ruby.py2
-rw-r--r--test/unit/applications/proto.py5
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'
+ )