Skip to content

Commit 35b7436

Browse files
committed
Revert "regenerate ACM snapshot tests"
This reverts commit 0a630c6.
1 parent 1cdccbd commit 35b7436

File tree

3 files changed

+15
-58
lines changed

3 files changed

+15
-58
lines changed

tests/aws/services/acm/test_acm.py

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import pytest
2-
from botocore.exceptions import ClientError
32
from localstack_snapshot.snapshots.transformer import SortingTransformer
43
from moto import settings as moto_settings
54

65
from localstack.testing.aws.util import is_aws_cloud
76
from localstack.testing.pytest import markers
87
from localstack.utils.crypto import generate_ssl_cert
98
from localstack.utils.strings import short_uid
10-
from localstack.utils.sync import retry, wait_until
9+
from localstack.utils.sync import retry
1110

1211

1312
class TestACM:
@@ -28,7 +27,7 @@ class TestACM:
2827
]
2928
)
3029
def test_import_certificate(self, tmp_path, aws_client, cleanups, snapshot):
31-
with pytest.raises(ClientError) as exc_info:
30+
with pytest.raises(Exception) as exc_info:
3231
aws_client.acm.import_certificate(Certificate=b"CERT123", PrivateKey=b"KEY123")
3332
assert exc_info.value.response["Error"]["Code"] == "ValidationException"
3433

@@ -73,15 +72,6 @@ def test_domain_validation(self, acm_request_certificate, aws_client, snapshot):
7372
snapshot.add_transformer(snapshot.transform.key_value("SignatureAlgorithm"))
7473

7574
certificate_arn = acm_request_certificate()["CertificateArn"]
76-
77-
# we are manually waiting for some fields to be returned, as they are missing soon after creating the cert
78-
def _cert_has_required_fields() -> bool:
79-
_resp = aws_client.acm.describe_certificate(CertificateArn=certificate_arn)
80-
return "DomainName" in _resp["Certificate"]
81-
82-
if is_aws_cloud():
83-
wait_until(_cert_has_required_fields, wait=2, max_retries=20)
84-
8575
result = aws_client.acm.describe_certificate(CertificateArn=certificate_arn)
8676
snapshot.match("describe-certificate", result)
8777

