Merge "Add idempotent_id lines for tests"
This commit is contained in:
commit
35c2c57f45
|
@ -12,12 +12,15 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from tempest.lib import decorators
|
||||||
|
|
||||||
from barbican_tempest_plugin.tests.api import base
|
from barbican_tempest_plugin.tests.api import base
|
||||||
|
|
||||||
|
|
||||||
class ConsumersTest(base.BaseKeyManagerTest):
|
class ConsumersTest(base.BaseKeyManagerTest):
|
||||||
"""Containers API tests."""
|
"""Containers API tests."""
|
||||||
|
|
||||||
|
@decorators.idempotent_id('7d46a170-6b3b-4f4d-903a-b29aebb93289')
|
||||||
def test_add_delete_consumers_in_container(self):
|
def test_add_delete_consumers_in_container(self):
|
||||||
# Create a container to test against
|
# Create a container to test against
|
||||||
body = self.create_container(
|
body = self.create_container(
|
||||||
|
|
|
@ -12,12 +12,15 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from tempest.lib import decorators
|
||||||
|
|
||||||
from barbican_tempest_plugin.tests.api import base
|
from barbican_tempest_plugin.tests.api import base
|
||||||
|
|
||||||
|
|
||||||
class ContainersTest(base.BaseKeyManagerTest):
|
class ContainersTest(base.BaseKeyManagerTest):
|
||||||
"""Containers API tests."""
|
"""Containers API tests."""
|
||||||
|
|
||||||
|
@decorators.idempotent_id('2e13d4bb-54de-463a-a358-0fb9a221d8f3')
|
||||||
def test_create_list_delete_empty_container(self):
|
def test_create_list_delete_empty_container(self):
|
||||||
# Create a container to test against.
|
# Create a container to test against.
|
||||||
body = self.create_container(type="generic", name="empty-container")
|
body = self.create_container(type="generic", name="empty-container")
|
||||||
|
@ -61,6 +64,7 @@ class ContainersTest(base.BaseKeyManagerTest):
|
||||||
|
|
||||||
# Leave the container behind to get cleaned up by infra.
|
# Leave the container behind to get cleaned up by infra.
|
||||||
|
|
||||||
|
@decorators.idempotent_id('af10a78d-b1f8-440d-8b89-639861f16fd0')
|
||||||
def test_add_to_delete_from_container(self):
|
def test_add_to_delete_from_container(self):
|
||||||
# Create a container to test against.
|
# Create a container to test against.
|
||||||
body = self.create_container(type="generic", name="test-container")
|
body = self.create_container(type="generic", name="test-container")
|
||||||
|
|
|
@ -12,12 +12,15 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from tempest.lib import decorators
|
||||||
|
|
||||||
from barbican_tempest_plugin.tests.api import base
|
from barbican_tempest_plugin.tests.api import base
|
||||||
|
|
||||||
|
|
||||||
class OrdersTest(base.BaseKeyManagerTest):
|
class OrdersTest(base.BaseKeyManagerTest):
|
||||||
"""Orders API tests."""
|
"""Orders API tests."""
|
||||||
|
|
||||||
|
@decorators.idempotent_id('077c1729-1950-4e62-a29c-daba4aa186ad')
|
||||||
def test_create_list_delete_orders(self):
|
def test_create_list_delete_orders(self):
|
||||||
# Confirm that there are no orders
|
# Confirm that there are no orders
|
||||||
body = self.order_client.list_orders()
|
body = self.order_client.list_orders()
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
from barbican_tempest_plugin.tests.api import base
|
from barbican_tempest_plugin.tests.api import base
|
||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
|
from tempest.lib import decorators
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
||||||
|
@ -22,6 +23,7 @@ CONF = config.CONF
|
||||||
class QuotasTest(base.BaseKeyManagerTest):
|
class QuotasTest(base.BaseKeyManagerTest):
|
||||||
"""Quotas API tests."""
|
"""Quotas API tests."""
|
||||||
|
|
||||||
|
@decorators.idempotent_id('47ebc42b-0e53-4060-b1a1-55bee2c7c43f')
|
||||||
def test_create_get_delete_quota(self):
|
def test_create_get_delete_quota(self):
|
||||||
# Verify the default quota settings
|
# Verify the default quota settings
|
||||||
body = self.quota_client.get_default_project_quota()
|
body = self.quota_client.get_default_project_quota()
|
||||||
|
|
|
@ -13,11 +13,14 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from tempest.lib import decorators
|
||||||
|
|
||||||
from barbican_tempest_plugin.tests.api import base
|
from barbican_tempest_plugin.tests.api import base
|
||||||
|
|
||||||
|
|
||||||
class SecretMetadataTest(base.BaseKeyManagerTest):
|
class SecretMetadataTest(base.BaseKeyManagerTest):
|
||||||
"""Metadata API test"""
|
"""Metadata API test"""
|
||||||
|
@decorators.idempotent_id('2b0c1707-afc3-4674-a6c6-4dc42f318117')
|
||||||
def test_secret_metadata(self):
|
def test_secret_metadata(self):
|
||||||
# Create a secret
|
# Create a secret
|
||||||
sec = self.create_secret()
|
sec = self.create_secret()
|
||||||
|
|
|
@ -22,16 +22,20 @@ from cryptography.hazmat.backends import default_backend
|
||||||
from cryptography.hazmat.primitives import hashes
|
from cryptography.hazmat.primitives import hashes
|
||||||
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
|
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
|
||||||
|
|
||||||
|
from tempest.lib import decorators
|
||||||
|
|
||||||
from barbican_tempest_plugin.tests.api import base
|
from barbican_tempest_plugin.tests.api import base
|
||||||
|
|
||||||
|
|
||||||
class SecretsTest(base.BaseKeyManagerTest):
|
class SecretsTest(base.BaseKeyManagerTest):
|
||||||
"""Secrets API tests."""
|
"""Secrets API tests."""
|
||||||
|
@decorators.idempotent_id('d5fb4ae4-c418-4405-9701-95fc6877aeb9')
|
||||||
def test_create_delete_empty_secret(self):
|
def test_create_delete_empty_secret(self):
|
||||||
sec = self.create_secret()
|
sec = self.create_secret()
|
||||||
uuid = base._get_uuid(sec['secret_ref'])
|
uuid = base._get_uuid(sec['secret_ref'])
|
||||||
self.delete_secret(uuid)
|
self.delete_secret(uuid)
|
||||||
|
|
||||||
|
@decorators.idempotent_id('9aee2ad3-5b61-4451-8ccc-a727bbe4618a')
|
||||||
def test_create_delete_symmetric_key(self):
|
def test_create_delete_symmetric_key(self):
|
||||||
password = b"password"
|
password = b"password"
|
||||||
salt = os.urandom(16)
|
salt = os.urandom(16)
|
||||||
|
@ -50,6 +54,7 @@ class SecretsTest(base.BaseKeyManagerTest):
|
||||||
uuid = base._get_uuid(sec['secret_ref'])
|
uuid = base._get_uuid(sec['secret_ref'])
|
||||||
self.delete_secret(uuid)
|
self.delete_secret(uuid)
|
||||||
|
|
||||||
|
@decorators.idempotent_id('79ec555d-215d-4006-bcf0-ab4c6cb0b9ff')
|
||||||
def test_list_secrets(self):
|
def test_list_secrets(self):
|
||||||
# Create two secrets
|
# Create two secrets
|
||||||
self.create_secret(name='secret_1')
|
self.create_secret(name='secret_1')
|
||||||
|
@ -64,6 +69,7 @@ class SecretsTest(base.BaseKeyManagerTest):
|
||||||
secrets = resp['secrets']
|
secrets = resp['secrets']
|
||||||
self.assertEqual('secret_2', secrets[0]['name'])
|
self.assertEqual('secret_2', secrets[0]['name'])
|
||||||
|
|
||||||
|
@decorators.idempotent_id('f5608620-f1f7-45a5-ac0a-e1c17d1f2f42')
|
||||||
def test_get_secret_metadata(self):
|
def test_get_secret_metadata(self):
|
||||||
secret = self.create_secret()
|
secret = self.create_secret()
|
||||||
uuid = base._get_uuid(secret['secret_ref'])
|
uuid = base._get_uuid(secret['secret_ref'])
|
||||||
|
@ -71,6 +77,7 @@ class SecretsTest(base.BaseKeyManagerTest):
|
||||||
self.assertEqual(uuid, base._get_uuid(resp['secret_ref']))
|
self.assertEqual(uuid, base._get_uuid(resp['secret_ref']))
|
||||||
self.delete_secret(uuid)
|
self.delete_secret(uuid)
|
||||||
|
|
||||||
|
@decorators.idempotent_id('c5caa619-1e43-4724-8d94-a61ff7025a07')
|
||||||
def test_get_and_put_payload(self):
|
def test_get_and_put_payload(self):
|
||||||
# Create secret without payload
|
# Create secret without payload
|
||||||
secret = self.create_secret()
|
secret = self.create_secret()
|
||||||
|
|
|
@ -19,10 +19,13 @@ test_barbican_tempest_plugin
|
||||||
Tests for `barbican_tempest_plugin` module.
|
Tests for `barbican_tempest_plugin` module.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from tempest.lib import decorators
|
||||||
|
|
||||||
from barbican_tempest_plugin.tests import base
|
from barbican_tempest_plugin.tests import base
|
||||||
|
|
||||||
|
|
||||||
class TestBarbican_tempest_plugin(base.TestCase):
|
class TestBarbican_tempest_plugin(base.TestCase):
|
||||||
|
|
||||||
|
@decorators.idempotent_id('8abf6dec-37b9-43ca-95cf-b8ebecda3c8d')
|
||||||
def test_something(self):
|
def test_something(self):
|
||||||
pass
|
pass
|
||||||
|
|
4
tox.ini
4
tox.ini
|
@ -13,7 +13,9 @@ deps = -r{toxinidir}/test-requirements.txt
|
||||||
commands = python setup.py test --slowest --testr-args='{posargs}'
|
commands = python setup.py test --slowest --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8 {posargs}
|
commands =
|
||||||
|
flake8 {posargs}
|
||||||
|
check-uuid --package barbican_tempest_plugin
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
Loading…
Reference in New Issue