Skip to content

Commit 79da651

Browse files
authored
Merge pull request #60 from biscuit-auth/test-clap
Test command-line parsing configuration
2 parents f1ec5d0 + e75a7e3 commit 79da651

File tree

5 files changed

+7
-72
lines changed

5 files changed

+7
-72
lines changed

.github/workflows/rust.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: mig4/setup-bats@v1
19-
- uses: brokenpip3/setup-bats-libs@0.1.0
2018
- uses: actions/checkout@v2
2119
- name: Cache
2220
uses: actions/cache@v2
@@ -36,4 +34,3 @@ jobs:
3634
- name: Tests
3735
run: |
3836
cargo test
39-
bats test.bats

README.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -145,21 +145,3 @@ cargo fmt --check
145145
# CI ensures that there are no outstanding clippy hints
146146
cargo clippy
147147
```
148-
149-
### Integration tests
150-
151-
To run integration tests locally, you will need `bats`. For now, only installation through `brew` and github actions is supported (`bats` needs to load its modules manually, and their installation path depends how they were installed). Feel free to add support for more systems as needed.
152-
153-
```sh
154-
bats test.bats
155-
```
156-
157-
<details>
158-
<summary>Installation with brew</summary>
159-
```sh
160-
brew install bats-core
161-
brew tap kaos/shell
162-
brew install bats-assert
163-
brew install bats-file
164-
```
165-
</details>

src/cli.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,3 +351,9 @@ mod common_args {
351351
pub raw_input: bool,
352352
}
353353
}
354+
355+
#[test]
356+
fn verify_cli() {
357+
use clap::CommandFactory;
358+
Opts::command().debug_assert();
359+
}

src/inspect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ pub fn handle_inspect_inner(inspect: &Inspect) -> Result<InspectionResults> {
414414

415415
if let Some(key_from) = public_key_from {
416416
let key = read_public_key_from(&key_from)?;
417-
let sig_result = biscuit.check_signature(|_| key);
417+
let sig_result = biscuit.verify(key);
418418
signatures_check = Some(sig_result.is_ok());
419419

420420
if let Ok(biscuit) = sig_result {

test.bats

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)