-
Notifications
You must be signed in to change notification settings - Fork 470
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
🌱 avoid assumptions about versions in tests #4134
Merged
justaugustus
merged 2 commits into
ossf:main
from
raboof:avoid-version-assumptions-in-tests
May 30, 2024
Merged
🌱 avoid assumptions about versions in tests #4134
justaugustus
merged 2 commits into
ossf:main
from
raboof:avoid-version-assumptions-in-tests
May 30, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8dd3b8d
to
5609066
Compare
5609066
to
fd89e2e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4134 +/- ##
==========================================
- Coverage 66.06% 60.05% -6.02%
==========================================
Files 226 214 -12
Lines 16291 15527 -764
==========================================
- Hits 10763 9325 -1438
- Misses 4854 5511 +657
- Partials 674 691 +17 |
For example NixOS builds and tests scorecards in an environment that sets the version, which would make this test fail as it currently assumes the version is unset when running tests. Signed-off-by: Arnout Engelen <arnout@bzzt.net>
fd89e2e
to
6eb7636
Compare
justaugustus
approved these changes
May 30, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @raboof!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
It makes the tests more resilient against differences in the environment in which scorecard is built.
What is the current behavior?
Tests assume they are ran in an environment where the application version is not known/set.
What is the new behavior (if this is a feature change)?**
Tests make no assumptions about version fields anymore
Which issue(s) this PR fixes
NONE
Special notes for your reviewer
Does this PR introduce a user-facing change?
For user-facing changes, please add a concise, human-readable release note to
the
release-note
(In particular, describe what changes users might need to make in their
application as a result of this pull request.)