use previous dump as base for a new dump
This commit is contained in:
parent
6eba18fb68
commit
b9f4512369
@ -32,14 +32,24 @@ import static org.springframework.test.context.jdbc.Sql.ExecutionPhase.BEFORE_TE
|
||||
* <p>The test needs a dump, ideally from the version of the lastest prod-release:</p>
|
||||
*
|
||||
* <ol>
|
||||
* <li>1. clean the database:<br/>
|
||||
* <li>clean the database:<br/>
|
||||
* <code>pg-sql-reset</code>
|
||||
* </li>
|
||||
*
|
||||
* <li>populate the database:</br>
|
||||
* <code>./gradlew bootRun --args='--spring.profiles.active=only-office'</code>
|
||||
* <li>restote the database from latest dump</br>
|
||||
* <pre><code>
|
||||
* docker exec -i hsadmin-ng-postgres psql -U postgres postgres \
|
||||
* <src/test/resources/db/prod-only-office-schema-with-test-data.sql
|
||||
* </code></pre>
|
||||
* </li>
|
||||
*
|
||||
* <li>run the missing migrations:</br>
|
||||
* <code>gw bootRun --args='--spring.profiles.active=only-office'</code>
|
||||
* </li>
|
||||
*
|
||||
* <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
|
||||
* <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
|
||||
@ -59,12 +69,14 @@ import static org.springframework.test.context.jdbc.Sql.ExecutionPhase.BEFORE_TE
|
||||
*
|
||||
* EOF
|
||||
* </code></pre>
|
||||
* </li>
|
||||
*
|
||||
* <li>add the dump to that reference-schema SQL-file:</p>
|
||||
* <pre><code>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
|
||||
* </code></pre>
|
||||
* </li>
|
||||
* </ol>
|
||||
*
|
||||
* <p>The generated dump has to be committed to git and will be used in future test-runs
|
||||
|
Loading…
x
Reference in New Issue
Block a user