From e7f7f1c3bd92d0e9aa092fd6898c53a0610f18e8 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Mon, 29 Aug 2022 21:38:04 +0200 Subject: [PATCH] Make tests pass after 2038 time.time is used to not just shift the exiry time further into the future. This bug was found while working on reproducible builds for openSUSE. Change-Id: I146be9afa3ef54288218daa7ae21f7a7cb5aab67 --- heatclient/tests/unit/test_deployment_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/heatclient/tests/unit/test_deployment_utils.py b/heatclient/tests/unit/test_deployment_utils.py index e7ff138f..f68674aa 100644 --- a/heatclient/tests/unit/test_deployment_utils.py +++ b/heatclient/tests/unit/test_deployment_utils.py @@ -17,6 +17,7 @@ import swiftclient.client import testscenarios import testtools from testtools import matchers +import time from heatclient.common import deployment_utils from heatclient import exc @@ -297,7 +298,7 @@ class TempURLSignalTest(testtools.TestCase): self.assertThat(url, matchers.MatchesRegex(regexp)) timeout = int(url.split('=')[-1]) - self.assertTrue(timeout < 2147483647) + self.assertTrue(timeout < time.time() + 2*365*24*60*60) def test_get_temp_url_no_account_key(self): swift_client = mock.MagicMock()