From 5d9a11fb48d3a392ef76446cc39a8fc3c7a3d36d Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Thu, 25 Apr 2024 12:58:39 +0100 Subject: [PATCH] Refactor E2E tests and Docker configuration --- E2E/Dockerfile.tpl | 2 ++ E2E/Tests/Home/{Landing.test.ts => Landing.spec.ts} | 0 .../Home/{Navigation.test.ts => Navigation.spec.ts} | 0 E2E/Tests/Home/{SignIn.test.ts => SignIn.spec.ts} | 0 E2E/Tests/Home/{SignUp.test.ts => SignUp.spec.ts} | 0 docker-compose.base.yml | 11 ++++++++++- docker-compose.dev.yml | 10 ++++++++++ 7 files changed, 22 insertions(+), 1 deletion(-) rename E2E/Tests/Home/{Landing.test.ts => Landing.spec.ts} (100%) rename E2E/Tests/Home/{Navigation.test.ts => Navigation.spec.ts} (100%) rename E2E/Tests/Home/{SignIn.test.ts => SignIn.spec.ts} (100%) rename E2E/Tests/Home/{SignUp.test.ts => SignUp.spec.ts} (100%) diff --git a/E2E/Dockerfile.tpl b/E2E/Dockerfile.tpl index 37d7aaeded..73a6cd8ca2 100644 --- a/E2E/Dockerfile.tpl +++ b/E2E/Dockerfile.tpl @@ -45,5 +45,7 @@ RUN npm install # Copy app source COPY ./E2E /usr/src/app +RUN npm run compile + #Run the app CMD [ "npm", "test" ] \ No newline at end of file diff --git a/E2E/Tests/Home/Landing.test.ts b/E2E/Tests/Home/Landing.spec.ts similarity index 100% rename from E2E/Tests/Home/Landing.test.ts rename to E2E/Tests/Home/Landing.spec.ts diff --git a/E2E/Tests/Home/Navigation.test.ts b/E2E/Tests/Home/Navigation.spec.ts similarity index 100% rename from E2E/Tests/Home/Navigation.test.ts rename to E2E/Tests/Home/Navigation.spec.ts diff --git a/E2E/Tests/Home/SignIn.test.ts b/E2E/Tests/Home/SignIn.spec.ts similarity index 100% rename from E2E/Tests/Home/SignIn.test.ts rename to E2E/Tests/Home/SignIn.spec.ts diff --git a/E2E/Tests/Home/SignUp.test.ts b/E2E/Tests/Home/SignUp.spec.ts similarity index 100% rename from E2E/Tests/Home/SignUp.test.ts rename to E2E/Tests/Home/SignUp.spec.ts diff --git a/docker-compose.base.yml b/docker-compose.base.yml index fbe8f80f70..fa5750e03b 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -337,7 +337,16 @@ services: max-size: "1000m" - + e2e: + networks: + - oneuptime + restart: no + environment: + <<: *common-server-variables + logging: + driver: "local" + options: + max-size: "1000m" ingress: restart: always diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index aae19625f0..2700cd3e5d 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -323,6 +323,16 @@ services: file: ./docker-compose.base.yml service: ingress + # e2e tests + e2e: + extends: + file: ./docker-compose.base.yml + service: e2e + build: + network: host + context: . + dockerfile: ./E2E/Dockerfile + volumes: postgres: clickhouse: