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

Conversation

Projects
None yet
3 participants
@bmwiedemann
Copy link
Contributor

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.

Make tests pass in 2020
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

@bmwiedemann bmwiedemann force-pushed the bmwiedemann:FTBFS2020 branch from 9a9ddab to 527f4fe May 8, 2019

@coveralls

This comment has been minimized.

Copy link

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 onelogin:master May 8, 2019

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.