summaryrefslogtreecommitdiff
path: root/functionaltests/client/v1/smoke/test_secrets.py
diff options
context:
space:
mode:
authorTakashi Kajinami <tkajinam@redhat.com>2020-04-20 17:48:17 +0900
committerDouglas Mendizábal <dmendiza@redhat.com>2020-06-08 15:40:22 -0500
commit6420da336083d936da9a4563149b08d785d70c84 (patch)
tree9cf7c2ce2cff5e7352d7b35a1dcee3bf675534e4 /functionaltests/client/v1/smoke/test_secrets.py
parente5fdd10f04488d6f6e252a63c57bf2be92a06c8f (diff)
downloadpython-barbicanclient-6420da336083d936da9a4563149b08d785d70c84.tar.gz
Fix gate job failures and py3 compatibility
- Fix incorrect type handling of secret payload in py3 (it should be bytes instead of str by default) - Fix py3 compatibility of test codes - Update expiration date so that resources are created with valid expiration. Change-Id: I4935f601f87e9c49499da1034a320eee2e655b4d
Diffstat (limited to 'functionaltests/client/v1/smoke/test_secrets.py')
-rw-r--r--functionaltests/client/v1/smoke/test_secrets.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/functionaltests/client/v1/smoke/test_secrets.py b/functionaltests/client/v1/smoke/test_secrets.py
index 3f11740..0b9e358 100644
--- a/functionaltests/client/v1/smoke/test_secrets.py
+++ b/functionaltests/client/v1/smoke/test_secrets.py
@@ -21,11 +21,11 @@ from testtools import testcase
secret_create_defaults_data = {
"name": "AES key",
- "expiration": "2020-02-28T19:14:44.180394",
+ "expiration": "2030-02-28T19:14:44.180394",
"algorithm": "aes",
"bit_length": 256,
"mode": "cbc",
- "payload": "gF6+lLoF3ohA9aPRpt+6bQ=="
+ "payload": b"gF6+lLoF3ohA9aPRpt+6bQ=="
}
secret_create_nones_data = {
@@ -34,7 +34,7 @@ secret_create_nones_data = {
"algorithm": None,
"bit_length": None,
"mode": None,
- "payload": "gF6+lLoF3ohA9aPRpt+6bQ==",
+ "payload": b"gF6+lLoF3ohA9aPRpt+6bQ==",
"payload_content_type": "application/octet-stream",
"payload_content_encoding": "base64",
}
@@ -65,8 +65,8 @@ class SecretsTestCase(base.TestCase):
'symmetric': ['symmetric',
'aes',
128,
- ('\x00\x01\x02\x03\x04\x05\x06\x07'
- '\x00\x01\x02\x03\x04\x05\x06\x07')],
+ (b'\x00\x01\x02\x03\x04\x05\x06\x07'
+ b'\x00\x01\x02\x03\x04\x05\x06\x07')],
'private': ['private',
'rsa',
2048,