blob: 43980a35a3f6beed6d95e866460bd8785edcb194 [file] [log] [blame]
Tatyana Leontovichb7404592017-04-07 11:52:28 +03001# Copyright 2017 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.
Tatyana Leontovichb7404592017-04-07 11:52:28 +030014
15import pytest
16
Tatyana Leontovichb7404592017-04-07 11:52:28 +030017from tcp_tests import logger
18
19LOG = logger.logger
20
21
22@pytest.mark.deploy
23class Testk8sInstall(object):
Artem Panchenko0594cd72017-06-12 13:25:26 +030024 """Test class for testing Kubernetes deploy"""
Tatyana Leontovichb7404592017-04-07 11:52:28 +030025
Artem Panchenko0594cd72017-06-12 13:25:26 +030026 @pytest.mark.fail_snapshot
vrovacheva9d08332017-06-22 20:01:59 +040027 def test_k8s_install(self, config, sl_deployed, k8s_deployed, k8s_actions):
Artem Panchenko0594cd72017-06-12 13:25:26 +030028 """Test for deploying MCP environment with k8s+stacklight and check it
Tatyana Leontovichb7404592017-04-07 11:52:28 +030029
30 Scenario:
31 1. Prepare salt on hosts
32 2. Setup controller nodes
33 3. Setup compute nodes
Tatyana Leontovich5acc82a2017-05-23 15:41:35 +030034 4. Setup stack light nodes
Artem Panchenko0594cd72017-06-12 13:25:26 +030035 5. Setup Kubernetes cluster
vrovacheva9d08332017-06-22 20:01:59 +040036 6. Run conformance if need
Tatyana Leontovichb7404592017-04-07 11:52:28 +030037
38 """
vrovacheva9d08332017-06-22 20:01:59 +040039 if config.k8s_conformance_run:
40 k8s_actions.run_conformance()
Tatyana Leontovichb7404592017-04-07 11:52:28 +030041 LOG.info("*************** DONE **************")
vrovachev0a2f6352017-06-09 12:48:59 +040042
Artem Panchenko0594cd72017-06-12 13:25:26 +030043 @pytest.mark.fail_snapshot
vrovacheva9d08332017-06-22 20:01:59 +040044 def test_only_k8s_install(self, config, k8s_deployed, k8s_actions):
Artem Panchenko0594cd72017-06-12 13:25:26 +030045 """Test for deploying MCP environment with k8s and check it
vrovachev0a2f6352017-06-09 12:48:59 +040046
47 Scenario:
48 1. Prepare salt on hosts
49 2. Setup controller nodes
50 3. Setup compute nodes
Artem Panchenko0594cd72017-06-12 13:25:26 +030051 4. Setup Kubernetes cluster
vrovacheva9d08332017-06-22 20:01:59 +040052 5. Run conformance if need
vrovachev0a2f6352017-06-09 12:48:59 +040053
54 """
vrovacheva9d08332017-06-22 20:01:59 +040055 if config.k8s_conformance_run:
56 k8s_actions.run_conformance()
vrovachev0a2f6352017-06-09 12:48:59 +040057 LOG.info("*************** DONE **************")