diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 86ff6a7..51f2636 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -12,4 +12,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: gradle/wrapper-validation-action@v3 + - uses: gradle/actions/wrapper-validation@v5 diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 027727a..ecb485b 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '17', '21', '24' ] + java: [ '17', '21', '25' ] steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index 4c6a26f..1d1615e 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ class SchemaTest implements JUnit5ValidationFileAssertions { @Container @ServiceConnection - static PostgreSQLContainer postgres = new PostgreSQLContainer<>("postgres:17.5"); + static PostgreSQLContainer postgres = new PostgreSQLContainer<>("postgres:17.6"); @Test void schemaExport() { diff --git a/build.gradle b/build.gradle index 6cb9f1e..e80db4c 100644 --- a/build.gradle +++ b/build.gradle @@ -71,7 +71,7 @@ dependencyLocking { } wrapper { - gradleVersion = "8.14.1" + gradleVersion = "9.2.0" distributionType = Wrapper.DistributionType.ALL } diff --git a/data/test/validation/PostgresDumpTest/DatabaseWithData/testCleanAndCreate.txt b/data/test/validation/PostgresDumpTest/DatabaseWithData/testCleanAndCreate.txt index ce56a84..e761fcb 100644 --- a/data/test/validation/PostgresDumpTest/DatabaseWithData/testCleanAndCreate.txt +++ b/data/test/validation/PostgresDumpTest/DatabaseWithData/testCleanAndCreate.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -27,8 +29,10 @@ CREATE DATABASE "test-db" WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PRO ALTER DATABASE "test-db" OWNER TO "test-user"; +\unrestrict RESTRICT_KEY1 \encoding SQL_ASCII \connect -reuse-previous=on "dbname='test-db'" +\restrict RESTRICT_KEY1 SET statement_timeout = 0; SET lock_timeout = 0; @@ -102,3 +106,5 @@ ALTER TABLE ONLY public.employees -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/DatabaseWithData/testCleanAndCreateIfExists.txt b/data/test/validation/PostgresDumpTest/DatabaseWithData/testCleanAndCreateIfExists.txt index a89d8d7..c52063c 100644 --- a/data/test/validation/PostgresDumpTest/DatabaseWithData/testCleanAndCreateIfExists.txt +++ b/data/test/validation/PostgresDumpTest/DatabaseWithData/testCleanAndCreateIfExists.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -27,8 +29,10 @@ CREATE DATABASE "test-db" WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PRO ALTER DATABASE "test-db" OWNER TO "test-user"; +\unrestrict RESTRICT_KEY1 \encoding SQL_ASCII \connect -reuse-previous=on "dbname='test-db'" +\restrict RESTRICT_KEY1 SET statement_timeout = 0; SET lock_timeout = 0; @@ -102,3 +106,5 @@ ALTER TABLE ONLY public.employees -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/DatabaseWithData/testConnectViaHostName.txt b/data/test/validation/PostgresDumpTest/DatabaseWithData/testConnectViaHostName.txt index 34f0822..25dc4fb 100644 --- a/data/test/validation/PostgresDumpTest/DatabaseWithData/testConnectViaHostName.txt +++ b/data/test/validation/PostgresDumpTest/DatabaseWithData/testConnectViaHostName.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -101,3 +103,5 @@ ALTER TABLE ONLY public.employees -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDataOnly.txt b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDataOnly.txt index 543669f..1c9c197 100644 --- a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDataOnly.txt +++ b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDataOnly.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -44,3 +46,5 @@ COPY public.employees (id, first_name, last_name, email, hire_date, salary) FROM -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDump.txt b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDump.txt index 34f0822..25dc4fb 100644 --- a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDump.txt +++ b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDump.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -101,3 +103,5 @@ ALTER TABLE ONLY public.employees -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpExcludingTableData.txt b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpExcludingTableData.txt index 0f723d1..296f18b 100644 --- a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpExcludingTableData.txt +++ b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpExcludingTableData.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -88,3 +90,5 @@ ALTER TABLE ONLY public.employees -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpSpecificSchemaOnly.txt b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpSpecificSchemaOnly.txt index 96e53de..a8f24c9 100644 --- a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpSpecificSchemaOnly.txt +++ b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpSpecificSchemaOnly.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -58,3 +60,5 @@ ALTER TABLE ONLY other_schema.persons -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpToFileExcludingTableData.txt b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpToFileExcludingTableData.txt index e0805d6..6db6ee8 100644 --- a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpToFileExcludingTableData.txt +++ b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpToFileExcludingTableData.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -88,3 +90,5 @@ ALTER TABLE ONLY public.employees -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpVerbose.txt b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpVerbose.txt index e4e000a..0041743 100644 --- a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpVerbose.txt +++ b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpVerbose.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) -- Started on [MASKED_TIMESTAMP] UTC @@ -64,7 +66,7 @@ CREATE TABLE public.employees ( ALTER TABLE public.employees OWNER TO "test-user"; -- --- TOC entry 3364 (class 0 OID 16391) +-- TOC entry 3428 (class 0 OID 16391) -- Dependencies: 219 -- Data for Name: persons; Type: TABLE DATA; Schema: other_schema; Owner: test-user -- @@ -77,7 +79,7 @@ COPY other_schema.persons (id, name) FROM stdin; -- --- TOC entry 3363 (class 0 OID 16385) +-- TOC entry 3427 (class 0 OID 16385) -- Dependencies: 218 -- Data for Name: employees; Type: TABLE DATA; Schema: public; Owner: test-user -- @@ -92,7 +94,7 @@ COPY public.employees (id, first_name, last_name, email, hire_date, salary) FROM -- --- TOC entry 3217 (class 2606 OID 16397) +-- TOC entry 3281 (class 2606 OID 16397) -- Name: persons persons_pkey; Type: CONSTRAINT; Schema: other_schema; Owner: test-user -- @@ -101,7 +103,7 @@ ALTER TABLE ONLY other_schema.persons -- --- TOC entry 3215 (class 2606 OID 16389) +-- TOC entry 3279 (class 2606 OID 16389) -- Name: employees employees_pkey; Type: CONSTRAINT; Schema: public; Owner: test-user -- @@ -114,3 +116,5 @@ ALTER TABLE ONLY public.employees -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpWithoutPrivileges.txt b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpWithoutPrivileges.txt index 34f0822..25dc4fb 100644 --- a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpWithoutPrivileges.txt +++ b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpWithoutPrivileges.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -101,3 +103,5 @@ ALTER TABLE ONLY public.employees -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpWithoutSpecificSchema.txt b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpWithoutSpecificSchema.txt index 1df5992..ddd1c7f 100644 --- a/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpWithoutSpecificSchema.txt +++ b/data/test/validation/PostgresDumpTest/DatabaseWithData/testDumpWithoutSpecificSchema.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -57,3 +59,5 @@ ALTER TABLE ONLY public.employees -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/DatabaseWithData/testSchemaOnly.txt b/data/test/validation/PostgresDumpTest/DatabaseWithData/testSchemaOnly.txt index c465800..71b8043 100644 --- a/data/test/validation/PostgresDumpTest/DatabaseWithData/testSchemaOnly.txt +++ b/data/test/validation/PostgresDumpTest/DatabaseWithData/testSchemaOnly.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -77,3 +79,5 @@ ALTER TABLE ONLY public.employees -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/EmptyDatabase/testDumpToFile.txt b/data/test/validation/PostgresDumpTest/EmptyDatabase/testDumpToFile.txt index cd8c34d..229438c 100644 --- a/data/test/validation/PostgresDumpTest/EmptyDatabase/testDumpToFile.txt +++ b/data/test/validation/PostgresDumpTest/EmptyDatabase/testDumpToFile.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -20,3 +22,5 @@ SET row_security = off; -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/EmptyDatabase/testDumpToString.txt b/data/test/validation/PostgresDumpTest/EmptyDatabase/testDumpToString.txt index cd8c34d..229438c 100644 --- a/data/test/validation/PostgresDumpTest/EmptyDatabase/testDumpToString.txt +++ b/data/test/validation/PostgresDumpTest/EmptyDatabase/testDumpToString.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -20,3 +22,5 @@ SET row_security = off; -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/EmptyDatabase/testSchemaOnly.txt b/data/test/validation/PostgresDumpTest/EmptyDatabase/testSchemaOnly.txt index cd8c34d..229438c 100644 --- a/data/test/validation/PostgresDumpTest/EmptyDatabase/testSchemaOnly.txt +++ b/data/test/validation/PostgresDumpTest/EmptyDatabase/testSchemaOnly.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -20,3 +22,5 @@ SET row_security = off; -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/testConnectViaDockerContainerIpAddress.txt b/data/test/validation/PostgresDumpTest/testConnectViaDockerContainerIpAddress.txt index cd8c34d..229438c 100644 --- a/data/test/validation/PostgresDumpTest/testConnectViaDockerContainerIpAddress.txt +++ b/data/test/validation/PostgresDumpTest/testConnectViaDockerContainerIpAddress.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -20,3 +22,5 @@ SET row_security = off; -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/testConnectViaDockerNetworkAlias_postgis-17.txt b/data/test/validation/PostgresDumpTest/testConnectViaDockerNetworkAlias_postgis-17.txt index 952b2d3..edd2c41 100644 --- a/data/test/validation/PostgresDumpTest/testConnectViaDockerNetworkAlias_postgis-17.txt +++ b/data/test/validation/PostgresDumpTest/testConnectViaDockerNetworkAlias_postgis-17.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg110+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -151,7 +153,7 @@ COPY tiger.pagc_rules (id, rule, is_custom) FROM stdin; -- Data for Name: topology; Type: TABLE DATA; Schema: topology; Owner: test-user -- -COPY topology.topology (id, name, srid, "precision", hasz) FROM stdin; +COPY topology.topology (id, name, srid, "precision", hasz, useslargeids) FROM stdin; \. @@ -173,3 +175,5 @@ SELECT pg_catalog.setval('topology.topology_id_seq', 1, false); -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresDumpTest/testConnectViaDockerNetworkAlias_vanilla-17.txt b/data/test/validation/PostgresDumpTest/testConnectViaDockerNetworkAlias_vanilla-17.txt index cd8c34d..229438c 100644 --- a/data/test/validation/PostgresDumpTest/testConnectViaDockerNetworkAlias_vanilla-17.txt +++ b/data/test/validation/PostgresDumpTest/testConnectViaDockerNetworkAlias_vanilla-17.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -20,3 +22,5 @@ SET row_security = off; -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/data/test/validation/PostgresRestoreTest/testRestoreOnlySpecificSchema.txt b/data/test/validation/PostgresRestoreTest/testRestoreOnlySpecificSchema.txt index c0d8fbd..a495fc5 100644 --- a/data/test/validation/PostgresRestoreTest/testRestoreOnlySpecificSchema.txt +++ b/data/test/validation/PostgresRestoreTest/testRestoreOnlySpecificSchema.txt @@ -2,8 +2,10 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) --- Dumped by pg_dump version 17.5 (Debian 17.5-1.pgdg120+1) +\restrict RESTRICT_KEY1 + +-- Dumped from database version 17.6 (Debian 17.6-2.pgdg13+1) +-- Dumped by pg_dump version 17.6 (Debian 17.6-2.pgdg13+1) SET statement_timeout = 0; SET lock_timeout = 0; @@ -61,3 +63,5 @@ ALTER TABLE ONLY other_schema.persons -- -- PostgreSQL database dump complete -- + +\unrestrict RESTRICT_KEY1 diff --git a/gradle.lockfile b/gradle.lockfile index 6234b6c..568b0d4 100644 --- a/gradle.lockfile +++ b/gradle.lockfile @@ -1,45 +1,47 @@ # This is a Gradle generated file for dependency locking. # Manual edits can break the build and are not advised. # This file is expected to be part of source control. -ch.qos.logback:logback-classic:1.5.18=testRuntimeClasspath -ch.qos.logback:logback-core:1.5.18=testRuntimeClasspath -com.fasterxml.jackson.core:jackson-annotations:2.10.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.github.docker-java:docker-java-api:3.4.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.github.docker-java:docker-java-transport-zerodep:3.4.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -com.github.docker-java:docker-java-transport:3.4.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +ch.qos.logback:logback-classic:1.5.20=testRuntimeClasspath +ch.qos.logback:logback-core:1.5.20=testRuntimeClasspath +com.fasterxml.jackson.core:jackson-annotations:2.19.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.fasterxml.jackson:jackson-bom:2.19.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.github.docker-java:docker-java-api:3.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.github.docker-java:docker-java-transport-zerodep:3.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +com.github.docker-java:docker-java-transport:3.6.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath com.googlecode.java-diff-utils:diffutils:1.3.0=testCompileClasspath,testRuntimeClasspath +commons-codec:commons-codec:1.19.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +commons-io:commons-io:2.20.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath de.cronn:test-utils:1.1.1=testCompileClasspath,testRuntimeClasspath de.cronn:validation-file-assertions:0.8.0=testCompileClasspath,testRuntimeClasspath -junit:junit:4.13.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -net.bytebuddy:byte-buddy:1.15.11=testCompileClasspath,testRuntimeClasspath -net.java.dev.jna:jna:5.13.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.apache.commons:commons-compress:1.24.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.apache.commons:commons-lang3:3.17.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +net.bytebuddy:byte-buddy:1.17.7=testCompileClasspath,testRuntimeClasspath +net.java.dev.jna:jna:5.17.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-compress:1.28.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.apache.commons:commons-lang3:3.19.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath -org.assertj:assertj-core:3.27.3=testCompileClasspath,testRuntimeClasspath -org.checkerframework:checker-qual:3.48.3=runtimeClasspath,testRuntimeClasspath -org.hamcrest:hamcrest-core:1.3=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.assertj:assertj-core:3.27.6=testCompileClasspath,testRuntimeClasspath +org.checkerframework:checker-qual:3.49.5=runtimeClasspath,testRuntimeClasspath org.jacoco:org.jacoco.agent:0.8.13=jacocoAgent,jacocoAnt org.jacoco:org.jacoco.ant:0.8.13=jacocoAnt org.jacoco:org.jacoco.core:0.8.13=jacocoAnt org.jacoco:org.jacoco.report:0.8.13=jacocoAnt org.jetbrains:annotations:17.0.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-api:5.12.2=testCompileClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:5.12.2=testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:5.12.2=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-commons:1.12.2=testCompileClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-engine:1.12.2=testRuntimeClasspath -org.junit.platform:junit-platform-launcher:1.12.2=testRuntimeClasspath -org.junit:junit-bom:5.12.2=testCompileClasspath,testRuntimeClasspath +org.jspecify:jspecify:1.0.0=testCompileClasspath +org.junit.jupiter:junit-jupiter-api:6.0.1=testCompileClasspath,testRuntimeClasspath +org.junit.jupiter:junit-jupiter-engine:6.0.1=testRuntimeClasspath +org.junit.jupiter:junit-jupiter-params:6.0.1=testCompileClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-commons:6.0.1=testCompileClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-engine:6.0.1=testRuntimeClasspath +org.junit.platform:junit-platform-launcher:6.0.1=testRuntimeClasspath +org.junit:junit-bom:6.0.1=testCompileClasspath,testRuntimeClasspath org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath org.ow2.asm:asm-commons:9.8=jacocoAnt org.ow2.asm:asm-tree:9.8=jacocoAnt org.ow2.asm:asm:9.8=jacocoAnt -org.postgresql:postgresql:42.7.5=runtimeClasspath,testRuntimeClasspath +org.postgresql:postgresql:42.7.8=runtimeClasspath,testRuntimeClasspath org.rnorth.duct-tape:duct-tape:1.0.8=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath org.slf4j:slf4j-api:2.0.17=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -org.testcontainers:database-commons:1.21.0=testCompileClasspath,testRuntimeClasspath -org.testcontainers:jdbc:1.21.0=testCompileClasspath,testRuntimeClasspath -org.testcontainers:postgresql:1.21.0=testCompileClasspath,testRuntimeClasspath -org.testcontainers:testcontainers:1.21.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +org.testcontainers:database-commons:1.21.3=testCompileClasspath,testRuntimeClasspath +org.testcontainers:jdbc:1.21.3=testCompileClasspath,testRuntimeClasspath +org.testcontainers:postgresql:1.21.3=testCompileClasspath,testRuntimeClasspath +org.testcontainers:testcontainers:2.0.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath empty=annotationProcessor,testAnnotationProcessor diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 1b33c55..f8e1ee3 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6925085..6954be8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 23d15a9..adff685 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -114,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -172,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" diff --git a/gradlew.bat b/gradlew.bat index 5eed7ee..e509b2d 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,10 @@ goto fail :execute @rem Setup the command line -set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/src/main/java/de/cronn/postgres/snapshot/util/PostgresUtils.java b/src/main/java/de/cronn/postgres/snapshot/util/PostgresUtils.java index 9e9ab8e..34cfe29 100644 --- a/src/main/java/de/cronn/postgres/snapshot/util/PostgresUtils.java +++ b/src/main/java/de/cronn/postgres/snapshot/util/PostgresUtils.java @@ -30,7 +30,7 @@ final class PostgresUtils { private static final Logger log = LoggerFactory.getLogger(PostgresUtils.class); - private static final Pattern POSTGRES_VERSION_PATTERN = Pattern.compile("postgres \\(PostgreSQL\\) (\\d+\\.\\d+) \\(.+\\)"); + private static final Pattern POSTGRES_VERSION_PATTERN = Pattern.compile("postgres \\(PostgreSQL\\) (\\d+\\.\\d+)(?: \\(.+\\))?"); private static final String JDBC_URL_PREFIX = "jdbc:"; static GenericContainer createPostgresContainer(String postgresVersion) { diff --git a/src/test/java/de/cronn/postgres/snapshot/util/BaseTest.java b/src/test/java/de/cronn/postgres/snapshot/util/BaseTest.java index b65aa1e..92adaa1 100644 --- a/src/test/java/de/cronn/postgres/snapshot/util/BaseTest.java +++ b/src/test/java/de/cronn/postgres/snapshot/util/BaseTest.java @@ -21,6 +21,8 @@ import org.testcontainers.utility.DockerImageName; import de.cronn.assertions.validationfile.ValidationFileAssertions; +import de.cronn.assertions.validationfile.normalization.IdNormalizer; +import de.cronn.assertions.validationfile.normalization.IncrementingIdProvider; import de.cronn.assertions.validationfile.normalization.ValidationNormalizer; import de.cronn.testutils.ThreadLeakCheck; @@ -43,7 +45,7 @@ }) abstract class BaseTest { - private static final DockerImageName POSTGRES_DOCKER_IMAGE = DockerImageName.parse("postgres:17.5"); + private static final DockerImageName POSTGRES_DOCKER_IMAGE = DockerImageName.parse("postgres:17.6"); private static final String DATABASE_NAME = "test-db"; protected static final String USERNAME = "test-user"; @@ -119,6 +121,10 @@ INSERT INTO employees (id, first_name, last_name, email, hire_date, salary) VALU } } + protected static ValidationNormalizer normalizeRestrictKey() { + return new IdNormalizer(new IncrementingIdProvider(), "RESTRICT_KEY", "\\\\(?:un)?restrict ([a-zA-Z0-9]{63})"); + } + @BeforeEach void prepareValidationFileAssertions(TestInfo testInfo) { validationFileAssertions = new SoftValidationFileAssertions(testInfo); @@ -128,12 +134,12 @@ protected void compareActualWithValidationFile(String actual) { validationFileAssertions.assertWithFile(actual); } - protected void compareActualWithValidationFile(String actual, String suffix) { - validationFileAssertions.assertWithFileWithSuffix(actual, suffix); + protected void compareActualWithValidationFile(String actual, ValidationNormalizer validationNormalizer) { + compareActualWithValidationFile(actual, validationNormalizer, null); } - protected void compareActualWithValidationFile(String actual, ValidationNormalizer validationNormalizer) { - validationFileAssertions.assertWithFile(actual, validationNormalizer); + protected void compareActualWithValidationFile(String actual, ValidationNormalizer validationNormalizer, String suffix) { + validationFileAssertions.assertWithFileWithSuffix(actual, validationNormalizer, suffix); } private class SoftValidationFileAssertions implements ValidationFileAssertions { diff --git a/src/test/java/de/cronn/postgres/snapshot/util/PostgresDumpTest.java b/src/test/java/de/cronn/postgres/snapshot/util/PostgresDumpTest.java index fa5d5e0..a5f5b5b 100644 --- a/src/test/java/de/cronn/postgres/snapshot/util/PostgresDumpTest.java +++ b/src/test/java/de/cronn/postgres/snapshot/util/PostgresDumpTest.java @@ -47,7 +47,7 @@ static void stopPostgresContainer() { @Test void testDumpToString() { String dump = PostgresDump.dumpToString(jdbcUrl, USERNAME, PASSWORD); - compareActualWithValidationFile(dump); + compareActualWithValidationFile(dump, normalizeRestrictKey()); } @Test @@ -57,13 +57,13 @@ void testDumpToFile(@TempDir Path tempDir) throws Exception { PostgresDump.dump(writer, jdbcUrl, USERNAME, PASSWORD); } String dump = Files.readString(dumpFile, StandardCharsets.UTF_8); - compareActualWithValidationFile(dump); + compareActualWithValidationFile(dump, normalizeRestrictKey()); } @Test void testSchemaOnly() { String dump = PostgresDump.dumpToString(jdbcUrl, USERNAME, PASSWORD, PostgresDumpOption.SCHEMA_ONLY); - compareActualWithValidationFile(dump); + compareActualWithValidationFile(dump, normalizeRestrictKey()); } } @@ -89,14 +89,15 @@ static void createTablesAndInsertData() { @Test void testDump() { String dump = PostgresDump.dumpToString(jdbcUrl, USERNAME, PASSWORD); - compareActualWithValidationFile(dump); + compareActualWithValidationFile(dump, normalizeRestrictKey()); } @Test void testDumpVerbose() { String dump = PostgresDump.dumpToString(jdbcUrl, USERNAME, PASSWORD, PostgresDumpOption.VERBOSE); compareActualWithValidationFile(dump, - new SimpleRegexReplacement("(Started|Completed) on \\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}", "$1 on [MASKED_TIMESTAMP]")); + normalizeRestrictKey().and( + new SimpleRegexReplacement("(Started|Completed) on \\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}", "$1 on [MASKED_TIMESTAMP]"))); } @Test @@ -105,19 +106,19 @@ void testDumpAsTarFile(@TempDir Path tempDir) throws Exception { try (OutputStream outputStream = Files.newOutputStream(dumpFile)) { PostgresDump.dump(outputStream, jdbcUrl, USERNAME, PASSWORD, PostgresDumpFormat.TAR); } - assertThat(dumpFile).hasSize(10240); + assertThat(dumpFile).hasSize(10752); } @Test void testSchemaOnly() { String dump = PostgresDump.dumpToString(jdbcUrl, USERNAME, PASSWORD, PostgresDumpOption.SCHEMA_ONLY); - compareActualWithValidationFile(dump); + compareActualWithValidationFile(dump, normalizeRestrictKey()); } @Test void testDataOnly() { String dump = PostgresDump.dumpToString(jdbcUrl, USERNAME, PASSWORD, PostgresDumpOption.DATA_ONLY); - compareActualWithValidationFile(dump); + compareActualWithValidationFile(dump, normalizeRestrictKey()); } @Test @@ -126,7 +127,7 @@ void testCleanAndCreate() { PostgresDumpOption.CLEAN, PostgresDumpOption.CREATE, PostgresDumpOption.SCHEMA_ONLY); - compareActualWithValidationFile(dump); + compareActualWithValidationFile(dump, normalizeRestrictKey()); } @Test @@ -136,13 +137,13 @@ void testCleanAndCreateIfExists() { PostgresDumpOption.IF_EXISTS, PostgresDumpOption.CREATE, PostgresDumpOption.SCHEMA_ONLY); - compareActualWithValidationFile(dump); + compareActualWithValidationFile(dump, normalizeRestrictKey()); } @Test void testDumpWithoutPrivileges() { String dump = PostgresDump.dumpToString(jdbcUrl, USERNAME, PASSWORD, PostgresDumpOption.NO_PRIVILEGES); - compareActualWithValidationFile(dump); + compareActualWithValidationFile(dump, normalizeRestrictKey()); } @Test @@ -150,7 +151,7 @@ void testDumpSpecificSchemaOnly() { String dump = PostgresDump.dumpToString(jdbcUrl, USERNAME, PASSWORD, List.of(Schema.include("other_schema")), PostgresDumpOption.NO_OWNER, PostgresDumpOption.INSERTS); - compareActualWithValidationFile(dump); + compareActualWithValidationFile(dump, normalizeRestrictKey()); } @Test @@ -158,7 +159,7 @@ void testDumpWithoutSpecificSchema() { String dump = PostgresDump.dumpToString(jdbcUrl, USERNAME, PASSWORD, List.of(Schema.exclude("other_schema")), PostgresDumpOption.NO_OWNER, PostgresDumpOption.INSERTS); - compareActualWithValidationFile(dump); + compareActualWithValidationFile(dump, normalizeRestrictKey()); } @Test @@ -174,7 +175,7 @@ void testDumpWithIllegalParameters() { void testDumpExcludingTableData() { String dump = PostgresDump.dumpToString(jdbcUrl, USERNAME, PASSWORD, List.of(), List.of("emplo*")); - compareActualWithValidationFile(dump); + compareActualWithValidationFile(dump, normalizeRestrictKey()); } @Test @@ -183,7 +184,7 @@ void testDumpToFileExcludingTableData(@TempDir Path tempDir) throws Exception { PostgresDump.dumpToFile(dumpFile, jdbcUrl, USERNAME, PASSWORD, PostgresDumpFormat.PLAIN_TEXT, List.of(), List.of("other_schema.persons"), PostgresDumpOption.INSERTS); String fileContent = Files.readString(dumpFile, PostgresDump.ENCODING); - compareActualWithValidationFile(fileContent); + compareActualWithValidationFile(fileContent, normalizeRestrictKey()); } @Test @@ -192,7 +193,7 @@ void testConnectViaHostName() throws Exception { assertThat(jdbcUrl).contains("://localhost:"); String replacedJdbcUrl = jdbcUrl.replaceFirst("localhost:", InetAddress.getLocalHost().getHostName() + ":"); String schema = PostgresDump.dumpToString(replacedJdbcUrl, USERNAME, PASSWORD); - compareActualWithValidationFile(schema); + compareActualWithValidationFile(schema, normalizeRestrictKey()); } } @@ -203,7 +204,7 @@ void testOtherPostgresVersion() { String jdbcUrl = otherPostgresContainer.getJdbcUrl(); String schema = PostgresDump.dumpToString(jdbcUrl, USERNAME, PASSWORD, PostgresDumpOption.SCHEMA_ONLY); - compareActualWithValidationFile(schema); + compareActualWithValidationFile(schema, normalizeRestrictKey()); } } @@ -211,7 +212,7 @@ void testOtherPostgresVersion() { void testConnectViaDockerContainerIpAddress() { String networkAlias = "postgres-db"; try (Network network = Network.newNetwork(); - PostgreSQLContainer postgresInNetworkContainer = createPostgresContainer(DockerImageName.parse("postgres:17.5")) + PostgreSQLContainer postgresInNetworkContainer = createPostgresContainer(DockerImageName.parse("postgres:17.6")) .withNetwork(network) .withNetworkAliases(networkAlias)) { postgresInNetworkContainer.start(); @@ -220,14 +221,14 @@ void testConnectViaDockerContainerIpAddress() { String jdbcUrl = "jdbc:postgresql://%s/test-db".formatted(ipAddress); String schema = PostgresDump.dumpToString(jdbcUrl, USERNAME, PASSWORD); - compareActualWithValidationFile(schema); + compareActualWithValidationFile(schema, normalizeRestrictKey()); } } @ParameterizedTest @CsvSource({ - "vanilla-17, postgres:17.5", - "postgis-17, postgis/postgis:17-3.5", + "vanilla-17, postgres:17.6", + "postgis-17, postgis/postgis:17-3.6-alpine", }) void testConnectViaDockerNetworkAlias(String testName, String fullImageName) { String networkAlias = "postgres-db"; @@ -240,7 +241,7 @@ void testConnectViaDockerNetworkAlias(String testName, String fullImageName) { String jdbcUrl = "jdbc:postgresql://%s/test-db".formatted(networkAlias); String schema = PostgresDump.dumpToString(jdbcUrl, USERNAME, PASSWORD); - compareActualWithValidationFile(schema, testName); + compareActualWithValidationFile(schema, normalizeRestrictKey(), testName); } } @@ -256,4 +257,5 @@ private String resolveHostname(Network network, String hostname) { return matcher.group(1); } } + } diff --git a/src/test/java/de/cronn/postgres/snapshot/util/PostgresRestoreTest.java b/src/test/java/de/cronn/postgres/snapshot/util/PostgresRestoreTest.java index 12ff6d7..51d8d8d 100644 --- a/src/test/java/de/cronn/postgres/snapshot/util/PostgresRestoreTest.java +++ b/src/test/java/de/cronn/postgres/snapshot/util/PostgresRestoreTest.java @@ -60,7 +60,8 @@ private void dumpAndRestore(Path tempDir, PostgresRestoreOption... postgresResto postgresRestoreOptions); String dumpOtherPostgres = PostgresDump.dumpToString(otherPostgresJdbcUrl, USERNAME, PASSWORD); - assertThat(dumpOtherPostgres).isEqualTo(dumpPrimaryPostgres); + assertThat(normalizeRestrictKey().normalize(dumpOtherPostgres)) + .isEqualTo(normalizeRestrictKey().normalize(dumpPrimaryPostgres)); } } @@ -80,7 +81,7 @@ void testRestoreOnlySpecificSchema(@TempDir Path tempDir) { PostgresRestoreOption.EXIT_ON_ERROR); String dumpAfterRestorePostgres = PostgresDump.dumpToString(otherPostgresJdbcUrl, USERNAME, PASSWORD); - compareActualWithValidationFile(dumpAfterRestorePostgres); + compareActualWithValidationFile(dumpAfterRestorePostgres, normalizeRestrictKey()); } }