aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-09-05 21:48:24 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-09-05 22:40:05 +0200
commit95bd62a751501caf0755e79e33de7a42f72deb27 (patch)
tree4aceb0eb4473d98a8cfb467c6aeb5ee0ee801651
parent9ec639526ed32d4b05168627c5c016fb66b7d008 (diff)
Conform with Barbican gates
tempest.conf conforms with Devstack post-actions [1]. One test is still disabled as it may force to sign all images. A deeper analysis has to be done before enabling it. [1] https://github.com/openstack/barbican-tempest-plugin/blob/master/tools/pre_test_hook.sh Change-Id: I163c0e7c4671ca67f0b6c127c29fdcb12a8e426b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--docker/smoke/testcases.yaml4
-rw-r--r--functest/ci/testcases.yaml4
-rw-r--r--functest/opnfv_tests/openstack/barbican/__init__.py0
-rw-r--r--functest/opnfv_tests/openstack/barbican/barbican.py41
-rw-r--r--setup.cfg1
5 files changed, 46 insertions, 4 deletions
diff --git a/docker/smoke/testcases.yaml b/docker/smoke/testcases.yaml
index bddecc3d9..a510c6474 100644
--- a/docker/smoke/testcases.yaml
+++ b/docker/smoke/testcases.yaml
@@ -163,9 +163,9 @@ tiers:
It leverages on the tempest plugin containing tests used to
verify the functionality of a barbican installation.
run:
- name: tempest_common
+ name: barbican
args:
mode:
- 'barbican_tempest_plugin.tests.(api|scenario).(?!test_image_signing)'
+ '^barbican_tempest_plugin.((?!test_signed_image_upload_boot_failure).)*$'
services:
- barbican
diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml
index 20dc865d1..2413287ac 100644
--- a/functest/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
@@ -335,10 +335,10 @@ tiers:
It leverages on the tempest plugin containing tests used to
verify the functionality of a barbican installation.
run:
- name: tempest_common
+ name: barbican
args:
mode:
- 'barbican_tempest_plugin.tests.(api|scenario).(?!test_image_signing)'
+ '^barbican_tempest_plugin.((?!test_signed_image_upload_boot_failure).)*$'
services:
- barbican
diff --git a/functest/opnfv_tests/openstack/barbican/__init__.py b/functest/opnfv_tests/openstack/barbican/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/functest/opnfv_tests/openstack/barbican/__init__.py
diff --git a/functest/opnfv_tests/openstack/barbican/barbican.py b/functest/opnfv_tests/openstack/barbican/barbican.py
new file mode 100644
index 000000000..b9488c2b6
--- /dev/null
+++ b/functest/opnfv_tests/openstack/barbican/barbican.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2018 Orange and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# pylint: disable=missing-docstring
+
+import logging
+
+from six.moves import configparser
+
+from functest.opnfv_tests.openstack.tempest import tempest
+
+
+class Barbican(tempest.TempestCommon):
+
+ __logger = logging.getLogger(__name__)
+
+ def configure(self, **kwargs):
+ super(Barbican, self).configure(**kwargs)
+ rconfig = configparser.RawConfigParser()
+ rconfig.read(self.conf_file)
+ if not rconfig.has_section('auth'):
+ rconfig.add_section('auth')
+ rconfig.set('auth', 'tempest_roles', 'creator')
+ if not rconfig.has_section('glance'):
+ rconfig.add_section('glance')
+ rconfig.set('glance', 'verify_glance_signatures', True)
+ if not rconfig.has_section('ephemeral_storage_encryption'):
+ rconfig.add_section('ephemeral_storage_encryption')
+ rconfig.set('ephemeral_storage_encryption', 'enabled', True)
+ if not rconfig.has_section('image-feature-enabled'):
+ rconfig.add_section('image-feature-enabled')
+ rconfig.set('image-feature-enabled', 'api_v1', False)
+ with open(self.conf_file, 'wb') as config_file:
+ rconfig.write(config_file)
+ self.backup_tempest_config(self.conf_file, self.res_dir)
diff --git a/setup.cfg b/setup.cfg
index 0f3a63594..c16f5e82b 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -31,6 +31,7 @@ xtesting.testcase =
rally_sanity = functest.opnfv_tests.openstack.rally.rally:RallySanity
refstack_defcore = functest.opnfv_tests.openstack.refstack.refstack:Refstack
patrole = functest.opnfv_tests.openstack.patrole.patrole:Patrole
+ barbican = functest.opnfv_tests.openstack.barbican.barbican:Barbican
vmtp = functest.opnfv_tests.openstack.vmtp.vmtp:Vmtp
shaker = functest.opnfv_tests.openstack.shaker.shaker:Shaker
snaps_smoke = functest.opnfv_tests.openstack.snaps.smoke:SnapsSmoke