forked from eclipse-biscuit/biscuit-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.bats
More file actions
executable file
·50 lines (48 loc) · 1.56 KB
/
test.bats
File metadata and controls
executable file
·50 lines (48 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
setup() {
if brew --prefix; then
TEST_BREW_PREFIX="$(brew --prefix)"
load "${TEST_BREW_PREFIX}/lib/bats-support/load.bash"
load "${TEST_BREW_PREFIX}/lib/bats-assert/load.bash"
elif [ "${GITHUB_ACTIONS}" == "true" ]; then
load "/usr/lib/bats-support/load.bash"
load "/usr/lib/bats-assert/load.bash"
fi
cargo build
PATH="./target/debug:${PATH}"
}
# this makes sure we're testing the correct biscuit executable
@test "the correct biscuit version is selected" {
run which biscuit
assert_output --partial "target/debug"
}
# the following tests make sure that there is no clap configuration error
@test "biscuit --help runs without crashing" {
biscuit --help
}
@test "biscuit append-third-party-block --help runs without crashing" {
biscuit append-third-party-block --help
}
@test "biscuit attenuate --help runs without crashing" {
biscuit attenuate --help
}
@test "biscuit generate --help runs without crashing" {
biscuit generate --help
}
@test "biscuit generate-request --help runs without crashing" {
biscuit generate-request --help
}
@test "biscuit generate-third-party-block --help runs without crashing" {
biscuit generate-third-party-block --help
}
@test "biscuit inspect --help runs without crashing" {
biscuit inspect --help
}
@test "biscuit inspect-snapshot --help runs without crashing" {
biscuit inspect-snapshot --help
}
@test "biscuit keypair --help runs without crashing" {
biscuit keypair --help
}
@test "biscuit seal --help runs without crashing" {
biscuit seal --help
}