From a5d6d4c451f3887c94066fa5071253ac23661db9 Mon Sep 17 00:00:00 2001 From: Tim Ortel <100865202+TimOrtel@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:29:28 +0100 Subject: [PATCH] Get end to end tests starting again. --- docker/artemis.yml | 8 +++++++- docker/artemis_e2e_config.env | 2 +- docker/e2e-tests.yml | 6 ++++++ docker/mysql.yml | 10 +++++++++- readme.md | 5 ++++- 5 files changed, 27 insertions(+), 4 deletions(-) diff --git a/docker/artemis.yml b/docker/artemis.yml index a4a1c75f4..d744fdc8e 100644 --- a/docker/artemis.yml +++ b/docker/artemis.yml @@ -9,6 +9,8 @@ services: # https://docs.artemis.cit.tum.de/dev/setup/# image: ghcr.io/ls1intum/artemis:latest pull_policy: always + volumes: + - artemis-data:/opt/artemis/data # system environments are the default way for custom configuration overrides in the containerized artemis setups # either add them in the environments or env_file section (alternative to application-local.yml) env_file: @@ -30,4 +32,8 @@ services: networks: artemis: driver: "bridge" - name: artemis \ No newline at end of file + name: artemis + +volumes: + artemis-data: + name: artemis-data \ No newline at end of file diff --git a/docker/artemis_e2e_config.env b/docker/artemis_e2e_config.env index 32c49a3d1..a3e3b19a3 100644 --- a/docker/artemis_e2e_config.env +++ b/docker/artemis_e2e_config.env @@ -1,4 +1,4 @@ -SPRING_PROFILES_ACTIVE="artemis,scheduling,dev,docker" +SPRING_PROFILES_ACTIVE="artemis,scheduling,dev,docker,core" SPRING_DATASOURCE_USERNAME="root" SPRING_DATASOURCE_PASSWORD="" diff --git a/docker/e2e-tests.yml b/docker/e2e-tests.yml index 5e7454bfc..a3db11f5c 100644 --- a/docker/e2e-tests.yml +++ b/docker/e2e-tests.yml @@ -37,3 +37,9 @@ networks: artemis: driver: "bridge" name: artemis + +volumes: + artemis-mysql-data: + name: artemis-mysql-data + artemis-data: + name: artemis-data diff --git a/docker/mysql.yml b/docker/mysql.yml index 72896b51d..dd24f5993 100644 --- a/docker/mysql.yml +++ b/docker/mysql.yml @@ -6,15 +6,19 @@ services: mysql: container_name: artemis-mysql image: docker.io/library/mysql:9.0.1 + volumes: + - artemis-mysql-data:/var/lib/mysql # DO NOT use this default file for production systems! environment: MYSQL_ALLOW_EMPTY_PASSWORD: true MYSQL_ROOT_PASSWORD: "" MYSQL_DATABASE: "Artemis" + ports: + - "127.0.0.1:3306:3306" # expose the port to make it reachable docker internally even if the external port mapping changes expose: - "3306" - command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --collation-server=utf8mb4_unicode_ci --explicit_defaults_for_timestamp + command: mysqld --lower_case_table_names=1 --tls-version='' --character_set_server=utf8mb4 --collation-server=utf8mb4_unicode_ci --explicit_defaults_for_timestamp --max_connections=100000 # mbind: Operation not permitted workaround for docker compose (see https://github.com/docker-library/mysql/issues/303) cap_add: - SYS_NICE # CAP_SYS_NICE @@ -31,3 +35,7 @@ networks: artemis: driver: "bridge" name: artemis + +volumes: + artemis-mysql-data: + name: artemis-mysql-data \ No newline at end of file diff --git a/readme.md b/readme.md index 34b504844..e431d7d04 100644 --- a/readme.md +++ b/readme.md @@ -45,7 +45,10 @@ This project is configured to support multiple [flavor dimensions](https://devel ## Tests We use both unit tests and end-to-end integration tests. Before running the end-to-end tests, consider the licenses section in this readme. - To run the unit tests, execute `./gradlew test -Dskip.unit-tests=false -Dskip.e2e=true -Dskip.debugVariants=true -Dskip.flavor.unrestricted=true -Dskip.flavor.beta=true` -- To run the end-to-end tests, execute `docker compose -f docker/e2e-tests.yml up artemis-android-e2e` +- To run the end-to-end tests, first start artemis locally in docker: + - `docker compose -f docker/e2e-tests.yml up artemis-app-setup` + - `./gradlew test -Dskip.unit-tests=true -Dskip.e2e=false -Dskip.debugVariants=true -Dskip.flavor.unrestricted=true -Dskip.flavor.beta=true` + ## Play store screenshots Screenshots can be generated using preview-composables in the `debug` source sets. They are annotated with `@PlayStoreScreenshots`. To get the screenshots, right click the rendered preview