Fix test failures on systems with 32-bit time_t (#4954)

This commit is contained in:
Michał Górny 2022-03-20 17:22:15 +01:00 committed by GitHub
parent 626629ef82
commit 2d5ae58120
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 5 deletions

View File

@ -160,7 +160,10 @@ def test_describe_certificate():
client = boto3.client("acm", region_name="eu-central-1")
arn = _import_cert(client)
resp = client.describe_certificate(CertificateArn=arn)
try:
resp = client.describe_certificate(CertificateArn=arn)
except OverflowError:
pytest.skip("This test requires 64-bit time_t")
resp["Certificate"]["CertificateArn"].should.equal(arn)
resp["Certificate"]["DomainName"].should.equal(SERVER_COMMON_NAME)
resp["Certificate"]["Issuer"].should.equal("Moto")

View File

@ -22,9 +22,12 @@ def test_create_and_describe_budget_minimal_params():
)
resp["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
budget = client.describe_budget(AccountId=ACCOUNT_ID, BudgetName="testbudget")[
"Budget"
]
try:
budget = client.describe_budget(AccountId=ACCOUNT_ID, BudgetName="testbudget")[
"Budget"
]
except OverflowError:
pytest.skip("This test requires 64-bit time_t")
budget.should.have.key("BudgetLimit")
budget["BudgetLimit"].should.have.key("Amount")
budget["BudgetLimit"]["Amount"].should.equal("10")
@ -140,7 +143,10 @@ def test_create_and_describe_all_budgets():
},
)
res = client.describe_budgets(AccountId=ACCOUNT_ID)
try:
res = client.describe_budgets(AccountId=ACCOUNT_ID)
except OverflowError:
pytest.skip("This test requires 64-bit time_t")
res["Budgets"].should.have.length_of(1)