Added 'k8s_deployed' fixture
Created a separate fixture for Kubernetes deployment.
Modified existing k8s related fixtures / tests so they
use it now and updated templates with k8s environments.
Also this patch includes few minor changes:
* removed unused fixture 'deploy_openstack' which
was a full copy of 'openstack_deployed' fixture;
* removed unused modules imports;
* fixed typos and docstrings.
Change-Id: Ic35551f3e52913cede753b92e7d5a81f54570b01
Reviewed-on: https://review.gerrithub.io/365234
Reviewed-by: <vrovachev@mirantis.com>
Reviewed-by: Dennis Dmitriev <dis.xcom@gmail.com>
Tested-by: Tatyanka Leontovich <tleontovich@mirantis.com>
diff --git a/tcp_tests/tests/system/conftest.py b/tcp_tests/tests/system/conftest.py
index 89dfc3d..015c7ed 100644
--- a/tcp_tests/tests/system/conftest.py
+++ b/tcp_tests/tests/system/conftest.py
@@ -24,6 +24,7 @@
from tcp_tests.fixtures.stacklight_fixtures import *
from tcp_tests.fixtures.virtlet_fixtures import *
from tcp_tests.fixtures.virtlet_ceph_fixtures import *
+from tcp_tests.fixtures.k8s_fixtures import *
__all__ = sorted([ # sort for documentation
@@ -52,6 +53,9 @@
# stacklight_fixtures
'sl_actions',
'sl_deployed',
+ # k8s fixtures
+ 'k8s_actions',
+ 'k8s_deployed',
'virtlet_actions',
'virtlet_deployed',
'virtlet_ceph_actions',
diff --git a/tcp_tests/tests/system/test_install_k8s.py b/tcp_tests/tests/system/test_install_k8s.py
index 742ecc6..36f42b8 100644
--- a/tcp_tests/tests/system/test_install_k8s.py
+++ b/tcp_tests/tests/system/test_install_k8s.py
@@ -11,13 +11,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
-import copy
-import time
import pytest
-from tcp_tests import settings
-from tcp_tests.helpers import ext
from tcp_tests import logger
LOG = logger.logger
@@ -25,37 +21,31 @@
@pytest.mark.deploy
class Testk8sInstall(object):
- """Test class for testing mcp10 vxlan deploy"""
+ """Test class for testing Kubernetes deploy"""
- #salt_cmd = 'salt -l debug ' # For debug output
- #salt_call_cmd = 'salt-call -l debug ' # For debug output
- salt_cmd = 'salt --hard-crash --state-output=mixed --state-verbose=False ' # For cause only output
- salt_call_cmd = 'salt-call --hard-crash --state-output=mixed --state-verbose=False ' # For cause only output
- #salt_cmd = 'salt --state-output=terse --state-verbose=False ' # For reduced output
- #salt_call_cmd = 'salt-call --state-output=terse --state-verbose=False ' # For reduced output
-
- # @pytest.mark.snapshot_needed
- # @pytest.mark.fail_snapshot
- def test_k8s_install(self, underlay, sl_deployed, openstack_deployed,
- show_step):
- """Test for deploying an mcp environment and check it
+ @pytest.mark.fail_snapshot
+ def test_k8s_install(self, sl_deployed, k8s_deployed):
+ """Test for deploying MCP environment with k8s+stacklight and check it
Scenario:
1. Prepare salt on hosts
2. Setup controller nodes
3. Setup compute nodes
4. Setup stack light nodes
+ 5. Setup Kubernetes cluster
"""
LOG.info("*************** DONE **************")
- def test_only_k8s_install(self, underlay, openstack_deployed, show_step):
- """Test for deploying an mcp environment and check it
+ @pytest.mark.fail_snapshot
+ def test_only_k8s_install(self, k8s_deployed):
+ """Test for deploying MCP environment with k8s and check it
Scenario:
1. Prepare salt on hosts
2. Setup controller nodes
3. Setup compute nodes
+ 4. Setup Kubernetes cluster
"""
LOG.info("*************** DONE **************")
\ No newline at end of file