Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverted empty argument and updated tests for add_listener_certificates #95

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion renewer/tasks/alb.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def associate_certificate(session, operation_id: int, route_type: RouteType):

alb.add_listener_certificates(
ListenerArn=route_alb.listener_arn,
Certificates=[{"CertificateArn": certificate.iam_server_certificate_arn}, ],
Certificates=[{"CertificateArn": certificate.iam_server_certificate_arn}],
)


Expand Down
10 changes: 5 additions & 5 deletions tests/lib/fake_alb.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ class FakeALB(FakeAWS):
def expect_get_certificates_for_listener(
self, listener_arn, num_certificates=0, add_cert_arn=None
):
certificates = [{"CertificateArn": "certificate-arn", "IsDefault": True}]
certificates = [{"CertificateArn": "certificate-arn"}]
if add_cert_arn is not None:
certificates.append({"CertificateArn": add_cert_arn, "IsDefault": False})
certificates.append({"CertificateArn": add_cert_arn})
for i in range(num_certificates):
certificates.append(
{"CertificateArn": f"certificate-arn-{i}", "IsDefault": False}
{"CertificateArn": f"certificate-arn-{i}"}
)
self.stubber.add_response(
"describe_listener_certificates",
Expand All @@ -27,8 +27,8 @@ def expect_add_certificate_to_listener(self, listener_arn, iam_cert_arn):
"add_listener_certificates",
{
"Certificates": [
{"CertificateArn": "arn:2", "IsDefault": True},
{"CertificateArn": iam_cert_arn, "IsDefault": False},
{"CertificateArn": "arn:2"},
{"CertificateArn": iam_cert_arn},
]
},
{
Expand Down
Loading