Skip to content

Commit

Permalink
Merge pull request #109 from cedi/fix/unit_tests
Browse files Browse the repository at this point in the history
fix(unit-tests): run unit-tests in PR and fix failing tests
  • Loading branch information
notheotherben authored Nov 29, 2024
2 parents 4650153 + b02a902 commit 2756c42
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ copy of all of your GitHub repositories should the unthinkable happen.

- **Backup Multiple Organizations**, automatically gathering the full list of repositories for
each organization through the GitHub API.
- **Backup Starred Repos**, automatically gathering the full list of your starred repositories for your account
up and which are not.
- **Backup Starred Repos**, automatically gathering the full list of your starred repositories
- **Repo Allowlists/Denylists** to provide fine-grained control over which repositories are backed
up and which are not.
- **GitHub Enterprise Support** for those of you running your own GitHub instances and not relying
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ mod tests {
}

#[rstest]
#[case("github.repos.0.json", 30)]
#[case("github.repos.0.json", 31)]
fn test_deserialize_repos(#[case] file: &str, #[case] repo_count: usize) {
let repos: Vec<GitHubRepo> = load_test_file(file).expect("Failed to load test file");
assert_eq!(repos.len(), repo_count);
Expand Down
6 changes: 3 additions & 3 deletions src/pairing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,12 @@ mod tests {
#[rstest]
#[case("true", 31)]
#[case("false", 0)]
#[case("repo.fork", 19)]
#[case("repo.fork", 20)]
#[case("!repo.fork", 11)]
#[case("repo.empty", 2)]
#[case("!repo.empty", 28)]
#[case("!repo.empty", 29)]
#[case("!repo.fork && !repo.empty", 11)]
#[case("repo.stargazers >= 1", 7)]
#[case("repo.stargazers >= 1", 8)]
#[case("repo.forks > 3", 1)]
#[case("repo.template", 1)]
#[case("!repo.template", 30)]
Expand Down

0 comments on commit 2756c42

Please sign in to comment.