2020-02-06 18:59:18 -05:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
load test_helper
|
|
|
|
|
|
|
|
setup() {
|
|
|
|
f test/var/lib/connman/file
|
2020-03-24 22:43:25 -04:00
|
|
|
f test/root/.bash_history
|
|
|
|
f test/home/user/.bash_history
|
2024-08-03 21:34:46 -04:00
|
|
|
gen2stage4 -c -q -t test test
|
2020-02-06 18:59:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
teardown() {
|
2024-08-04 02:13:16 -04:00
|
|
|
rm -rf test test.tar.xz
|
2020-02-06 18:59:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
@test "/var/lib/connman/file is excluded" {
|
|
|
|
assert_tar_excludes test/var/lib/connman/file
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "/var/lib/connman/ is included" {
|
|
|
|
assert_tar_includes test/var/lib/connman/
|
|
|
|
}
|
|
|
|
|
2020-03-24 22:43:25 -04:00
|
|
|
@test "/home/user/.bash_history is exlucded" {
|
|
|
|
assert_tar_excludes test/home/user/.bash_history
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "/home/user/ is included" {
|
|
|
|
assert_tar_includes test/home/user/
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "/root/.bash_history is exlucded" {
|
|
|
|
assert_tar_excludes test/root/.bash_history
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "/root/ is included" {
|
|
|
|
assert_tar_includes test/root/
|
|
|
|
}
|
|
|
|
|
2020-02-06 18:59:18 -05:00
|
|
|
# vim: ft=bash
|