From a494cb16dee263adb53c6f281088a7f0924c96a8 Mon Sep 17 00:00:00 2001 From: Leandro Ostera Date: Fri, 17 Nov 2023 12:53:03 +0100 Subject: [PATCH] fix: move away from TENANT_TEST --- .env.sample | 5 ++--- .github/workflows/ci.yml | 3 +-- pool/test/database_test.ml | 4 ++-- pool/test/tenant_test.ml | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.env.sample b/.env.sample index 019326746..0bb5a75e7 100644 --- a/.env.sample +++ b/.env.sample @@ -6,9 +6,8 @@ PUBLIC_URL=http://localhost:3000 ECON_PACKAGE_REGISTRY_READ_TOKEN=KDuJeWbzkMy1drcGVCVL DATABASE_URL=mariadb://root@0.0.0.0:3316/development -DATABASE_URL_TENANT_TEST=mariadb://root@0.0.0.0:3317/dev_econ -DATABASE_URL_TENANT_ONE=mariadb://root@0.0.0.0:3317/dev_econ -DATABASE_URL_TENANT_TWO=mariadb://root@0.0.0.0:3317/dev_zhaw +DATABASE_URL_TENANT_ONE=mariadb://root@0.0.0.0:3317/test_econ +DATABASE_URL_TENANT_TWO=mariadb://root@0.0.0.0:3317/test_zhaw DATABASE_SKIP_DEFAULT_POOL_CREATION=true DATABASE_CHOOSE_POOL=root diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ce975017..2ce1545a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,13 +46,12 @@ jobs: env: DATABASE_URL: mariadb://root:${{ env.MYSQL_ROOT_PASSWORD }}@database-root:3306/${{ env.MYSQL_DATABASE }} DATABASE_URL_TENANT_ONE: mariadb://root:${{ env.MYSQL_ROOT_PASSWORD }}@database-tenant:3306/${{ env.MYSQL_DATABASE }} - DATABASE_URL_TENANT_TEST: mariadb://root:${{ env.MYSQL_ROOT_PASSWORD }}@database-tenant:3306/${{ env.MYSQL_DATABASE }} SIHL_ENV: test SMTP_SENDER: test@econ.uzh.ch TEST_EMAIL: test@econ.uzh.ch with: image: ocaml/opam:debian-10-ocaml-4.14 - options: -v ${{ github.workspace }}:/app -w /app -e DATABASE_URL -e DATABASE_URL_TENANT_ONE -e DATABASE_URL_TENANT_TEST -e TEST_EMAIL -e SMTP_SENDER -e SIHL_ENV -e EMAIL_RATE_LIMIT -e MATCHER_MAX_CAPACITY + options: -v ${{ github.workspace }}:/app -w /app -e DATABASE_URL -e DATABASE_URL_TENANT_ONE -e TEST_EMAIL -e SMTP_SENDER -e SIHL_ENV -e EMAIL_RATE_LIMIT -e MATCHER_MAX_CAPACITY run: | # Reclaim required directory permissions sudo chown -R opam . diff --git a/pool/test/database_test.ml b/pool/test/database_test.ml index 29edf7f9e..cd22b791e 100644 --- a/pool/test/database_test.ml +++ b/pool/test/database_test.ml @@ -11,8 +11,8 @@ module Data = struct let database = let url = - Sihl.Configuration.read_string "DATABASE_URL_TENANT_TEST" - |> CCOption.get_exn_or "DATABASE_URL_TENANT_TEST undefined" + Sihl.Configuration.read_string "DATABASE_URL_TENANT_ONE" + |> CCOption.get_exn_or "DATABASE_URL_TENANT_ONE undefined" |> Url.create |> get_exn in diff --git a/pool/test/tenant_test.ml b/pool/test/tenant_test.ml index bccc2ecf6..9d45ce24b 100644 --- a/pool/test/tenant_test.ml +++ b/pool/test/tenant_test.ml @@ -22,8 +22,8 @@ module Data = struct let url = "pool.econ.uzh.ch" let database_url = - Sihl.Configuration.read_string "DATABASE_URL_TENANT_TEST" - |> CCOption.get_exn_or "DATABASE_URL_TENANT_TEST undefined" + Sihl.Configuration.read_string "DATABASE_URL_TENANT_ONE" + |> CCOption.get_exn_or "DATABASE_URL_TENANT_ONE undefined" ;; let database_label = "econ-test"