From d5e915934066c77a59d211efafca10c117b73d05 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Wed, 16 Sep 2020 21:31:15 +0100 Subject: Tests: migrated to the pytest. --- test/unit/applications/lang/ruby.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/unit/applications/lang/ruby.py') diff --git a/test/unit/applications/lang/ruby.py b/test/unit/applications/lang/ruby.py index 8c8acecc..534227bd 100644 --- a/test/unit/applications/lang/ruby.py +++ b/test/unit/applications/lang/ruby.py @@ -1,11 +1,12 @@ from unit.applications.proto import TestApplicationProto +from conftest import option class TestApplicationRuby(TestApplicationProto): application_type = "ruby" def load(self, script, name='config.ru', **kwargs): - script_path = self.current_dir + '/ruby/' + script + script_path = option.test_dir + '/ruby/' + script self._load_conf( { -- cgit From 645683f432d742f42f2769f589fe769585fb7aa0 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Wed, 7 Oct 2020 22:04:54 +0300 Subject: Tests: fixed loading selected module version. Previously, for PHP, Ruby, and Perl the latest version was always loaded in multi-version tests. --- test/unit/applications/lang/ruby.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/unit/applications/lang/ruby.py') diff --git a/test/unit/applications/lang/ruby.py b/test/unit/applications/lang/ruby.py index 534227bd..a6c39b2a 100644 --- a/test/unit/applications/lang/ruby.py +++ b/test/unit/applications/lang/ruby.py @@ -7,13 +7,17 @@ class TestApplicationRuby(TestApplicationProto): def load(self, script, name='config.ru', **kwargs): script_path = option.test_dir + '/ruby/' + script + appication_type = self.get_appication_type() + + if appication_type is None: + appication_type = self.application_type self._load_conf( { "listeners": {"*:7080": {"pass": "applications/" + script}}, "applications": { script: { - "type": self.application_type, + "type": appication_type, "processes": {"spare": 0}, "working_directory": script_path, "script": script_path + '/' + name, -- cgit From 6ec0ff35964c7805712d978625949f72ff5a63bc Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Wed, 7 Oct 2020 23:18:43 +0100 Subject: Tests: minor fixes. --- test/unit/applications/lang/ruby.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/unit/applications/lang/ruby.py') diff --git a/test/unit/applications/lang/ruby.py b/test/unit/applications/lang/ruby.py index a6c39b2a..bc3cefc6 100644 --- a/test/unit/applications/lang/ruby.py +++ b/test/unit/applications/lang/ruby.py @@ -1,5 +1,5 @@ -from unit.applications.proto import TestApplicationProto from conftest import option +from unit.applications.proto import TestApplicationProto class TestApplicationRuby(TestApplicationProto): -- cgit