mirror of
https://github.com/clearlinux/swupd-server.git
synced 2026-08-28 13:45:42 +00:00
e653bdd50a
The test suite uses BATS to emit TAP and the Automake TAP driver to consume the output. Most of the tests are basic, and full-run.bats creates a minimal update using autogenerated chroot content. Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
27 lines
571 B
Bash
Executable File
27 lines
571 B
Bash
Executable File
#!/usr/bin/env bats
|
|
|
|
@test "make_pack required arg" {
|
|
run $srcdir/swupd_make_pack
|
|
[ "$status" -eq 1 ]
|
|
}
|
|
|
|
@test "make_pack too few arguments" {
|
|
run $srcdir/swupd_make_pack foo
|
|
[ "$status" -eq 1 ]
|
|
run $srcdir/swupd_make_pack foo bar
|
|
[ "$status" -eq 1 ]
|
|
}
|
|
|
|
@test "make_pack too many arguments" {
|
|
run $srcdir/swupd_make_pack foo bar foo bar
|
|
[ "$status" -eq 1 ]
|
|
}
|
|
|
|
@test "make_pack root priv check" {
|
|
run $srcdir/swupd_make_pack foo bar foo
|
|
[ "$status" -eq 1 ]
|
|
[[ "$output" =~ "not being run as root.. exiting" ]]
|
|
}
|
|
|
|
# vi: ft=sh ts=8 sw=2 sts=2 et tw=80
|