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

Testcases coverage #225

Merged
merged 4 commits into from
May 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: tarpaulin
args: --output-dir coverage --out xml --workspace --exclude benchmarks

args: --output-dir coverage --out xml --workspace --features serde-error --tests --example testcases --example third_party
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
Expand Down
9 changes: 9 additions & 0 deletions biscuit-auth/examples/testcases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
None => {}
};

run(target, root_key, test, json);

Check warning on line 71 in biscuit-auth/examples/testcases.rs

View check run for this annotation

Codecov / codecov/patch

biscuit-auth/examples/testcases.rs#L71

Added line #L71 was not covered by tests
}

fn run(target: String, root_key: Option<String>, test: bool, json: bool) {
let root = if let Some(key) = root_key {
KeyPair::from(&PrivateKey::from_bytes_hex(&key).unwrap())
} else {
Expand Down Expand Up @@ -1973,3 +1977,8 @@

v
}

#[test]
fn test_samples() {
run("./samples".to_string(), None, true, false);
}
Loading