-
Notifications
You must be signed in to change notification settings - Fork 4
Tests #76
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
Open
lzrd
wants to merge
10
commits into
main
Choose a base branch
from
tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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
Mostly mechanical fixes: removing needless borrows, adding lifetime annotations, using modern numeric constants (i32::MAX), and suppressing warnings for dropshot-generated dead code. Notable equivalences: - .as_bytes().len() to .len() on String: both return byte count - .trim().split_whitespace() to .split_whitespace(): split_whitespace already skips leading/trailing whitespace - .into_iter() to .iter() on slices: both yield &T
Co-authored-by: Joshua M. Clulow <[email protected]>
Co-authored-by: Joshua M. Clulow <[email protected]>
Co-authored-by: Joshua M. Clulow <[email protected]>
Co-authored-by: Joshua M. Clulow <[email protected]>
Co-authored-by: Joshua M. Clulow <[email protected]>
Co-authored-by: Joshua M. Clulow <[email protected]>
Tests in github/testdata and github/server were using buildomat_github_database::types::JobFile which lacks the parse_content_at_path method. Switch to buildomat_jobsh::jobfile::JobFile which has the parsing functionality needed by the tests.
jobsh/src/jobfile.rs: Add 16 tests for JobFileSet and JobFile parsing. The JobFileSet struct has complex logic for duplicate name detection, dependency cycle detection, and reference validation that was previously untested. github/database/src/tables/check_run.rs: Add 4 tests for CheckRun::get_dependencies(). This method deserializes JSON dependency data and was not covered by existing enum serialization tests. github/database/src/tables/user.rs: Add 2 tests for UserType::from_github_str(). The error path for invalid GitHub API strings was untested. types/src/config.rs: Add 2 tests for ConfigFileDiag inheritance. The explicit "inherit: true" case and mixed inheritance scenarios were not covered by existing tests.
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.
Several tests were failing. It looks like code had changed from underneath them.
There were also some "complex enough" code paths that were not being tested.
This also includes clippy fixes within tests that were not caught as part of the previous clippy PR.