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:
@@ -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"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user