summaryrefslogtreecommitdiff
path: root/dev-python/moto/files/moto-4.2.12-32bit-time.patch
blob: fc9470c1ecab681418c0b6af3d46ac5c179e3170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From 7afd91fd23ad73550fcc621422e04a3734dc890d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Thu, 18 Jan 2024 13:32:07 +0100
Subject: [PATCH] Fix more test failures on platforms with 32-bit time_t
 (#7222)

---
 tests/test_acm/test_acm.py                      | 5 ++++-
 tests/test_sagemaker/test_sagemaker_pipeline.py | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/test_acm/test_acm.py b/tests/test_acm/test_acm.py
index d0c46d20c..d2943d801 100644
--- a/tests/test_acm/test_acm.py
+++ b/tests/test_acm/test_acm.py
@@ -92,7 +92,10 @@ def test_list_certificates():
     issued_arn = _import_cert(client)
     pending_arn = client.request_certificate(DomainName="google.com")["CertificateArn"]
 
-    certs = client.list_certificates()["CertificateSummaryList"]
+    try:
+        certs = client.list_certificates()["CertificateSummaryList"]
+    except OverflowError:
+        pytest.skip("This test requires 64-bit time_t")
     assert issued_arn in [c["CertificateArn"] for c in certs]
     assert pending_arn in [c["CertificateArn"] for c in certs]
     for cert in certs:
diff --git a/tests/test_sagemaker/test_sagemaker_pipeline.py b/tests/test_sagemaker/test_sagemaker_pipeline.py
index 8323eb29b..31443b26b 100644
--- a/tests/test_sagemaker/test_sagemaker_pipeline.py
+++ b/tests/test_sagemaker/test_sagemaker_pipeline.py
@@ -515,7 +515,10 @@ def test_list_pipelines_created_after(sagemaker_client):
     _ = create_sagemaker_pipelines(sagemaker_client, pipelines)
 
     created_after_str = "2099-12-31 23:59:59"
-    response = sagemaker_client.list_pipelines(CreatedAfter=created_after_str)
+    try:
+        response = sagemaker_client.list_pipelines(CreatedAfter=created_after_str)
+    except OverflowError:
+        pytest.skip("This test requires 64-bit time_t")
     assert not response["PipelineSummaries"]
 
     created_after_datetime = datetime.strptime(created_after_str, "%Y-%m-%d %H:%M:%S")
-- 
2.43.0