@@ -94,17 +84,8 @@ def test_boto_wait_for_certificate_validation(
9484
waiter = aws_client.acm.get_waiter("certificate_validated")
9585
waiter.wait(CertificateArn=certificate_arn, WaiterConfig={"Delay": 0.5, "MaxAttempts": 3})
9686

97-
@markers.aws.manual_setup_required
98-
# this test requires manual input to our DNS provider
99-
@markers.snapshot.skip_snapshot_verify(
100-
paths=[
101-
"$..Certificate.SignatureAlgorithm",
102-
# those should also be returned by AWS, but regenerating the snapshots needs manual input
103-
# skipped for now, validated by other tests
104-
"$..Certificate.Options.Export",
105-
"$..Exported",
106-
]
107-
)
87+
@markers.aws.validated
88+
@markers.snapshot.skip_snapshot_verify(paths=["$..Certificate.SignatureAlgorithm"])
10889
def test_certificate_for_subdomain_wildcard(
10990
self, acm_request_certificate, aws_client, snapshot, monkeypatch
11091
):
@@ -142,7 +123,7 @@ def _get_cert_with_records():
142123
if is_aws_cloud():
143124
# Wait until DNS entry has been added (needs to be done manually!)
144125
# Note: When running parity tests against AWS, we need to add the CNAME record to our DNS
145-
# server (currently with Route53), to enable validation of the certificate.
126+
# server (currently with gandi.net), to enable validation of the certificate.
146127
prompt = (
147128
f"Please add the following CNAME entry to the LocalStack DNS server, then hit [ENTER] once "
148129
f"the certificate has been validated in AWS: {dns_options['Name']} = {dns_options['Value']}"
@@ -180,7 +161,6 @@ def _get_cert_issued():
180161
"$..ResourceRecord",
181162
"$..SignatureAlgorithm",
182163
"$..Serial",
183-
"$..ExportOption",
184164
]
185165
)
186166
def test_create_certificate_for_multiple_alternative_domains(

tests/aws/services/acm/test_acm.snapshot.json

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -139,21 +139,19 @@
139139
}
140140
},
141141
"tests/aws/services/acm/test_acm.py::TestACM::test_create_certificate_for_multiple_alternative_domains": {
142-
"recorded-date": "14-10-2025, 09:18:38",
142+
"recorded-date": "09-01-2024, 14:58:14",
143143
"recorded-content": {
144144
"list-cert-summary-list": {
145145
"CertificateArn": "arn:<partition>:acm:<region>:111111111111:certificate/<cert-id>",
146146
"CreatedAt": "datetime",
147147
"DomainName": "test.example.com",
148-
"ExportOption": "DISABLED",
149-
"Exported": false,
150148
"ExtendedKeyUsages": [],
151149
"HasAdditionalSubjectAlternativeNames": false,
152150
"InUse": false,
153151
"KeyAlgorithm": "RSA-2048",
154152
"KeyUsages": [],
155153
"RenewalEligibility": "INELIGIBLE",
156-
"Status": "PENDING_VALIDATION",
154+
"Status": "FAILED",
157155
"SubjectAlternativeNameSummaries": [
158156
"*.test.example.com",
159157
"another.domain.com",
@@ -203,8 +201,7 @@
203201
"KeyAlgorithm": "RSA-2048",
204202
"KeyUsages": [],
205203
"Options": {
206-
"CertificateTransparencyLoggingPreference": "ENABLED",
207-
"Export": "DISABLED"
204+
"CertificateTransparencyLoggingPreference": "ENABLED"
208205
},
209206
"RenewalEligibility": "INELIGIBLE",
210207
"SignatureAlgorithm": "SHA256WITHRSA",
@@ -221,7 +218,7 @@
221218
}
222219
},
223220
"tests/aws/services/acm/test_acm.py::TestACM::test_import_certificate": {
224-
"recorded-date": "14-10-2025, 09:17:56",
221+
"recorded-date": "22-02-2024, 17:41:15",
225222
"recorded-content": {
226223
"import-certificate-response": {
227224
"CertificateArn": "arn:<partition>:acm:<region>:111111111111:certificate/<cert-id>",
@@ -273,8 +270,7 @@
273270
"NotAfter": "datetime",
274271
"NotBefore": "datetime",
275272
"Options": {
276-
"CertificateTransparencyLoggingPreference": "DISABLED",
277-
"Export": "DISABLED"
273+
"CertificateTransparencyLoggingPreference": "DISABLED"
278274
},
279275
"RenewalEligibility": "INELIGIBLE",
280276
"Serial": "03:e9",
@@ -297,7 +293,7 @@
297293
}
298294
},
299295
"tests/aws/services/acm/test_acm.py::TestACM::test_domain_validation": {
300-
"recorded-date": "14-10-2025, 09:31:48",
296+
"recorded-date": "12-04-2024, 15:36:37",
301297
"recorded-content": {
302298
"describe-certificate": {
303299
"Certificate": {
@@ -319,8 +315,7 @@
319315
"KeyAlgorithm": "RSA-2048",
320316
"KeyUsages": [],
321317
"Options": {
322-
"CertificateTransparencyLoggingPreference": "ENABLED",
323-
"Export": "DISABLED"
318+
"CertificateTransparencyLoggingPreference": "ENABLED"
324319
},
325320
"RenewalEligibility": "INELIGIBLE",
326321
"SignatureAlgorithm": "<signature-algorithm:1>",

tests/aws/services/acm/test_acm.validation.json

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,12 @@
33
"last_validated_date": "2023-04-18T17:01:27+00:00"
44
},
55
"tests/aws/services/acm/test_acm.py::TestACM::test_create_certificate_for_multiple_alternative_domains": {
6-
"last_validated_date": "2025-10-14T09:18:39+00:00",
7-
"durations_in_seconds": {
8-
"setup": 0.45,
9-
"call": 5.97,
10-
"teardown": 0.19,
11-
"total": 6.61
12-
}
6+
"last_validated_date": "2024-01-09T14:58:14+00:00"
137
},
148
"tests/aws/services/acm/test_acm.py::TestACM::test_domain_validation": {
15-
"last_validated_date": "2025-10-14T09:31:48+00:00",
16-
"durations_in_seconds": {
17-
"setup": 0.46,
18-
"call": 2.94,
19-
"teardown": 0.21,
20-
"total": 3.61
21-
}
9+
"last_validated_date": "2024-04-12T15:36:37+00:00"
2210
},
2311
"tests/aws/services/acm/test_acm.py::TestACM::test_import_certificate": {
24-
"last_validated_date": "2025-10-14T09:17:56+00:00",
25-
"durations_in_seconds": {
26-
"setup": 0.48,
27-
"call": 1.25,
28-
"teardown": 0.25,
29-
"total": 1.98
30-
}
12+
"last_validated_date": "2024-02-22T17:41:15+00:00"
3113
}
3214
}

0 commit comments

Comments
 (0)