Tests: rerun tests for each module version.
Rerun supported for Python, PHP, Perl, Ruby, and Java modules.
This commit is contained in:
@@ -5,6 +5,8 @@ from unit.applications.proto import TestApplicationProto
|
||||
|
||||
|
||||
class TestApplicationJava(TestApplicationProto):
|
||||
application_type = "java"
|
||||
|
||||
def load(self, script, name='app'):
|
||||
|
||||
app_path = self.testdir + '/java'
|
||||
@@ -64,7 +66,7 @@ class TestApplicationJava(TestApplicationProto):
|
||||
"applications": {
|
||||
script: {
|
||||
"unit_jars": self.pardir + '/build',
|
||||
"type": "java",
|
||||
"type": self.application_type,
|
||||
"processes": {"spare": 0},
|
||||
"working_directory": script_path,
|
||||
"webapp": app_path,
|
||||
|
||||
@@ -2,6 +2,8 @@ from unit.applications.proto import TestApplicationProto
|
||||
|
||||
|
||||
class TestApplicationPerl(TestApplicationProto):
|
||||
application_type = "perl"
|
||||
|
||||
def load(self, script, name='psgi.pl'):
|
||||
script_path = self.current_dir + '/perl/' + script
|
||||
|
||||
@@ -10,7 +12,7 @@ class TestApplicationPerl(TestApplicationProto):
|
||||
"listeners": {"*:7080": {"pass": "applications/" + script}},
|
||||
"applications": {
|
||||
script: {
|
||||
"type": "perl",
|
||||
"type": self.application_type,
|
||||
"processes": {"spare": 0},
|
||||
"working_directory": script_path,
|
||||
"script": script_path + '/' + name,
|
||||
|
||||
@@ -2,6 +2,8 @@ from unit.applications.proto import TestApplicationProto
|
||||
|
||||
|
||||
class TestApplicationPHP(TestApplicationProto):
|
||||
application_type = "php"
|
||||
|
||||
def load(self, script, name='index.php'):
|
||||
script_path = self.current_dir + '/php/' + script
|
||||
|
||||
@@ -10,7 +12,7 @@ class TestApplicationPHP(TestApplicationProto):
|
||||
"listeners": {"*:7080": {"pass": "applications/" + script}},
|
||||
"applications": {
|
||||
script: {
|
||||
"type": "php",
|
||||
"type": self.application_type,
|
||||
"processes": {"spare": 0},
|
||||
"root": script_path,
|
||||
"working_directory": script_path,
|
||||
|
||||
@@ -2,6 +2,8 @@ from unit.applications.proto import TestApplicationProto
|
||||
|
||||
|
||||
class TestApplicationPython(TestApplicationProto):
|
||||
application_type = "python"
|
||||
|
||||
def load(self, script, name=None):
|
||||
if name is None:
|
||||
name = script
|
||||
@@ -13,7 +15,7 @@ class TestApplicationPython(TestApplicationProto):
|
||||
"listeners": {"*:7080": {"pass": "applications/" + name}},
|
||||
"applications": {
|
||||
name: {
|
||||
"type": "python",
|
||||
"type": self.application_type,
|
||||
"processes": {"spare": 0},
|
||||
"path": script_path,
|
||||
"working_directory": script_path,
|
||||
|
||||
@@ -2,6 +2,8 @@ from unit.applications.proto import TestApplicationProto
|
||||
|
||||
|
||||
class TestApplicationRuby(TestApplicationProto):
|
||||
application_type = "ruby"
|
||||
|
||||
def load(self, script, name='config.ru'):
|
||||
script_path = self.current_dir + '/ruby/' + script
|
||||
|
||||
@@ -10,7 +12,7 @@ class TestApplicationRuby(TestApplicationProto):
|
||||
"listeners": {"*:7080": {"pass": "applications/" + script}},
|
||||
"applications": {
|
||||
script: {
|
||||
"type": "ruby",
|
||||
"type": self.application_type,
|
||||
"processes": {"spare": 0},
|
||||
"working_directory": script_path,
|
||||
"script": script_path + '/' + name,
|
||||
|
||||
Reference in New Issue
Block a user