From b9f45123693be1169444e2a51fd8d548ce84835c Mon Sep 17 00:00:00 2001
From: Michael Hoennig
Date: Tue, 28 Jan 2025 12:27:33 +0100
Subject: [PATCH] use previous dump as base for a new dump
---
...LiquibaseCompatibilityIntegrationTest.java | 20 +++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/LiquibaseCompatibilityIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/LiquibaseCompatibilityIntegrationTest.java
index 385594fd..30ab0505 100644
--- a/src/test/java/net/hostsharing/hsadminng/hs/migration/LiquibaseCompatibilityIntegrationTest.java
+++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/LiquibaseCompatibilityIntegrationTest.java
@@ -32,14 +32,24 @@ import static org.springframework.test.context.jdbc.Sql.ExecutionPhase.BEFORE_TE
* The test needs a dump, ideally from the version of the lastest prod-release:
*
*
- * - 1. clean the database:
+ * - clean the database:
* pg-sql-reset
+ *
*
- * - populate the database:
- *
./gradlew bootRun --args='--spring.profiles.active=only-office'
+ * - restote the database from latest dump
+ *
+ * docker exec -i hsadmin-ng-postgres psql -U postgres postgres \
+ *
+ *
+ *
+ * - run the missing migrations:
+ *
gw bootRun --args='--spring.profiles.active=only-office'
+ *
*
* - create the reference-schema SQL-file with some initializations:
- * cat >src/test/resources/db/prod-only-office-schema-with-test-data.sql <
+ * cat >src/test/resources/db/prod-only-office-schema-with-test-data.sql <
+ *
*
* - add the dump to that reference-schema SQL-file:
* docker exec -i hsadmin-ng-postgres /usr/bin/pg_dump \
* --column-inserts --disable-dollar-quoting -U postgres postgres \
* >>src/test/resources/db/prod-only-office-schema-with-test-data.sql
*
+ *
*
*
* The generated dump has to be committed to git and will be used in future test-runs