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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃尡 Update Binary-Artifacts and License checks #4079

Merged
merged 6 commits into from
May 3, 2024

Conversation

seelder
Copy link
Contributor

@seelder seelder commented May 3, 2024

What kind of change does this PR introduce?

Updates tests to follow best practices (and corrects previous PR #4078 )

What is the current behavior?

binary_analysis and license check tests currently use localDirRepo instead of gomock
binary_analysis does not utilize scut (license test already uses scut and does not need modification)

What is the new behavior (if this is a feature change)?**

  • No behavior change anticipated
  • binary_analysis and license check tests updated to use gomock
    • ListFiles and GetFileReader mocked for both
    • ListLicenses mocked for license check (replicates localDirRepo by throwing Unsupported Feature error)
  • binary_analysis updated to use scut
    • test cases modified to include some logging information

Which issue(s) this PR fixes

Fixes #4032

seelder and others added 6 commits May 3, 2024 14:20
Updated the test to use scut. Updated the test data to use scut, including adding NumberOfInfo and NumberOfWarn for each test case

Signed-off-by: seelder <[email protected]>
First attempt at updating license_test to use gomock instead of localDir.

Note: localDir currently has a TODO for implementing ListLicenses.  It returns an UnsupportedFeatures error, which is then handled in checks/raw/license. This first attempt replicates that existing behavior.
Signed-off-by: seelder <[email protected]>
Clarified why the mock simply throws an error

Signed-off-by: seelder <[email protected]>
@seelder seelder requested a review from a team as a code owner May 3, 2024 21:02
@seelder seelder requested review from justaugustus and raghavkaul and removed request for a team May 3, 2024 21:02
@seelder seelder changed the title Update Binary-Artifacts and License checks :seedling Update Binary-Artifacts and License checks May 3, 2024
@seelder seelder changed the title :seedling Update Binary-Artifacts and License checks 馃尡 Update Binary-Artifacts and License checks May 3, 2024
@spencerschrock
Copy link
Contributor

Thanks for picking up the issue. I made one small tweak to the PR body, as Fixes #1234 is a special keyword for GitHub.
https://docs.github.com/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue

@spencerschrock spencerschrock merged commit a788a38 into ossf:main May 3, 2024
41 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

improve binary artifact and license tests to match other checks
2 participants