tests: convert stdlib to bats

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-04-15 16:08:45 -07:00
parent aed757120d
commit feda737d71
7 changed files with 51 additions and 350 deletions

View File

@@ -15,6 +15,14 @@ common_setup() {
}
skip_unless_secrets_available() {
local inputFile="$1"
sops exec-file "$inputFile" echo > /dev/null 2>&1 || skip "$inputFile cannot be decrypted"
local inputFile="$1"
sops exec-file "$inputFile" echo > /dev/null 2>&1 || skip "$inputFile cannot be decrypted"
}
skip_unless_local_kube() {
if [ -f ~/.kube/config ] && grep -q "kind" ~/.kube/config &> /dev/null; then
echo "Kubernetes available"
else
skip "local kubernetes cluster not available"
fi
}