test: add secrets for testing

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-03-12 16:14:00 -08:00
parent 9d916a2fc2
commit 9725b8de69
4 changed files with 39 additions and 14 deletions

View File

@@ -130,3 +130,11 @@ test::one(){
disable(){
logger::warning "Test \"$2\" has been disabled."
}
secret(){
if [ -z "${DAGGER_SECRETS_LOADED+x}" ] || [ "$DAGGER_SECRETS_LOADED" != "1" ]; then
logger::warning "Skip \"$2\": secrets not available"
else
"$@"
fi
}