From 57ba6183f6264b535259f625d10b80480c2e5a98 Mon Sep 17 00:00:00 2001 From: Heitor Neiva Date: Thu, 26 Jan 2023 15:17:02 -0800 Subject: [PATCH 1/2] [Jan 2023 rotation] New scriptworker ed25519 key --- src/scriptworker/constants.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scriptworker/constants.py b/src/scriptworker/constants.py index 8b30f5ee..b2d7310a 100644 --- a/src/scriptworker/constants.py +++ b/src/scriptworker/constants.py @@ -99,6 +99,8 @@ [ # 2022 key, RELENG-828 "uJhnk8irgYrkrcxnJUdfIsJo3gntBL+jvZNhNt/pJ/0=", + # Jan 2023 rotation key + "kG5eQqe8AuTIGqW55+6vTxxTansuTOU0drJS7C3VyPo=", ] ), } From 92aada2971cd74906b3b684ed3cda21bc0285770 Mon Sep 17 00:00:00 2001 From: Heitor Neiva Date: Fri, 27 Jan 2023 11:10:39 -0800 Subject: [PATCH 2/2] Fix assert_called_once_with --- tests/test_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index e291a786..96aff15b 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -248,10 +248,10 @@ async def decorated_always_fail(*args, **kwargs): # create_temp_creds {{{1 def test_create_temp_creds(): - with mock.patch.object(utils, "createTemporaryCredentials") as p: - p.return_value = {"one": b"one", "two": "two"} + with mock.patch.object(utils, "createTemporaryCredentials") as patched: + patched.return_value = {"one": b"one", "two": "two"} creds = utils.create_temp_creds("clientId", "accessToken", "start", "expires") - assert p.called_once_with("clientId", "accessToken", "start", "expires", ["assume:project:taskcluster:worker-test-scopes"], name=None) + patched.assert_called_once_with("clientId", "accessToken", "start", "expires", ["assume:project:taskcluster:worker-test-scopes"], name=None) assert creds == {"one": "one", "two": "two"}