Add option to skip store model for runtest
* By default for now store model is True
* For ofline tests it is set in False
* When runtests model will come from env_template,
invoke of sotore model can be romoved
Change-Id: I2393b7941725308c12b47708ef5b1e241807e33a
diff --git a/tcp_tests/managers/runtestmanager.py b/tcp_tests/managers/runtestmanager.py
index 6c1e874..e29f072 100644
--- a/tcp_tests/managers/runtestmanager.py
+++ b/tcp_tests/managers/runtestmanager.py
@@ -197,12 +197,13 @@
indent=4, sort_keys=True)
f.write(container_inspect)
- def prepare(self):
+ def prepare(self, store_run_test_model):
barbican_pillar = "nova:controller:barbican:enabled"
result = self.__salt_api.get_pillar(tgt=self.control_name,
pillar=barbican_pillar)
self.barbican = result[0].get(self.control_name, False)
- self.store_runtest_model()
+ if store_run_test_model:
+ self.store_runtest_model()
cirros_pillar = ("salt-call --out=newline_values_only "
"pillar.get "
"glance:client:identity:"
@@ -382,12 +383,13 @@
return {'inspect': inspect,
'logs': logs}
- def prepare_and_run_tempest(self, username='root'):
+ def prepare_and_run_tempest(self, username='root',
+ store_run_test_model=True):
"""
Run tempest tests
"""
tempest_timeout = settings.TEMPEST_TIMEOUT
- self.prepare()
+ self.prepare(store_run_test_model=store_run_test_model)
test_res = self.run_tempest(tempest_timeout)
self.fetch_arficats(username=username)
self.save_runtime_logs(**test_res)
diff --git a/tcp_tests/templates/virtual-offline-pike-ovs-dpdk/salt.yaml b/tcp_tests/templates/virtual-offline-pike-ovs-dpdk/salt.yaml
index b63207a..21dc19d 100644
--- a/tcp_tests/templates/virtual-offline-pike-ovs-dpdk/salt.yaml
+++ b/tcp_tests/templates/virtual-offline-pike-ovs-dpdk/salt.yaml
@@ -73,7 +73,7 @@
retry: {count: 1, delay: 10}
skip_fail: false
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "fluentd" "backupninja" "watchdog" "runtest" "auditd" "logrotate" "gnocchi" "manila" "jenkins" "glusterfs"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "fluentd" "backupninja" "watchdog" "runtest" "auditd" "logrotate" "gnocchi" "manila" "jenkins" "glusterfs" "neutron"') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
diff --git a/tcp_tests/templates/virtual-offline-ssl/salt.yaml b/tcp_tests/templates/virtual-offline-ssl/salt.yaml
index 9898bec..46ab1e4 100644
--- a/tcp_tests/templates/virtual-offline-ssl/salt.yaml
+++ b/tcp_tests/templates/virtual-offline-ssl/salt.yaml
@@ -70,7 +70,7 @@
retry: {count: 1, delay: 1}
skip_fail: true
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "fluentd" "backupninja" "watchdog" "dogtag" "runtest" "manila" "auditd" "logrotate" "gnocchi"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "fluentd" "backupninja" "watchdog" "dogtag" "runtest" "manila" "auditd" "logrotate" "gnocchi" "neutron" ') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
diff --git a/tcp_tests/tests/system/test_install_mcp_ovs_pike.py b/tcp_tests/tests/system/test_install_mcp_ovs_pike.py
index 1077c2f..d10d250 100644
--- a/tcp_tests/tests/system/test_install_mcp_ovs_pike.py
+++ b/tcp_tests/tests/system/test_install_mcp_ovs_pike.py
@@ -399,7 +399,8 @@
openstack_actions.install(commands)
if settings.RUN_TEMPEST:
- tempest_actions.prepare_and_run_tempest()
+ tempest_actions.prepare_and_run_tempest(
+ store_run_test_model=False)
LOG.info("*************** DONE **************")
@pytest.mark.fail_snapshot
@@ -502,10 +503,32 @@
name = 'rally-tempest-net-features:latest'
if settings.RUN_TEMPEST:
- openstack_actions.run_tempest(
+ openstack_actions.prepare_and_run_tempest(
pattern=settings.PATTERN,
conf_name='net_features.conf',
- registry='{0}/{1}'.format(registry, name)
+ registry='{0}/{1}'.format(registry, name),
+ store_run_test_model=False
)
openstack_actions.download_tempest_report()
LOG.info("*************** DONE **************")
+
+ @pytest.mark.grab_versions
+ @pytest.mark.fail_snapshot
+ def test_offline_barbican_install(self, underlay,
+ openstack_deployed,
+ openstack_actions,
+ tempest_actions):
+ """Test for deploying an mcp environment and check it
+ Scenario:
+ 1. Prepare salt on hosts
+ 2. Setup controller nodes
+ 3. Setup compute nodes
+ 4. Run tempest
+
+ """
+ openstack_actions._salt.local(
+ tgt='*', fun='cmd.run',
+ args='service ntp stop; ntpd -gq; service ntp start')
+ if settings.RUN_TEMPEST:
+ tempest_actions.prepare_and_run_tempest(store_run_test_model=False)
+ LOG.info("*************** DONE **************")