xref: /unit/test/unit/applications/lang/perl.py (revision 1730:44912af5b3e6)
11019Szelenkov@nginx.comfrom unit.applications.proto import TestApplicationProto
2*1730Szelenkov@nginx.comfrom unit.option import option
31019Szelenkov@nginx.com
41019Szelenkov@nginx.com
51019Szelenkov@nginx.comclass TestApplicationPerl(TestApplicationProto):
61116Szelenkov@nginx.com    application_type = "perl"
71116Szelenkov@nginx.com
81303St.nateldemoura@f5.com    def load(self, script, name='psgi.pl', **kwargs):
91596Szelenkov@nginx.com        script_path = option.test_dir + '/perl/' + script
101019Szelenkov@nginx.com
111050Szelenkov@nginx.com        self._load_conf(
121019Szelenkov@nginx.com            {
131041Svbart@nginx.com                "listeners": {"*:7080": {"pass": "applications/" + script}},
141019Szelenkov@nginx.com                "applications": {
151019Szelenkov@nginx.com                    script: {
161670Smax.romanov@nginx.com                        "type": self.get_application_type(),
171019Szelenkov@nginx.com                        "processes": {"spare": 0},
181019Szelenkov@nginx.com                        "working_directory": script_path,
191019Szelenkov@nginx.com                        "script": script_path + '/' + name,
201019Szelenkov@nginx.com                    }
211019Szelenkov@nginx.com                },
221303St.nateldemoura@f5.com            },
231303St.nateldemoura@f5.com            **kwargs
241019Szelenkov@nginx.com        )
25