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

Fix the unit tests with expired TUF metadata. #1270

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

dlorenc
Copy link
Member

@dlorenc dlorenc commented Jan 5, 2022

These tests worked by mocking at the "isExpired" level. When the real files
ARE expired, but we mock them to be NOT expired, the code continues down a
path it shouldn't and fails later, trying to use expired metadata.

We should fix this "better" by generating real expired and unexpired metadata,
or changing the system clock somehow.

Signed-off-by: Dan Lorenc [email protected]

Summary

Ticket Link

Fixes

Release Note


These tests worked by mocking at the "isExpired" level. When the real files
ARE expired, but we mock them to be NOT expired, the code continues down a
path it shouldn't and fails later, trying to use expired metadata.

We should fix this "better" by generating real expired and unexpired metadata,
or changing the system clock somehow.

Signed-off-by: Dan Lorenc <[email protected]>
@dlorenc dlorenc merged commit 6af964c into sigstore:main Jan 5, 2022
@github-actions github-actions bot added this to the v1.5.0 milestone Jan 5, 2022
@dlorenc dlorenc deleted the fixtest branch January 5, 2022 14:40
mlieberman85 pushed a commit to mlieberman85/cosign that referenced this pull request May 6, 2022
These tests worked by mocking at the "isExpired" level. When the real files
ARE expired, but we mock them to be NOT expired, the code continues down a
path it shouldn't and fails later, trying to use expired metadata.

We should fix this "better" by generating real expired and unexpired metadata,
or changing the system clock somehow.

Signed-off-by: Dan Lorenc <[email protected]>
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.

2 participants