Conform with Barbican gates 57/61857/3
authorCédric Ollivier <cedric.ollivier@orange.com>
Wed, 5 Sep 2018 19:48:24 +0000 (21:48 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Wed, 5 Sep 2018 20:40:05 +0000 (22:40 +0200)
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>
docker/smoke/testcases.yaml
functest/ci/testcases.yaml
functest/opnfv_tests/openstack/barbican/__init__.py [new file with mode: 0644]
functest/opnfv_tests/openstack/barbican/barbican.py [new file with mode: 0644]
setup.cfg

index bddecc3..a510c64 100644 (file)
@@ -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
index 20dc865..2413287 100644 (file)
@@ -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 (file)
index 0000000..e69de29
diff --git a/functest/opnfv_tests/openstack/barbican/barbican.py b/functest/opnfv_tests/openstack/barbican/barbican.py
new file mode 100644 (file)
index 0000000..b9488c2
--- /dev/null
@@ -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)
index 0f3a635..c16f5e8 100644 (file)
--- 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