diff options
author | Takashi Kajinami <tkajinam@redhat.com> | 2022-07-18 13:51:43 +0900 |
---|---|---|
committer | Takashi Kajinami <tkajinam@redhat.com> | 2022-07-18 05:38:23 +0000 |
commit | 69d4a5ee933a0377505b24307a4300a99c9fecb9 (patch) | |
tree | c86288861d1ab8d392d0f5a054beb59c4e060bc6 /heatclient/tests/unit | |
parent | 6b72237c7a16dd471d8ae929f2678599fc7766ad (diff) | |
download | python-heatclient-69d4a5ee933a0377505b24307a4300a99c9fecb9.tar.gz |
Accept sha256 hash for swift tempurl
Since swiftclient 4.0.1, sha256 is used when generating tempurl
signature[1].
This change extends the regex pattern to assert signatues so that it
can accept both sha1(old) and sha256(current).
[1] https://review.opendev.org/c/openstack/python-swiftclient/+/845157
Change-Id: I1589adbe4501b1c678f197b9c0f67b716c341b2d
Diffstat (limited to 'heatclient/tests/unit')
-rw-r--r-- | heatclient/tests/unit/test_deployment_utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/heatclient/tests/unit/test_deployment_utils.py b/heatclient/tests/unit/test_deployment_utils.py index d9a7857..e7ff138 100644 --- a/heatclient/tests/unit/test_deployment_utils.py +++ b/heatclient/tests/unit/test_deployment_utils.py @@ -292,7 +292,7 @@ class TempURLSignalTest(testtools.TestCase): url = deployment_utils.create_temp_url(swift_client, 'bar', 60) self.assertFalse(swift_client.post_account.called) regexp = (r"http://fake-host.com:8080/v1/AUTH_demo/bar-%s" - r"/%s\?temp_url_sig=[0-9a-f]{40}&" + r"/%s\?temp_url_sig=[0-9a-f]{40,64}&" r"temp_url_expires=[0-9]{10}" % (uuid_pattern, uuid_pattern)) self.assertThat(url, matchers.MatchesRegex(regexp)) |