From 28f0dbdab5a34adfc144f941481004daab878e55 Mon Sep 17 00:00:00 2001 From: Greg Cymbalski Date: Tue, 6 Aug 2024 19:55:06 -0700 Subject: [PATCH] WIP: Include a container running VersityGW integration tests to generate synthetic load --- aws_env_setup.sh | 1 + docker-compose.yml | 19 +++++++++++++++++++ test.sh | 21 +++++++++++++++++++-- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/aws_env_setup.sh b/aws_env_setup.sh index d3ef2a9..6c53eb9 100644 --- a/aws_env_setup.sh +++ b/aws_env_setup.sh @@ -2,3 +2,4 @@ export AWS_SECRET_ACCESS_KEY=password export AWS_ACCESS_KEY_ID=user export AWS_ENDPOINT_URL=http://127.0.0.1:7070 export AWS_REGION=us-east-1 +export AWS_PROFILE=versitygw diff --git a/docker-compose.yml b/docker-compose.yml index eecf45c..8f494c5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -60,5 +60,24 @@ services: command: > posix /tmp/vgw + versitygw-bats: + image: versity/versitygwtests:latest + container_name: versitygw-bats + build: + context: versitygw + dockerfile: Dockerfile_test_bats + args: + - CONFIG_FILE=tests/.env.default + environment: + - VGW_METRICS_STATSD_SERVERS=telegraf:8125 + depends_on: + - telegraf + volumes: + - ./versitygw/tests:/home/tester/tests + - gateway_temp:/tmp/gw + profiles: + - autotest + volumes: influxdb_data: {} + gateway_temp: {} diff --git a/test.sh b/test.sh index 7af95c1..32c6a1e 100755 --- a/test.sh +++ b/test.sh @@ -2,5 +2,22 @@ . ./aws_env_setup.sh -aws s3 mb s3://test -aws s3 cp docker-compose.yml s3://test/test.yaml +git submodule init && git submodule update + +cat > "versitygw/tests/.secrets" <<-EOF +export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}" +export AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}" +export AWS_ENDPOINT_URL="${AWS_ENDPOINT_URL}" +export AWS_PROFILE="${AWS_PROFILE}" +export AWS_REGION="${AWS_REGION}" +EOF + +sed -i .orig -e 's|^CERT.*|CERT=/home/tester/cert-docker.pem|' \ + -e 's|^KEY.*|KEY=/home/tester/versitygw-docker.pem|' versitygw/tests/.env.default + +docker-compose build +docker-compose up -d + +docker-compose --profile autotest -d +#aws s3 mb s3://test +#aws s3 cp docker-compose.yml s3://test/test.yaml