feat: add support for network related flags on create, clone, and upgrade

Also add some tests to cover all the network-related functionality.
This commit is contained in:
Jose Diaz-Gonzalez
2023-02-08 00:03:25 -05:00
parent ab7a0369c8
commit ffa72395f6
7 changed files with 193 additions and 1 deletions

View File

@@ -70,3 +70,17 @@ assert_output() {
fi
assert_equal "$expected" "$output"
}
# ShellCheck doesn't know about $output from Bats
# shellcheck disable=SC2154
assert_output_contains() {
local input="$output"
local expected="$1"
local count="${2:-1}"
local found=0
until [ "${input/$expected/}" = "$input" ]; do
input="${input/$expected/}"
found=$((found + 1))
done
assert_equal "$count" "$found"
}