feature/test-liquibase-migration-from-a-prod-dump #152

Merged
hsh-michaelhoennig merged 9 commits from feature/test-liquibase-migration-from-a-prod-dump into master 2025-01-28 12:28:03 +01:00
2 changed files with 17174 additions and 6 deletions
Showing only changes of commit ace819f0b6 - Show all commits

View File

@ -19,6 +19,9 @@ import javax.sql.DataSource;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.test.context.jdbc.Sql.ExecutionPhase.BEFORE_TEST_CLASS;
// TODO.impl: The reference-SQL-dump-generation needs to be automated
// HOWTO: generate the prod-reference-SQL-dump during a prod-release
/** Tests, if the Liquibase scripts can be applied to a database ionitialized with schemas
and test-data from a previous version.
@ -33,6 +36,16 @@ import static org.springframework.test.context.jdbc.Sql.ExecutionPhase.BEFORE_TE
<li>create the reference-schema SQL-file with some initializations:</li>
<pre><code>cat >src/test/resources/db/prod-only-office-schema-with-test-data.sql <<EOF
-- =================================================================================
-- Generated reference-SQL-dump (hopefully of latest prod-release).
-- See: net.hostsharing.hsadminng.hs.migration.LiquibaseCompatibilityIntegrationTest
-- ---------------------------------------------------------------------------------
--
-- Explicit pre-initialization because we cannot use \`pg_dump --create ...\`
-- because the database is already created by Testcontainers.
--
CREATE ROLE postgres;
CREATE ROLE admin;

File diff suppressed because it is too large Load Diff