diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2019-09-14 14:44:35 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2019-09-14 14:44:35 +0300 |
commit | 65ca2d7b198bf573fe3caf5e75bf6bd3a172820b (patch) | |
tree | 4964d0f5f4bd8b68fe06d8f975c0287b8a240951 /test/unit/applications/lang/go.py | |
parent | 962cdb66590b9f9ec57e0a6aa5d0cb359bb8f145 (diff) | |
download | unit-65ca2d7b198bf573fe3caf5e75bf6bd3a172820b.tar.gz unit-65ca2d7b198bf573fe3caf5e75bf6bd3a172820b.tar.bz2 |
Tests: refactored prerequisites model.
Diffstat (limited to 'test/unit/applications/lang/go.py')
-rw-r--r-- | test/unit/applications/lang/go.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/unit/applications/lang/go.py b/test/unit/applications/lang/go.py index 35ceefa7..15ac1cd9 100644 --- a/test/unit/applications/lang/go.py +++ b/test/unit/applications/lang/go.py @@ -4,6 +4,19 @@ from unit.applications.proto import TestApplicationProto class TestApplicationGo(TestApplicationProto): + @classmethod + def setUpClass(cls, complete_check=True): + unit = super().setUpClass(complete_check=False) + + # check go module + + go_app = TestApplicationGo() + go_app.testdir = unit.testdir + if go_app.prepare_env('empty', 'app').returncode == 0: + cls.available['modules']['go'] = [] + + return unit if not complete_check else unit.complete() + def prepare_env(self, script, name): if not os.path.exists(self.testdir + '/go'): os.mkdir(self.testdir + '/go') |