From a9b7a3ea3de4a984c6e8f49bec34d71fbcc39df0 Mon Sep 17 00:00:00 2001 From: himeshr Date: Mon, 11 Nov 2024 14:10:39 +0530 Subject: [PATCH] avniproject/avni-infra#41 | Fix minor issues with integration test db setup --- Makefile | 2 +- .../src/test/resources/application.properties | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 43ba146a..52d3a9f3 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ build-db-schema: psql -h localhost -p $(dbPort) -U avni_int -d avni_int < integration-data/src/main/resources/db/util/superadmin.sql; build-test-db-schema: - ./gradlew --stacktrace :integration-data:migrateDb + ./gradlew --stacktrace :integration-data:migrateTestDb psql -h localhost -p $(dbPort) -U avni_int -d avni_int_test < integration-data/src/main/resources/db/util/superadmin.sql; drop-db: diff --git a/integration-data/src/test/resources/application.properties b/integration-data/src/test/resources/application.properties index 046943c8..f6a9cc07 100644 --- a/integration-data/src/test/resources/application.properties +++ b/integration-data/src/test/resources/application.properties @@ -15,3 +15,18 @@ avni.impl.user.id=-1 app.config.tx.rollback=true spring.datasource.url=jdbc:postgresql://localhost:5432/avni_int_test + +# Database +avni.int.database=${AVNI_INT_DATABASE:avni_int_test} +avni.int.database.port=${AVNI_INT_DATABASE_PORT:5432} +spring.datasource.username=${AVNI_INT_DB_USER:avni_int} +spring.datasource.password=${AVNI_INT_DB_PASSWORD:password} +spring.datasource.driverClassName=org.postgresql.Driver + +#Flyway +spring.flyway.enabled=${FLYWAY_ENABLED:true} +spring.flyway.locations=classpath:/db/migration +spring.flyway.outOfOrder=true +spring.flyway.ignoreMissingMigrations=true + +app.config.location=${INT_CONFIG_LOCATION:dummy}