From a7189084c044782397111386ffdb3464cb864f72 Mon Sep 17 00:00:00 2001 From: Guillaume de Rouville Date: Wed, 18 Aug 2021 15:09:28 +0200 Subject: [PATCH] Update Helpers.bash - Universe.bats Signed-off-by: Guillaume de Rouville --- stdlib/helpers.bash | 10 ++++++++++ stdlib/universe.bats | 12 ++++++++++++ 2 files changed, 22 insertions(+) diff --git a/stdlib/helpers.bash b/stdlib/helpers.bash index f2f4b4c7..94707528 100644 --- a/stdlib/helpers.bash +++ b/stdlib/helpers.bash @@ -58,6 +58,16 @@ copy_to_sandbox() { cp -a "$source_package" "$target_package" fi } +# Check if there is a local kubernetes cluster. +# +# This is need to do kubernetes test in the CI. +skip_unless_local_localstack() { + if [ "$(curl -s http://localhost:4566)" = '{"status": "running"}' ]; then + echo "Localstack available" + else + skip "Localstack not available" + fi +} # Check if there is a local kubernetes cluster. # diff --git a/stdlib/universe.bats b/stdlib/universe.bats index bfb92323..ddc2379b 100644 --- a/stdlib/universe.bats +++ b/stdlib/universe.bats @@ -45,10 +45,22 @@ setup() { dagger -e aws-ecr up } +@test "aws: ecr/localstack" { + skip_unless_local_localstack + + dagger -e aws-ecr-localstack up +} + @test "aws: s3" { dagger -e aws-s3 up } +@test "aws: s3/localstack" { + skip_unless_local_localstack + + dagger -e aws-s3-localstack up +} + @test "aws: eks" { dagger -e aws-eks up }