mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2025-12-15 11:22:43 +03:00
Use printf for skip_action
printf is posix compatible and works with all shell. echo -n does not work with yash and is not posix compatible. Add test for skipping expand_root
This commit is contained in:
parent
a626e694c6
commit
091af053c5
@ -25,5 +25,5 @@ skip_action() {
|
|||||||
|
|
||||||
# action not in the skip list?
|
# action not in the skip list?
|
||||||
echo "$SKIP_INIT_ACTIONS" | grep -Eq "\b$action\b" || return 1
|
echo "$SKIP_INIT_ACTIONS" | grep -Eq "\b$action\b" || return 1
|
||||||
echo -n " SKIPPING"
|
printf " SKIPPING"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,8 @@ export MOCK=echo
|
|||||||
|
|
||||||
init_tests \
|
init_tests \
|
||||||
expand_root \
|
expand_root \
|
||||||
expand_root_partition
|
expand_root_partition \
|
||||||
|
expand_root_skip
|
||||||
|
|
||||||
PROVIDERS="aws azure gcp nocloud oci"
|
PROVIDERS="aws azure gcp nocloud oci"
|
||||||
|
|
||||||
@ -49,3 +50,17 @@ expand_root_partition_body() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expand_root_skip_body() {
|
||||||
|
fake_bin test-expand-root <<-EOF
|
||||||
|
#!/bin/sh
|
||||||
|
SKIP_INIT_ACTIONS=expand_root
|
||||||
|
. "$srcdir"/lib/tiny-cloud/init-early
|
||||||
|
expand_root
|
||||||
|
EOF
|
||||||
|
for provider in $PROVIDERS; do
|
||||||
|
CLOUD="$provider" atf_check \
|
||||||
|
-o match:'^ SKIPPING$' \
|
||||||
|
test-expand-root
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user