Fix unittest of encryption_types_client
Replace the data of FAKE_CREATE_ENCRYPTION_TYPE and
FAKE_INFO_ENCRYPTION_TYPE as the API document described
Change-Id: I892e27c4219da956c452fda067ee5fef08295c30
Closes-Bug: #1836133
diff --git a/tempest/tests/lib/services/volume/v3/test_encryption_types_client.py b/tempest/tests/lib/services/volume/v3/test_encryption_types_client.py
index 87bd379..70a3ee5 100644
--- a/tempest/tests/lib/services/volume/v3/test_encryption_types_client.py
+++ b/tempest/tests/lib/services/volume/v3/test_encryption_types_client.py
@@ -20,17 +20,16 @@
class TestEncryptionTypesClient(base.BaseServiceTest):
FAKE_CREATE_ENCRYPTION_TYPE = {
"encryption": {
- "id": "cbc36478b0bd8e67e89",
- "name": "FakeEncryptionType",
- "type": "fakeType",
+ "volume_type_id": "cbc36478b0bd8e67e89",
+ "control_location": "front-end",
+ "encryption_id": "81e069c6-7394-4856-8df7-3b237ca61f74",
+ "key_size": 128,
"provider": "LuksEncryptor",
- "cipher": "aes-xts-plain64",
- "key_size": "512",
- "control_location": "front-end"
+ "cipher": "aes-xts-plain64"
}
}
- UPDATE_ENCRYPTION_TYPE = {
+ FAKE_UPDATE_ENCRYPTION_TYPE = {
"encryption": {
"key_size": 64,
"provider": "LuksEncryptor",
@@ -40,16 +39,16 @@
}
FAKE_INFO_ENCRYPTION_TYPE = {
- "encryption": {
- "name": "FakeEncryptionType",
- "type": "fakeType",
- "description": "test_description",
- "volume_type": "fakeType",
- "provider": "LuksEncryptor",
- "cipher": "aes-xts-plain64",
- "key_size": "512",
- "control_location": "front-end"
- }
+ "volume_type_id": "cbc36478b0bd8e67e89",
+ "control_location": "front-end",
+ "deleted": False,
+ "created_at": "2015-08-27T09:49:58-05:00",
+ "updated_at": "2015-08-29T09:49:58-05:00",
+ "encryption_id": "81e069c6-7394-4856-8df7-3b237ca61f74",
+ "key_size": 128,
+ "provider": "LuksEncryptor",
+ "deleted_at": "2015-08-30T09:49:58-05:00",
+ "cipher": "aes-xts-plain64"
}
FAKE_ENCRYPTION_SPECS_ITEM = {
@@ -119,5 +118,5 @@
self.check_service_client_function(
self.client.update_encryption_type,
'tempest.lib.common.rest_client.RestClient.put',
- self.UPDATE_ENCRYPTION_TYPE,
+ self.FAKE_UPDATE_ENCRYPTION_TYPE,
bytes_body, volume_type_id="cbc36478b0bd8e67e89")