Merge "Switch to stestr"
diff --git a/.gitreview b/.gitreview
index eb7801e..83ef1a7 100644
--- a/.gitreview
+++ b/.gitreview
@@ -1,4 +1,4 @@
[gerrit]
-host=review.openstack.org
+host=review.opendev.org
port=29418
project=openstack/barbican-tempest-plugin.git
diff --git a/.zuul.yaml b/.zuul.yaml
index 32c02f4..c321caf 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -1,8 +1,12 @@
- project:
+ templates:
+ - tempest-plugin-jobs
+ - check-requirements
check:
jobs:
- barbican-simple-crypto-devstack-tempest
gate:
+ queue: barbican
jobs:
- barbican-simple-crypto-devstack-tempest
experimental:
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 0ebda35..217f5de 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -1,14 +1,14 @@
If you would like to contribute to the development of OpenStack, you must
follow the steps in this page:
- http://docs.openstack.org/infra/manual/developers.html
+ https://docs.openstack.org/infra/manual/developers.html
If you already have a good understanding of how the system works and your
OpenStack accounts are set up, you can skip to the development workflow
section of this documentation to learn how changes to OpenStack should be
submitted for review via the Gerrit tool:
- http://docs.openstack.org/infra/manual/developers.html#development-workflow
+ https://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.
diff --git a/HACKING.rst b/HACKING.rst
index c01bb76..dc1f164 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -1,4 +1,4 @@
barbican_tempest_plugin Style Commandments
===============================================
-Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
+Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/
diff --git a/README.rst b/README.rst
index 20b4c50..929d44f 100644
--- a/README.rst
+++ b/README.rst
@@ -15,10 +15,10 @@
Developers
----------
For more information on barbican, refer to:
-http://docs.openstack.org/developer/barbican/
+https://docs.openstack.org/barbican/latest/
For more information on tempest plugins, refer to:
-http://docs.openstack.org/developer/tempest/plugin.html#using-plugins
+https://docs.openstack.org/tempest/latest/#using-plugins
Bugs
----
diff --git a/barbican_tempest_plugin/clients.py b/barbican_tempest_plugin/clients.py
index 9c009ba..6808da4 100644
--- a/barbican_tempest_plugin/clients.py
+++ b/barbican_tempest_plugin/clients.py
@@ -12,20 +12,11 @@
# License for the specific language governing permissions and limitations under
# the License.
-from tempest import clients
-from tempest.common import credentials_factory as common_creds
from tempest import config
from tempest.lib.services import clients as cli
CONF = config.CONF
-ADMIN_CREDS = common_creds.get_configured_admin_credentials()
-
-
-class Manager(clients.Manager):
- def __init__(self, credentials=ADMIN_CREDS):
- super(Manager, self).__init__(credentials)
-
class Clients(cli.ServiceClients):
"""Tempest stable service clients and loaded plugins service clients"""
diff --git a/barbican_tempest_plugin/config.py b/barbican_tempest_plugin/config.py
index eae7a17..0c4a2ac 100644
--- a/barbican_tempest_plugin/config.py
+++ b/barbican_tempest_plugin/config.py
@@ -43,3 +43,14 @@
default=256,
help="The key size used to encrypt ephemeral storage."),
]
+
+image_signature_verification_group = cfg.OptGroup(
+ name="image_signature_verification",
+ title="Image Signature Verification Options")
+
+ImageSignatureVerificationGroup = [
+ cfg.BoolOpt('enforced',
+ default=True,
+ help="Does the test environment enforce glance image "
+ "verification?"),
+]
diff --git a/barbican_tempest_plugin/plugin.py b/barbican_tempest_plugin/plugin.py
index a586eb0..1914ecb 100644
--- a/barbican_tempest_plugin/plugin.py
+++ b/barbican_tempest_plugin/plugin.py
@@ -37,6 +37,8 @@
conf.register_group(project_config.ephemeral_storage_encryption_group)
conf.register_opts(project_config.EphemeralStorageEncryptionGroup,
project_config.ephemeral_storage_encryption_group)
+ conf.register_opts(project_config.ImageSignatureVerificationGroup,
+ project_config.image_signature_verification_group)
def get_opt_lists(self):
return [('service_available', [project_config.service_option])]
diff --git a/barbican_tempest_plugin/tests/scenario/barbican_manager.py b/barbican_tempest_plugin/tests/scenario/barbican_manager.py
index 8e5d7c4..d560a63 100644
--- a/barbican_tempest_plugin/tests/scenario/barbican_manager.py
+++ b/barbican_tempest_plugin/tests/scenario/barbican_manager.py
@@ -30,7 +30,6 @@
from oslo_log import log as logging
from tempest import config
-from barbican_tempest_plugin import clients
from barbican_tempest_plugin.tests.scenario import manager as mgr
CONF = config.CONF
@@ -40,7 +39,6 @@
class BarbicanScenarioTest(mgr.ScenarioTest):
credentials = ('primary', 'admin')
- manager = clients.Manager()
def setUp(self):
super(BarbicanScenarioTest, self).setUp()
@@ -81,12 +79,8 @@
)
if CONF.compute_feature_enabled.attach_encrypted_volume:
- if CONF.volume_feature_enabled.api_v1:
- cls.admin_volume_types_client =\
- os_adm.volume_types_client
- cls.admin_encryption_types_client =\
- os_adm.encryption_types_client
- else:
+ if (CONF.volume_feature_enabled.api_v2 or
+ CONF.volume_feature_enabled.api_v3):
cls.admin_volume_types_client =\
os_adm.volume_types_v2_client
cls.admin_encryption_types_client =\
diff --git a/barbican_tempest_plugin/tests/scenario/manager.py b/barbican_tempest_plugin/tests/scenario/manager.py
index 391fe02..8be324a 100644
--- a/barbican_tempest_plugin/tests/scenario/manager.py
+++ b/barbican_tempest_plugin/tests/scenario/manager.py
@@ -75,10 +75,8 @@
cls.security_group_rules_client = (
cls.os_primary.security_group_rules_client)
- if CONF.volume_feature_enabled.api_v1:
- cls.volumes_client = cls.os_primary.volumes_client
- cls.snapshots_client = cls.os_primary.snapshots_client
- else:
+ if (CONF.volume_feature_enabled.api_v2 or
+ CONF.volume_feature_enabled.api_v3):
cls.volumes_client = cls.os_primary.volumes_client_latest
cls.snapshots_client = cls.os_primary.snapshots_client_latest
diff --git a/barbican_tempest_plugin/tests/scenario/test_image_signing.py b/barbican_tempest_plugin/tests/scenario/test_image_signing.py
index 794d33e..191b613 100644
--- a/barbican_tempest_plugin/tests/scenario/test_image_signing.py
+++ b/barbican_tempest_plugin/tests/scenario/test_image_signing.py
@@ -70,6 +70,10 @@
* Attempt to boot the incorrectly signed image
* Confirm an exception is thrown
"""
+ if not CONF.image_signature_verification.enforced:
+ raise self.skipException("Image signature verification is not "
+ "enforced in this environment")
+
img_uuid = self.sign_and_upload_image()
LOG.debug("Modifying image signature to be incorrect")
diff --git a/test-requirements.txt b/test-requirements.txt
index f3062b0..c2d595b 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -5,8 +5,6 @@
hacking<0.13,>=0.12.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD
-sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
-oslosphinx>=4.7.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
diff --git a/tox.ini b/tox.ini
index 6fec391..0786202 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,7 +5,7 @@
[testenv]
usedevelop = True
-install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
+install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning