Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit446f7f5

Browse files
committed
Rewrite pg_dump TAP tests
This reworks how the tests to run are defined. Instead of having todefine all runs for all tests, we define those tests which should pass(generally using one of the defined broad hashes), add in any whichshould be specific for this test, and exclude any specific runs thatshouldn't pass for this test. This ends up removing some 4k+ lines(more than half the file) but, more importantly, greatly simplifies theway runs-to-be-tested are defined.As discussed in the updated comments, for example, take the test whichdoes CREATE TABLE test_table. That CREATE TABLE should show up in all'full' runs of pg_dump, except those cases where 'test_table' isexcluded, of course, and that's exactly how the test gets defined now(modulo a few other related cases, like where we dump only that table,or we dump the schema it's in, or we exclude the schema it's in):like => { %full_runs, %dump_test_schema_runs, only_dump_test_table => 1, section_pre_data => 1, },unlike => { exclude_dump_test_schema => 1, exclude_test_table => 1, }, },Next, we no longer expect every run to be listed for every test. If arun is listed in 'like' (directly or through a hash) then it's a 'like',unless it's listed in 'unlike' in which case it's an 'unlike'. If itisn't listed in either, then it's considered an 'unlike' automatically.Lastly, this changes the code to no longer use like/unlike but rather touse 'ok()' with 'diag()' which allows much more control over what getsspit out to the screen. Gone are the days of the entire dump being sentto the console, now you'll just get a couple of lines for each failingtest which say the test that failed and the run that it failed on.This covers both the pg_dump TAP tests in src/bin/pg_dump and those insrc/test/modules/test_pg_dump.
1 parentcd1661b commit446f7f5

File tree

2 files changed

+780
-4700
lines changed

2 files changed

+780
-4700
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp