Files
swupd-server/test/functional/fullfiles.bats
T
Patrick McCarty e653bdd50a Add initial functional test suite
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>
2016-03-08 21:28:15 -08:00

21 lines
468 B
Bash
Executable File

#!/usr/bin/env bats
@test "make_fullfiles required arg" {
run $srcdir/swupd_make_fullfiles
[ "$status" -eq 1 ]
}
@test "make_fullfiles too many arguments" {
# exactly one argument must be passed
run $srcdir/swupd_make_fullfiles foo bar
[ "$status" -eq 1 ]
}
@test "make_fullfiles root priv check" {
run $srcdir/swupd_make_fullfiles foo
[ "$status" -eq 1 ]
[[ "$output" =~ "not being run as root.. exiting" ]]
}
# vi: ft=sh ts=8 sw=2 sts=2 et tw=80