fix the install case
diff --git a/tcp_tests/helpers/ext.py b/tcp_tests/helpers/ext.py
index 5771eae..ca50c2e 100644
--- a/tcp_tests/helpers/ext.py
+++ b/tcp_tests/helpers/ext.py
@@ -24,8 +24,8 @@
return collections.namedtuple('Enum', values)(*values)
UNDERLAY_NODE_ROLE = enum(
- 'salt-master',
- 'salt-minion',
+ 'salt_master',
+ 'salt_minion',
)
NETWORK_TYPE = enum(
diff --git a/tcp_tests/helpers/utils.py b/tcp_tests/helpers/utils.py
index a5ad2b8..f9fd8a4 100644
--- a/tcp_tests/helpers/utils.py
+++ b/tcp_tests/helpers/utils.py
@@ -240,46 +240,6 @@
None
-def create_file(node, pod, path, size,
- namespace=ext.Namespace.BASE_NAMESPACE):
- node.check_call(
- 'kubectl exec {} --namespace={} {}'.format(
- pod.name,
- namespace,
- 'dd -- if=/dev/zero -- of={} bs=1MB count={}'.format(path, size)),
- expected=[ext.ExitCodes.EX_OK])
-
-
-def run_daily_cron(node, pod, task,
- namespace=ext.Namespace.BASE_NAMESPACE):
- node.check_call(
- 'kubectl exec {} --namespace={} {}'.format(
- pod.name,
- namespace,
- '/etc/cron.daily/{}'.format(task)),
- expected=[ext.ExitCodes.EX_OK])
-
-
-def list_files(node, pod, path, mask,
- namespace=ext.Namespace.BASE_NAMESPACE):
- return "".join(node.check_call(
- 'kubectl exec {} --namespace={} {}'.format(
- pod.name,
- namespace,
- 'find {} -- -iname {}'.format(path, mask)),
- expected=[ext.ExitCodes.EX_OK])['stdout']) \
- .replace('\n', ' ').strip().split(" ")
-
-
-def rm_files(node, pod, path,
- namespace=ext.Namespace.BASE_NAMESPACE):
- node.execute(
- 'kubectl exec {} --namespace={} {}'.format(
- pod.name,
- namespace,
- 'rm -- {}'.format(path)))
-
-
class YamlEditor(object):
"""Manipulations with local or remote .yaml files.
diff --git a/tcp_tests/managers/envmanager_devops.py b/tcp_tests/managers/envmanager_devops.py
index 51b6520..e4cbf0d 100644
--- a/tcp_tests/managers/envmanager_devops.py
+++ b/tcp_tests/managers/envmanager_devops.py
@@ -318,7 +318,7 @@
:rtype: list
"""
nodes = self.__get_nodes_by_role(
- node_role=ext.UNDERLAY_NODE_ROLE.salt-master)
+ node_role=ext.UNDERLAY_NODE_ROLE.salt_master)
return nodes
@property
@@ -328,7 +328,7 @@
:rtype: list
"""
nodes = self.__get_nodes_by_role(
- node_role=ext.UNDERLAY_NODE_ROLE.salt-minion)
+ node_role=ext.UNDERLAY_NODE_ROLE.salt_minion)
return nodes
# @staticmethod
diff --git a/tcp_tests/settings.py b/tcp_tests/settings.py
index bf6b5b0..4752d43 100644
--- a/tcp_tests/settings.py
+++ b/tcp_tests/settings.py
@@ -18,9 +18,6 @@
_boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True,
'0': False, 'no': False, 'false': False, 'off': False}
-_default_conf = pkg_resources.resource_filename(
- __name__, 'templates/tcpcloud-default.yaml')
-
def get_var_as_bool(name, default):
value = os.environ.get(name, '')
@@ -37,7 +34,6 @@
SSH_NODE_CREDENTIALS = {"login": SSH_LOGIN,
"password": SSH_PASSWORD}
-CONF_PATH = os.environ.get('CONF_PATH', os.path.abspath(_default_conf))
SHUTDOWN_ENV_ON_TEARDOWN = get_var_as_bool('SHUTDOWN_ENV_ON_TEARDOWN', True)
# public_iface = IFACES[0]
diff --git a/tcp_tests/settings_oslo.py b/tcp_tests/settings_oslo.py
index 6c818f2..5ba6602 100644
--- a/tcp_tests/settings_oslo.py
+++ b/tcp_tests/settings_oslo.py
@@ -24,7 +24,7 @@
_default_conf = pkg_resources.resource_filename(
- __name__, 'templates/default.yaml')
+ __name__, 'templates/tcpcloud-default.yaml')
hardware_opts = [
@@ -51,8 +51,8 @@
}, ...]""", default=[]),
ct.Cfg('roles', ct.JSONList(),
help="Node roles managed by underlay in the environment",
- default=[ext.UNDERLAY_NODE_ROLE.salt-master,
- ext.UNDERLAY_NODE_ROLE.salt-minion, ]),
+ default=[ext.UNDERLAY_NODE_ROLE.salt_master,
+ ext.UNDERLAY_NODE_ROLE.salt_minion, ]),
ct.Cfg('nameservers', ct.JSONList(),
help="IP addresses of DNS servers",
default=[]),
diff --git a/tcp_tests/templates/tcpcloud-default.yaml b/tcp_tests/templates/tcpcloud-default.yaml
index a16436e..a68535f 100644
--- a/tcp_tests/templates/tcpcloud-default.yaml
+++ b/tcp_tests/templates/tcpcloud-default.yaml
@@ -53,7 +53,7 @@
nodes:
- name: cfg01.mk20-lab-advanced.local
- role: salt-master
+ role: salt_master
params:
vcpu: !os_env SLAVE_NODE_CPU, 2
memory: !os_env SLAVE_NODE_MEMORY, 4096
@@ -91,7 +91,7 @@
- private
- name: ctl01.mk20-lab-advanced.local
- role: salt-minion
+ role: salt_minion
params:
vcpu: !os_env SLAVE_NODE_CPU, 4
memory: !os_env SLAVE_NODE_MEMORY, 12400
@@ -129,7 +129,7 @@
- private
- name: ctl02.mk20-lab-advanced.local
- role: salt-minion
+ role: salt_minion
params:
vcpu: !os_env SLAVE_NODE_CPU, 4
memory: !os_env SLAVE_NODE_MEMORY, 12400
@@ -167,7 +167,7 @@
- private
- name: ctl03.mk20-lab-advanced.local
- role: salt-minion
+ role: salt_minion
params:
vcpu: !os_env SLAVE_NODE_CPU, 4
memory: !os_env SLAVE_NODE_MEMORY, 12400
@@ -205,7 +205,7 @@
- private
- name: cmp01.mk20-lab-advanced.local
- role: salt-minion
+ role: salt_minion
params:
vcpu: !os_env SLAVE_NODE_CPU, 4
memory: !os_env SLAVE_NODE_MEMORY, 8192
@@ -243,7 +243,7 @@
- private
- name: web01.mk20-lab-advanced.local
- role: salt-minion
+ role: salt_minion
params:
vcpu: !os_env SLAVE_NODE_CPU, 1
memory: !os_env SLAVE_NODE_MEMORY, 2048
@@ -281,7 +281,7 @@
- private
- name: mtr01.mk20-lab-advanced.local
- role: salt-minion
+ role: salt_minion
params:
vcpu: !os_env SLAVE_NODE_CPU, 1
memory: !os_env SLAVE_NODE_MEMORY, 2048
diff --git a/tcp_tests/tests/system/conftest.py b/tcp_tests/tests/system/conftest.py
new file mode 100644
index 0000000..736577a
--- /dev/null
+++ b/tcp_tests/tests/system/conftest.py
@@ -0,0 +1,17 @@
+# Copyright 2016 Mirantis, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+pytest_plugins = ['tcp_tests.fixtures.common_fixtures',
+ 'tcp_tests.fixtures.config_fixtures',
+ 'tcp_tests.fixtures.underlay_fixtures']
diff --git a/tcp_tests/tests/system/test_tcp_install.py b/tcp_tests/tests/system/test_tcp_install.py
index 215aeb5..1af0c62 100644
--- a/tcp_tests/tests/system/test_tcp_install.py
+++ b/tcp_tests/tests/system/test_tcp_install.py
@@ -15,7 +15,6 @@
import pytest
-import base_test
from tcp_tests import settings
from tcp_tests.helpers import ext
diff --git a/tcp_tests/tests/unit/test_env_config_funcs.py b/tcp_tests/tests/unit/test_env_config_funcs.py
index 003c216..df6d43c 100644
--- a/tcp_tests/tests/unit/test_env_config_funcs.py
+++ b/tcp_tests/tests/unit/test_env_config_funcs.py
@@ -2,7 +2,7 @@
import pytest
-from fuel_ccp_tests.helpers import env_config as funcs
+from tcp_tests.helpers import env_config as funcs
# Test data for funcs.return_obj
testdata1 = [