Tatyana Leontovich | b740459 | 2017-04-07 11:52:28 +0300 | [diff] [blame] | 1 | # 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 Leontovich | b740459 | 2017-04-07 11:52:28 +0300 | [diff] [blame] | 14 | |
| 15 | import pytest |
| 16 | |
Tatyana Leontovich | b740459 | 2017-04-07 11:52:28 +0300 | [diff] [blame] | 17 | from tcp_tests import logger |
| 18 | |
| 19 | LOG = logger.logger |
| 20 | |
| 21 | |
| 22 | @pytest.mark.deploy |
| 23 | class Testk8sInstall(object): |
Artem Panchenko | 0594cd7 | 2017-06-12 13:25:26 +0300 | [diff] [blame] | 24 | """Test class for testing Kubernetes deploy""" |
Tatyana Leontovich | b740459 | 2017-04-07 11:52:28 +0300 | [diff] [blame] | 25 | |
Artem Panchenko | 0594cd7 | 2017-06-12 13:25:26 +0300 | [diff] [blame] | 26 | @pytest.mark.fail_snapshot |
vrovachev | a9d0833 | 2017-06-22 20:01:59 +0400 | [diff] [blame^] | 27 | def test_k8s_install(self, config, sl_deployed, k8s_deployed, k8s_actions): |
Artem Panchenko | 0594cd7 | 2017-06-12 13:25:26 +0300 | [diff] [blame] | 28 | """Test for deploying MCP environment with k8s+stacklight and check it |
Tatyana Leontovich | b740459 | 2017-04-07 11:52:28 +0300 | [diff] [blame] | 29 | |
| 30 | Scenario: |
| 31 | 1. Prepare salt on hosts |
| 32 | 2. Setup controller nodes |
| 33 | 3. Setup compute nodes |
Tatyana Leontovich | 5acc82a | 2017-05-23 15:41:35 +0300 | [diff] [blame] | 34 | 4. Setup stack light nodes |
Artem Panchenko | 0594cd7 | 2017-06-12 13:25:26 +0300 | [diff] [blame] | 35 | 5. Setup Kubernetes cluster |
vrovachev | a9d0833 | 2017-06-22 20:01:59 +0400 | [diff] [blame^] | 36 | 6. Run conformance if need |
Tatyana Leontovich | b740459 | 2017-04-07 11:52:28 +0300 | [diff] [blame] | 37 | |
| 38 | """ |
vrovachev | a9d0833 | 2017-06-22 20:01:59 +0400 | [diff] [blame^] | 39 | if config.k8s_conformance_run: |
| 40 | k8s_actions.run_conformance() |
Tatyana Leontovich | b740459 | 2017-04-07 11:52:28 +0300 | [diff] [blame] | 41 | LOG.info("*************** DONE **************") |
vrovachev | 0a2f635 | 2017-06-09 12:48:59 +0400 | [diff] [blame] | 42 | |
Artem Panchenko | 0594cd7 | 2017-06-12 13:25:26 +0300 | [diff] [blame] | 43 | @pytest.mark.fail_snapshot |
vrovachev | a9d0833 | 2017-06-22 20:01:59 +0400 | [diff] [blame^] | 44 | def test_only_k8s_install(self, config, k8s_deployed, k8s_actions): |
Artem Panchenko | 0594cd7 | 2017-06-12 13:25:26 +0300 | [diff] [blame] | 45 | """Test for deploying MCP environment with k8s and check it |
vrovachev | 0a2f635 | 2017-06-09 12:48:59 +0400 | [diff] [blame] | 46 | |
| 47 | Scenario: |
| 48 | 1. Prepare salt on hosts |
| 49 | 2. Setup controller nodes |
| 50 | 3. Setup compute nodes |
Artem Panchenko | 0594cd7 | 2017-06-12 13:25:26 +0300 | [diff] [blame] | 51 | 4. Setup Kubernetes cluster |
vrovachev | a9d0833 | 2017-06-22 20:01:59 +0400 | [diff] [blame^] | 52 | 5. Run conformance if need |
vrovachev | 0a2f635 | 2017-06-09 12:48:59 +0400 | [diff] [blame] | 53 | |
| 54 | """ |
vrovachev | a9d0833 | 2017-06-22 20:01:59 +0400 | [diff] [blame^] | 55 | if config.k8s_conformance_run: |
| 56 | k8s_actions.run_conformance() |
vrovachev | 0a2f635 | 2017-06-09 12:48:59 +0400 | [diff] [blame] | 57 | LOG.info("*************** DONE **************") |