Skip to content

Commit

Permalink
Update usage of custom args to increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Minituff committed Oct 30, 2023
1 parent 6ddabe9 commit 8b169bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 2 additions & 5 deletions pkg/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,8 @@ for entry in $containers; do

if [ $skip -eq 0 ]; then

if echo "$labels" | grep -q '"nautical-backup.use-default-rsync-args":"true"'; then
logThis "Using default rsync args ($DEFAULT_RSYNC_ARGS) for $container" "DEBUG"
default_rsync_args=$DEFAULT_RSYNC_ARGS
elif echo "$labels" | grep -q '"nautical-backup.use-default-rsync-args":"false"'; then
logThis "Not using default rsync args ($DEFAULT_RSYNC_ARGS) for $container" "DEBUG"
if echo "$labels" | grep -q '"nautical-backup.use-default-rsync-args":"false"'; then
logThis "Disabling default rsync args ($DEFAULT_RSYNC_ARGS) for $container" "DEBUG"
default_rsync_args=""
fi

Expand Down
3 changes: 2 additions & 1 deletion tests/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ fail() {
local func_name=$1
local test_num=$2
cecho "RED" "X FAIL - $func_name $test_num"
exit 1
}

test_docker() {
Expand Down Expand Up @@ -541,7 +542,7 @@ test_require_label() {
--disallow "$disallowed_docker_output"

clear_files

test_docker \
--name "Test REQUIRE_LABEL no label" \
--mock_ps "$mock_docker_ps_lines" \
Expand Down

0 comments on commit 8b169bd

Please sign in to comment.