Support missing custom binary directories
This commit is contained in:
@@ -23,7 +23,7 @@ restore_default() {
|
||||
cleanup() {
|
||||
exit_status=$?
|
||||
restore_default || true
|
||||
rm -rf -- "$test_tmp"
|
||||
sudo rm -rf -- "$test_tmp"
|
||||
exit "$exit_status"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
@@ -78,6 +78,22 @@ require_changed_recap "$test_tmp/metadata-repair.log"
|
||||
run_converge | tee "$test_tmp/metadata-repair-repeat.log"
|
||||
require_clean_recap "$test_tmp/metadata-repair-repeat.log"
|
||||
|
||||
custom_binary="$test_tmp/missing-binary-parent/seriatim"
|
||||
custom_state="$test_tmp/custom-build-state"
|
||||
test ! -e "$(dirname "$custom_binary")"
|
||||
run_converge \
|
||||
-e "seriatim_binary_path=$custom_binary" \
|
||||
-e "seriatim_build_state_dir=$custom_state" |
|
||||
tee "$test_tmp/custom-path.log"
|
||||
require_changed_recap "$test_tmp/custom-path.log"
|
||||
test "$($custom_binary --version)" = 'seriatim version v1.5.0'
|
||||
test "$(stat -c '%U:%G %a' "$(dirname "$custom_binary")")" = 'root:root 755'
|
||||
run_converge \
|
||||
-e "seriatim_binary_path=$custom_binary" \
|
||||
-e "seriatim_build_state_dir=$custom_state" |
|
||||
tee "$test_tmp/custom-path-repeat.log"
|
||||
require_clean_recap "$test_tmp/custom-path-repeat.log"
|
||||
|
||||
baseline_binary=$(binary_digest)
|
||||
baseline_state=$(state_digest)
|
||||
for scenario in \
|
||||
@@ -146,4 +162,4 @@ require_clean_recap "$test_tmp/final-restore.log"
|
||||
"$playbook" -i "$inventory" tests/verify.yml
|
||||
|
||||
trap - EXIT
|
||||
rm -rf -- "$test_tmp"
|
||||
sudo rm -rf -- "$test_tmp"
|
||||
|
||||
Reference in New Issue
Block a user