Skip to content

Commit

Permalink
fix: move away from TENANT_TEST
Browse files Browse the repository at this point in the history
  • Loading branch information
leostera committed Nov 17, 2023
1 parent 69c49df commit a494cb1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
5 changes: 2 additions & 3 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
4 changes: 2 additions & 2 deletions pool/test/database_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pool/test/tenant_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a494cb1

Please sign in to comment.