blob: 00b915dd53e739ad52669c0a5988337a15611183 [file] [log] [blame]
Dennis Dmitrievee5ef232018-08-31 13:53:18 +03001# Copyright 2016 Mirantis, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15import pytest
16
17from tcp_tests import logger
18from tcp_tests import settings
19
20LOG = logger.logger
21
22
23class Test3rdpartySuites(object):
24 """Test class for running 3rdparty test suites
25
26 Requires environment variables:
27 ENV_NAME
28 LAB_CONFIG_NAME
29 TESTS_CONFIGS
30 """
31
32 @pytest.mark.grab_versions
33 @pytest.mark.parametrize("_", [settings.ENV_NAME])
34 @pytest.mark.run_tempest
35 def test_run_tempest(self, tempest_actions, show_step, _):
Tatyana Leontovichf3718442018-10-31 13:36:13 +020036 """Runner for Openstack tempest tests
Dennis Dmitrievee5ef232018-08-31 13:53:18 +030037
38 Scenario:
39 1. Run tempest
40 """
41 show_step(1)
42 tempest_actions.prepare_and_run_tempest()
43
44 @pytest.mark.grab_versions
45 @pytest.mark.parametrize("_", [settings.ENV_NAME])
46 @pytest.mark.run_stacklight
47 def test_run_stacklight(self, sl_actions, show_step, _):
48 """Runner for Stacklight tests
49
50 Scenario:
51 1. Run SL test
52 """
53
54 # Run SL component tetsts
55 show_step(1)
56 sl_actions.setup_sl_functional_tests(
57 'cfg01',
58 )
59 sl_actions.run_sl_functional_tests(
60 'cfg01',
61 '/root/stacklight-pytest/stacklight_tests/',
vitalygusevf6dd2742018-11-28 17:51:28 +040062 'tests',
Dennis Dmitrievee5ef232018-08-31 13:53:18 +030063 'test_alerts.py',
64 junit_report_name='stacklight_report.xml')
65 # Download report
66 sl_actions.download_sl_test_report(
67 'cfg01',
68 '/root/stacklight-pytest/stacklight_tests/'
69 'stacklight_report.xml')
70
71 @pytest.mark.grab_versions
Victor Ryzhenkin6f7ccb32018-12-26 18:41:27 +040072 @pytest.mark.prepare_log(filepath='/tmp/conformance/conformance.log')
73 @pytest.mark.merge_xunit(path='/tmp/conformance',
Dennis Dmitrievee5ef232018-08-31 13:53:18 +030074 output='/root/conformance_result.xml')
Victor Ryzhenkin6f7ccb32018-12-26 18:41:27 +040075 @pytest.mark.download(name=['conformance.log',
76 'conformance_result.xml'])
Dennis Dmitrievee5ef232018-08-31 13:53:18 +030077 @pytest.mark.parametrize("_", [settings.ENV_NAME])
78 @pytest.mark.k8s_conformance
79 def test_run_k8s_conformance(self, show_step, config, k8s_actions,
Victor Ryzhenkin6f7ccb32018-12-26 18:41:27 +040080 conformance_helper, _):
Dennis Dmitrievee5ef232018-08-31 13:53:18 +030081 """Test run of k8s conformance tests"""
Victor Ryzhenkin6f7ccb32018-12-26 18:41:27 +040082 k8s_actions.start_conformance_inside_pod()
Dennis Dmitrievee5ef232018-08-31 13:53:18 +030083
84 @pytest.mark.grab_versions
Victor Ryzhenkin6f7ccb32018-12-26 18:41:27 +040085 @pytest.mark.prepare_log(filepath='/tmp/virtlet-conformance/'
86 'virtlet_conformance.log')
87 @pytest.mark.merge_xunit(path='/tmp/virtlet-conformance',
88 output='/root/conformance_virtlet_result.xml')
89 @pytest.mark.download(name=['virtlet_conformance.log',
90 'conformance_virtlet_result.xml'])
Dennis Dmitrievee5ef232018-08-31 13:53:18 +030091 @pytest.mark.parametrize("_", [settings.ENV_NAME])
92 @pytest.mark.k8s_conformance_virtlet
93 def test_run_k8s_conformance_virtlet(self, show_step, config, k8s_actions,
Victor Ryzhenkin6f7ccb32018-12-26 18:41:27 +040094 conformance_helper, _):
Dennis Dmitrievee5ef232018-08-31 13:53:18 +030095 """Test run of k8s virtlet conformance tests"""
Victor Ryzhenkin6f7ccb32018-12-26 18:41:27 +040096 k8s_actions.start_conformance_inside_pod(cnf_type='virtlet')