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

Make tests pass in 2020 #140

Merged
merged 1 commit into from May 8, 2019
Merged

Make tests pass in 2020 #140

merged 1 commit into from May 8, 2019

Conversation

bmwiedemann
Copy link
Contributor

@bmwiedemann bmwiedemann commented May 8, 2019

Make tests pass in 2020

moving this date beyond 2038 requires fixes on 32-bit systems to avoid errors:

   File "/home/abuild/rpmbuild/BUILD/python3-saml-1.6.0/tests/src/OneLogin/saml2_tests/settings_test.py", line 560, in testValidateMetadata
     self.assertEqual(len(settings.validate_metadata(xml)), 0)
   File "/home/abuild/rpmbuild/BUILD/python3-saml-1.6.0/src/onelogin/saml2/settings.py", line 716, in validate_metadata
     expire_time = OneLogin_Saml2_Utils.get_expire_time(cache_duration, valid_until)
   File "/home/abuild/rpmbuild/BUILD/python3-saml-1.6.0/src/onelogin/saml2/utils.py", line 480, in get_expire_time
     valid_until_time = OneLogin_Saml2_Utils.parse_SAML_to_time(valid_until)
   File "/home/abuild/rpmbuild/BUILD/python3-saml-1.6.0/src/onelogin/saml2/utils.py", line 419, in parse_SAML_to_time
     data = datetime.strptime(timestr, '%Y-%m-%dT%H:%M:%SZ')
 TypeError: strptime() argument 1 must be string, not long

Background:
As part of my work on reproducible builds for openSUSE,
I check that software still gives identical build results in the future.
The usual offset is +15 years, because that is how long I expect some
software will be used in some places.
This showed up failing tests in our package build.
See https://reproducible-builds.org/ for why this matters.

moving this beyond 2038 requires fixes on 32-bit systems to avoid errors:
   File "/home/abuild/rpmbuild/BUILD/python3-saml-1.6.0/src/onelogin/sam
.py", line 419, in parse_SAML_to_time
     data = datetime.strptime(timestr, '%Y-%m-%dT%H:%M:%SZ')
 TypeError: strptime() argument 1 must be string, not long
@coveralls
Copy link

coveralls commented May 8, 2019

Coverage Status

Coverage remained the same at 95.828% when pulling 527f4fe on bmwiedemann:FTBFS2020 into 064b727 on onelogin:master.

@pitbulk pitbulk merged commit a9912bf into SAML-Toolkits:master May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants