From 1c90c99214fa2e847f0f3e20856bb1eb2ae152cb Mon Sep 17 00:00:00 2001 From: Montassar Ghanmy Date: Fri, 15 Mar 2024 09:50:36 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Object=20storage=20backend=20for=20?= =?UTF-8?q?e2e=20tests=20(#446)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: e2e test run with object storage backend * ref: one test suit --- .github/workflows/build.yml | 2 +- tdrive/docker-compose.tests.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 742718d4..3e2c7e7f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,7 +55,7 @@ jobs: - setup steps: - uses: actions/checkout@v4 - - name: e2e-mongo-test + - name: e2e-mongo-s3-test run: | cd tdrive docker-compose -f docker-compose.tests.yml run --rm -e NODE_OPTIONS=--unhandled-rejections=warn -e SEARCH_DRIVER=mongodb -e DB_DRIVER=mongodb -e PUBSUB_TYPE=local node npm run test:all diff --git a/tdrive/docker-compose.tests.yml b/tdrive/docker-compose.tests.yml index 74545775..47cd897c 100644 --- a/tdrive/docker-compose.tests.yml +++ b/tdrive/docker-compose.tests.yml @@ -24,6 +24,29 @@ services: - "6379:6379" environment: - REDIS_REPLICATION_MODE=master + minio: + image: minio/minio + ports: + - "9000:9000" + volumes: + - ./test/.minio/data:/export + - ./test/.minio/config:/root/.minio + environment: + - MINIO_ROOT_USER=admin + - MINIO_ROOT_PASSWORD=adminminio + command: server /export + + createbucket: + image: minio/mc + depends_on: + - minio + entrypoint: > + /bin/sh -c " + /usr/bin/mc config host add myminio http://minio:9000 admin adminminio; + /usr/bin/mc rm -r --force myminio/drive; + /usr/bin/mc mb myminio/drive; + exit 0; + " node: image: tdrive/tdrive-node:test build: @@ -39,11 +62,17 @@ services: - PUBSUB_URLS=amqp://guest:guest@rabbitmq:5672 - SEARCH_ES_ENDPOINT=http://elasticsearch:9200 - SEARCH_ES_FLUSHINTERVAL=1 + - STORAGE_DRIVER=S3 + - STORAGE_S3_BUCKET=drive + - STORAGE_S3_ENDPOINT=minio + - STORAGE_S3_ACCESS_KEY=admin + - STORAGE_S3_SECRET_KEY=adminminio depends_on: - mongo - scylladb - rabbitmq - elasticsearch + - createbucket links: - mongo - scylladb