Tests: fixed type of applications.
This commit is contained in:
@@ -67,7 +67,7 @@ class TestASGILifespan(TestApplicationPython):
|
|||||||
],
|
],
|
||||||
"applications": {
|
"applications": {
|
||||||
"targets": {
|
"targets": {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"working_directory": option.test_dir
|
"working_directory": option.test_dir
|
||||||
+ "/python/lifespan/empty",
|
+ "/python/lifespan/empty",
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class TestASGITargets(TestApplicationPython):
|
|||||||
],
|
],
|
||||||
"applications": {
|
"applications": {
|
||||||
"targets": {
|
"targets": {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"working_directory": option.test_dir
|
"working_directory": option.test_dir
|
||||||
+ "/python/targets/",
|
+ "/python/targets/",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class TestJavaApplication(TestApplicationJava):
|
|||||||
"listeners": {"*:7080": {"pass": "applications/app"}},
|
"listeners": {"*:7080": {"pass": "applications/app"}},
|
||||||
"applications": {
|
"applications": {
|
||||||
"app": {
|
"app": {
|
||||||
"type": "java",
|
"type": self.get_application_type(),
|
||||||
"processes": 1,
|
"processes": 1,
|
||||||
"working_directory": option.test_dir + "/java/empty",
|
"working_directory": option.test_dir + "/java/empty",
|
||||||
"webapp": temp_dir + "/java",
|
"webapp": temp_dir + "/java",
|
||||||
|
|||||||
@@ -600,7 +600,7 @@ opcache.preload_user = %(user)s
|
|||||||
"listeners": {"*:7080": {"pass": "applications/script"}},
|
"listeners": {"*:7080": {"pass": "applications/script"}},
|
||||||
"applications": {
|
"applications": {
|
||||||
"script": {
|
"script": {
|
||||||
"type": "php",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"root": option.test_dir + "/php/script",
|
"root": option.test_dir + "/php/script",
|
||||||
"script": "phpinfo.php",
|
"script": "phpinfo.php",
|
||||||
@@ -620,7 +620,7 @@ opcache.preload_user = %(user)s
|
|||||||
"listeners": {"*:7080": {"pass": "applications/phpinfo"}},
|
"listeners": {"*:7080": {"pass": "applications/phpinfo"}},
|
||||||
"applications": {
|
"applications": {
|
||||||
"phpinfo": {
|
"phpinfo": {
|
||||||
"type": "php",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"root": option.test_dir + "/php/phpinfo",
|
"root": option.test_dir + "/php/phpinfo",
|
||||||
}
|
}
|
||||||
@@ -647,7 +647,7 @@ opcache.preload_user = %(user)s
|
|||||||
"listeners": {"*:7080": {"pass": "applications/phpinfo"}},
|
"listeners": {"*:7080": {"pass": "applications/phpinfo"}},
|
||||||
"applications": {
|
"applications": {
|
||||||
"phpinfo": {
|
"phpinfo": {
|
||||||
"type": "php",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"root": new_root,
|
"root": new_root,
|
||||||
"working_directory": new_root,
|
"working_directory": new_root,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class TestPHPTargets(TestApplicationPHP):
|
|||||||
],
|
],
|
||||||
"applications": {
|
"applications": {
|
||||||
"targets": {
|
"targets": {
|
||||||
"type": "php",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"targets": {
|
"targets": {
|
||||||
"1": {
|
"1": {
|
||||||
@@ -66,7 +66,7 @@ class TestPHPTargets(TestApplicationPHP):
|
|||||||
},
|
},
|
||||||
"applications": {
|
"applications": {
|
||||||
"targets": {
|
"targets": {
|
||||||
"type": "php",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"targets": {
|
"targets": {
|
||||||
"default": {
|
"default": {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ Content-Length: 10
|
|||||||
"routes": [{"action": {"proxy": "http://127.0.0.1:7081"}}],
|
"routes": [{"action": {"proxy": "http://127.0.0.1:7081"}}],
|
||||||
"applications": {
|
"applications": {
|
||||||
"mirror": {
|
"mirror": {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"path": option.test_dir + "/python/mirror",
|
"path": option.test_dir + "/python/mirror",
|
||||||
"working_directory": option.test_dir
|
"working_directory": option.test_dir
|
||||||
@@ -80,7 +80,7 @@ Content-Length: 10
|
|||||||
"module": "wsgi",
|
"module": "wsgi",
|
||||||
},
|
},
|
||||||
"custom_header": {
|
"custom_header": {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"path": option.test_dir + "/python/custom_header",
|
"path": option.test_dir + "/python/custom_header",
|
||||||
"working_directory": option.test_dir
|
"working_directory": option.test_dir
|
||||||
@@ -88,7 +88,7 @@ Content-Length: 10
|
|||||||
"module": "wsgi",
|
"module": "wsgi",
|
||||||
},
|
},
|
||||||
"delayed": {
|
"delayed": {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"path": option.test_dir + "/python/delayed",
|
"path": option.test_dir + "/python/delayed",
|
||||||
"working_directory": option.test_dir
|
"working_directory": option.test_dir
|
||||||
@@ -123,7 +123,7 @@ Content-Length: 10
|
|||||||
},
|
},
|
||||||
"applications": {
|
"applications": {
|
||||||
"mirror": {
|
"mirror": {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"path": option.test_dir + "/python/mirror",
|
"path": option.test_dir + "/python/mirror",
|
||||||
"working_directory": option.test_dir
|
"working_directory": option.test_dir
|
||||||
@@ -499,7 +499,7 @@ Content-Length: 10
|
|||||||
"routes": [{"action": {"proxy": "http://127.0.0.1:7082"}}],
|
"routes": [{"action": {"proxy": "http://127.0.0.1:7082"}}],
|
||||||
"applications": {
|
"applications": {
|
||||||
"mirror": {
|
"mirror": {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"path": option.test_dir + "/python/mirror",
|
"path": option.test_dir + "/python/mirror",
|
||||||
"working_directory": option.test_dir
|
"working_directory": option.test_dir
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class TestPythonTargets(TestApplicationPython):
|
|||||||
],
|
],
|
||||||
"applications": {
|
"applications": {
|
||||||
"targets": {
|
"targets": {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"working_directory": option.test_dir
|
"working_directory": option.test_dir
|
||||||
+ "/python/targets/",
|
+ "/python/targets/",
|
||||||
"path": option.test_dir + '/python/targets/',
|
"path": option.test_dir + '/python/targets/',
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import pytest
|
import pytest
|
||||||
from unit.applications.proto import TestApplicationProto
|
from unit.applications.lang.python import TestApplicationPython
|
||||||
from unit.option import option
|
from unit.option import option
|
||||||
|
|
||||||
|
|
||||||
class TestRouting(TestApplicationProto):
|
class TestRouting(TestApplicationPython):
|
||||||
prerequisites = {'modules': {'python': 'any'}}
|
prerequisites = {'modules': {'python': 'any'}}
|
||||||
|
|
||||||
def setup_method(self):
|
def setup_method(self):
|
||||||
@@ -289,7 +289,7 @@ class TestRouting(TestApplicationProto):
|
|||||||
"listeners": {"*:7080": {"pass": "applications/" + path}},
|
"listeners": {"*:7080": {"pass": "applications/" + path}},
|
||||||
"applications": {
|
"applications": {
|
||||||
name: {
|
name: {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"path": option.test_dir + '/python/empty',
|
"path": option.test_dir + '/python/empty',
|
||||||
"working_directory": option.test_dir
|
"working_directory": option.test_dir
|
||||||
@@ -313,7 +313,7 @@ class TestRouting(TestApplicationProto):
|
|||||||
"listeners": {"*:7080": {"pass": "applications/" + path}},
|
"listeners": {"*:7080": {"pass": "applications/" + path}},
|
||||||
"applications": {
|
"applications": {
|
||||||
name: {
|
name: {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"path": option.test_dir + '/python/empty',
|
"path": option.test_dir + '/python/empty',
|
||||||
"working_directory": option.test_dir
|
"working_directory": option.test_dir
|
||||||
@@ -333,7 +333,7 @@ class TestRouting(TestApplicationProto):
|
|||||||
"listeners": {"*:7081": {"pass": "applications/empty"}},
|
"listeners": {"*:7081": {"pass": "applications/empty"}},
|
||||||
"applications": {
|
"applications": {
|
||||||
"empty": {
|
"empty": {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"path": option.test_dir + '/python/empty',
|
"path": option.test_dir + '/python/empty',
|
||||||
"working_directory": option.test_dir + '/python/empty',
|
"working_directory": option.test_dir + '/python/empty',
|
||||||
@@ -387,7 +387,7 @@ class TestRouting(TestApplicationProto):
|
|||||||
{
|
{
|
||||||
"applications": {
|
"applications": {
|
||||||
"app": {
|
"app": {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"path": "/app",
|
"path": "/app",
|
||||||
"module": "wsgi",
|
"module": "wsgi",
|
||||||
@@ -430,7 +430,7 @@ class TestRouting(TestApplicationProto):
|
|||||||
{
|
{
|
||||||
"applications": {
|
"applications": {
|
||||||
"app": {
|
"app": {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"path": "/app",
|
"path": "/app",
|
||||||
"module": "wsgi",
|
"module": "wsgi",
|
||||||
@@ -476,7 +476,7 @@ class TestRouting(TestApplicationProto):
|
|||||||
"routes": [{"action": {"proxy": "http://127.0.0.1:7081"}}],
|
"routes": [{"action": {"proxy": "http://127.0.0.1:7081"}}],
|
||||||
"applications": {
|
"applications": {
|
||||||
"app": {
|
"app": {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"path": "/app",
|
"path": "/app",
|
||||||
"module": "wsgi",
|
"module": "wsgi",
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ Connection: close
|
|||||||
],
|
],
|
||||||
"applications": {
|
"applications": {
|
||||||
"delayed": {
|
"delayed": {
|
||||||
"type": "python",
|
"type": self.get_application_type(),
|
||||||
"processes": {"spare": 0},
|
"processes": {"spare": 0},
|
||||||
"path": option.test_dir + "/python/delayed",
|
"path": option.test_dir + "/python/delayed",
|
||||||
"working_directory": option.test_dir
|
"working_directory": option.test_dir
|
||||||
|
|||||||
Reference in New Issue
Block a user