diff --git a/.run/ImportHostingAssets.run.xml b/.run/ImportHostingAssets.run.xml
index bedd7143..9ac4f496 100644
--- a/.run/ImportHostingAssets.run.xml
+++ b/.run/ImportHostingAssets.run.xml
@@ -6,6 +6,7 @@
+
diff --git a/.run/ImportOfficeData.run.xml b/.run/ImportOfficeData.run.xml
index c146186e..ee6f13c0 100644
--- a/.run/ImportOfficeData.run.xml
+++ b/.run/ImportOfficeData.run.xml
@@ -100,4 +100,4 @@
true
-
\ No newline at end of file
+
diff --git a/src/main/resources/db/changelog/9-hs-global/9800-cleanup.sql b/src/main/resources/db/changelog/9-hs-global/9800-cleanup.sql
index 5c46e014..86fe33dd 100644
--- a/src/main/resources/db/changelog/9-hs-global/9800-cleanup.sql
+++ b/src/main/resources/db/changelog/9-hs-global/9800-cleanup.sql
@@ -1,7 +1,7 @@
--liquibase formatted sql
-- ============================================================================
---changeset michael.hoennig:hs-global-cleanup endDelimiter:--//
+--changeset michael.hoennig:hs-global-ddl-cleanup context:hosting-asset-import endDelimiter:--//
-- ----------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS hs_office.bankaccount_create_test_data(IN givenholder character varying, IN giveniban character varying, IN givenbic character varying);
@@ -19,3 +19,14 @@ DROP PROCEDURE IF EXISTS hs_office.sepamandate_create_test_data(IN forpartnernum
DROP SCHEMA IF EXISTS rbactest CASCADE;
--//
+
+
+-- ============================================================================
+--changeset michael.hoennig:hs-global-dml-cleanup context:hosting-asset-import endDelimiter:--//
+-- ----------------------------------------------------------------------------
+
+call base.defineContext('9800-cleanup', null, '${HSADMINNG_SUPERUSER}', null);
+
+DELETE FROM rbac.subject WHERE name='superuser-alex@hostsharing.net';
+DELETE FROM rbac.subject WHERE name='superuser-fran@hostsharing.net';
+--//
diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportHostingAssets.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportHostingAssets.java
index 3976d239..744688a4 100644
--- a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportHostingAssets.java
+++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportHostingAssets.java
@@ -92,7 +92,7 @@ import static org.springframework.test.context.jdbc.Sql.ExecutionPhase.BEFORE_TE
})
@DirtiesContext
@Import({ Context.class, JpaAttempt.class, LiquibaseConfig.class })
-@ActiveProfiles({ "without-test-data", "liquibase-migration" })
+@ActiveProfiles({ "without-test-data", "liquibase-migration", "hosting-asset-import" })
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@ExtendWith(OrderedDependedTestsExtension.class)
@Sql(value = "/db/released-only-office-schema-with-import-test-data.sql", executionPhase = BEFORE_TEST_CLASS) // release-schema
@@ -137,6 +137,7 @@ public class ImportHostingAssets extends CsvDataImport {
@Order(11000)
void liquibaseMigrationForBookingAndHosting() {
liquibase.assertReferenceStatusAfterRestore(286, "hs-booking-SCHEMA");
+ makeSureThatTheImportAdminUserExists();
liquibase.runWithContexts("migration", "without-test-data");
liquibase.assertThatCurrentMigrationsGotApplied(331, "hs-booking-SCHEMA");
}
@@ -745,13 +746,6 @@ public class ImportHostingAssets extends CsvDataImport {
// --------------------------------------------------------------------------------------------
- @Test
- @Order(19000)
- @Commit
- void prepareDataBase() {
- makeSureThatTheImportAdminUserExists();
- }
-
@Test
@Order(19100)
@Commit