From 95bd62a751501caf0755e79e33de7a42f72deb27 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Wed, 5 Sep 2018 21:48:24 +0200 Subject: Conform with Barbican gates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- docker/smoke/testcases.yaml | 4 +-- functest/ci/testcases.yaml | 4 +-- .../opnfv_tests/openstack/barbican/__init__.py | 0 .../opnfv_tests/openstack/barbican/barbican.py | 41 ++++++++++++++++++++++ setup.cfg | 1 + 5 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 functest/opnfv_tests/openstack/barbican/__init__.py create mode 100644 functest/opnfv_tests/openstack/barbican/barbican.py 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 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 -- cgit 1.2.3-korg