ci: re-enable localstack tests
Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
This commit is contained in:
parent
fe2845fdfb
commit
74b1ac3632
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -97,7 +97,7 @@ jobs:
|
|||||||
universe:
|
universe:
|
||||||
name: Universe
|
name: Universe
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 20
|
||||||
services:
|
services:
|
||||||
localstack:
|
localstack:
|
||||||
image: localstack/localstack:0.12.16
|
image: localstack/localstack:0.12.16
|
||||||
|
@ -58,7 +58,7 @@ import (
|
|||||||
if config.localMode != null {
|
if config.localMode != null {
|
||||||
#"""
|
#"""
|
||||||
# Download awscli v3 and override aws
|
# Download awscli v3 and override aws
|
||||||
pip install awscli-local[v2]
|
pip install awscli-local==0.14
|
||||||
mv /usr/bin/awslocal /usr/bin/aws
|
mv /usr/bin/awslocal /usr/bin/aws
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
|
@ -1,20 +1,3 @@
|
|||||||
# Instead of setup, this just runs once
|
|
||||||
setup_file() {
|
|
||||||
# Cleanup local Localstack instances
|
|
||||||
if [ "$(curl -s http://localhost:4566)" = '{"status": "running"}' ] && \
|
|
||||||
[ "$GITHUB_ACTIONS" != "true" ]; then
|
|
||||||
echo "Cleanup local LOCALSTACK"
|
|
||||||
|
|
||||||
# S3 buckets cleanup
|
|
||||||
aws --endpoint-url=http://localhost:4566 s3 rm s3://dagger-ci 2>/dev/null || true
|
|
||||||
aws --endpoint-url=http://localhost:4566 s3 mb s3://dagger-ci 2>/dev/null || true
|
|
||||||
|
|
||||||
# ECR repositories cleanup
|
|
||||||
aws --endpoint-url=http://localhost:4566 ecr delete-repository --repository-name dagger-ci 2>/dev/null || true
|
|
||||||
aws --endpoint-url=http://localhost:4566 ecr create-repository --repository-name dagger-ci 2>/dev/null || true
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
common_setup() {
|
common_setup() {
|
||||||
load 'node_modules/bats-support/load'
|
load 'node_modules/bats-support/load'
|
||||||
load 'node_modules/bats-assert/load'
|
load 'node_modules/bats-assert/load'
|
||||||
@ -96,3 +79,19 @@ skip_unless_local_kube() {
|
|||||||
skip "local kubernetes cluster not available"
|
skip "local kubernetes cluster not available"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Cleanup local Localstack instances
|
||||||
|
setup_localstack() {
|
||||||
|
if [ "$(curl -s http://localhost:4566)" = '{"status": "running"}' ] && \
|
||||||
|
[ "$GITHUB_ACTIONS" != "true" ]; then
|
||||||
|
echo "Cleanup local LOCALSTACK"
|
||||||
|
|
||||||
|
# S3 buckets cleanup
|
||||||
|
aws --endpoint-url=http://localhost:4566 s3 rm s3://dagger-ci || true
|
||||||
|
aws --endpoint-url=http://localhost:4566 s3 mb s3://dagger-ci || true
|
||||||
|
|
||||||
|
# ECR repositories cleanup
|
||||||
|
aws --endpoint-url=http://localhost:4566 ecr delete-repository --repository-name dagger-ci || true
|
||||||
|
aws --endpoint-url=http://localhost:4566 ecr create-repository --repository-name dagger-ci || true
|
||||||
|
fi
|
||||||
|
}
|
@ -1,3 +1,10 @@
|
|||||||
|
# Instead of setup, this runs only once
|
||||||
|
setup_file() {
|
||||||
|
load 'helpers'
|
||||||
|
|
||||||
|
setup_localstack
|
||||||
|
}
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
load 'helpers'
|
load 'helpers'
|
||||||
|
|
||||||
@ -45,10 +52,9 @@ setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "aws: ecr/localstack" {
|
@test "aws: ecr/localstack" {
|
||||||
skip "disabled because of inifinit loop"
|
skip_unless_local_localstack
|
||||||
# skip_unless_local_localstack
|
|
||||||
|
|
||||||
# dagger -e aws-ecr-localstack up
|
dagger -e aws-ecr-localstack up
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "aws: s3" {
|
@test "aws: s3" {
|
||||||
@ -56,10 +62,9 @@ setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "aws: s3/localstack" {
|
@test "aws: s3/localstack" {
|
||||||
skip "disabled because of inifinit loop"
|
skip_unless_local_localstack
|
||||||
# skip_unless_local_localstack
|
|
||||||
|
|
||||||
# dagger -e aws-s3-localstack up
|
dagger -e aws-s3-localstack up
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "aws: eks" {
|
@test "aws: eks" {
|
||||||
|
Reference in New Issue
Block a user