1
0
mirror of https://github.com/google/nomulus synced 2026-04-26 11:10:48 +00:00

Update golden schema comparison in schema test (#2805)

Postgresql-17.6 introduces two new lines in pg_dump output as a
security feature: `\restricted {HASH}` and `\unrestricted {HASH}`.

We filter out lines starting with these two prefixes when comparing
schemas.

The db upgrade also adds two empty lines to the pg_dump output. We
know ignore all empty lines when comparing schemas.
This commit is contained in:
Weimin Yu
2025-08-18 20:41:47 +00:00
committed by GitHub
parent d23640a54f
commit 1164070576
2 changed files with 6 additions and 4 deletions

View File

@@ -115,7 +115,7 @@ class SchemaTest {
Joiner.on(File.separatorChar).join(MOUNTED_RESOURCE_PATH, DUMP_OUTPUT_FILE));
assertThat(dumpedSchema)
.ignoringLinesStartingWith("--")
.ignoringLinesStartingWith("--", "\\restrict", "\\unrestrict")
.hasSameContentAs(Resources.getResource("sql/schema/nomulus.golden.sql"));
}