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