This commit is contained in:
Michael Hoennig 2025-01-30 09:34:28 +01:00
parent 5b85a9463e
commit fd94a12946

View File

@ -112,13 +112,13 @@ public class LiquibaseCompatibilityIntegrationTest {
final var sqlDumpFile = new File(targetFileName.getParent(), "." + targetFileName.getName()); final var sqlDumpFile = new File(targetFileName.getParent(), "." + targetFileName.getName());
final var pb = new ProcessBuilder( final var pb = new ProcessBuilder(
"pg_dump", "--column-inserts", "--disable-dollar-quoting", "pg_dump", "--column-inserts", "--disable-dollar-quoting",
"--host=" + getJdbcDatabaseContainer().getHost(), "--host=" + jdbcDatabaseContainer.getHost(),
"--port=" + jdbcDatabaseContainer.getFirstMappedPort(), "--port=" + jdbcDatabaseContainer.getFirstMappedPort(),
"--username=" + getJdbcDatabaseContainer().getUsername() , "--username=" + jdbcDatabaseContainer.getUsername() ,
"--dbname=" + jdbcDatabaseContainer.getDatabaseName(), "--dbname=" + jdbcDatabaseContainer.getDatabaseName(),
"--file=" + sqlDumpFile.getCanonicalPath() "--file=" + sqlDumpFile.getCanonicalPath()
); );
pb.environment().put("PGPASSWORD", getJdbcDatabaseContainer().getPassword()); pb.environment().put("PGPASSWORD", jdbcDatabaseContainer.getPassword());
final var process = pb.start(); final var process = pb.start();
int exitCode = process.waitFor(); int exitCode = process.waitFor();
@ -138,11 +138,8 @@ public class LiquibaseCompatibilityIntegrationTest {
-- --
CREATE ROLE postgres; CREATE ROLE postgres;
CREATE ROLE admin; CREATE ROLE admin;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO admin;
CREATE ROLE restricted; CREATE ROLE restricted;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO restricted;
"""; """;
writeStringToFile(targetFileName, header, UTF_8, false); // false = overwrite writeStringToFile(targetFileName, header, UTF_8, false); // false = overwrite