mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-16 07:31:14 -05:00
Change link test task to trigger both lambda
This modifies the previous "(_)send_link_test" method to trigger a link test for a specific lambda. We then call the method with both the primary and failover lambda in new orchestrator method. Since the _invoke_lambda function doesn't raise exceptions if it fails, there's no need to rescue anything in order to ensure the second link test / invocation runs as well. It doesn't testing for this, since it boils to an absence of code to raise any exception. Note that, like the other parent tests, we only check the new method works with a specific proxy client instance.
This commit is contained in:
@@ -82,9 +82,9 @@ def test_cbc_proxy_lambda_client_has_correct_keys(cbc_proxy_ee):
|
||||
assert secret == 'cbc-proxy-aws-secret-access-key'
|
||||
|
||||
|
||||
def test_cbc_proxy_send_link_tests(mocker, cbc_proxy_ee):
|
||||
def test_cbc_proxy_send_link_test(mocker, cbc_proxy_ee):
|
||||
mock_send_link_test = mocker.patch.object(cbc_proxy_ee, '_send_link_test')
|
||||
cbc_proxy_ee.send_link_tests()
|
||||
cbc_proxy_ee.send_link_test()
|
||||
|
||||
mock_send_link_test.assert_any_call(cbc_proxy_ee.lambda_name)
|
||||
mock_send_link_test.assert_any_call(cbc_proxy_ee.failover_lambda_name)
|
||||
|
||||
Reference in New Issue
Block a user