|
818 | 818 | regexp => qr/^\QALTER COLLATION public.test0 OWNER TO \E.+;/m, |
819 | 819 | collation => 1, |
820 | 820 | like => { %full_runs, section_pre_data => 1, }, |
821 | | - unlike => { %dump_test_schema_runs, no_owner => 1, }, |
| 821 | + unlike => { no_owner => 1, }, |
822 | 822 | }, |
823 | 823 |
|
824 | 824 | 'ALTER FOREIGN DATA WRAPPER dummy OWNER TO' => { |
|
977 | 977 | create_sql => |
978 | 978 | 'ALTER SCHEMA public OWNER TO "regress_quoted \"" role";', |
979 | 979 | regexp => qr/^(GRANT|REVOKE)/m, |
980 | | - unlike => { defaults_public_owner => 1 }, |
| 980 | + like => {}, |
981 | 981 | }, |
982 | 982 |
|
983 | 983 | 'ALTER SEQUENCE test_table_col1_seq' => { |
|
1285 | 1285 | { %full_runs, %dump_test_schema_runs, section_pre_data => 1, }, |
1286 | 1286 | unlike => { |
1287 | 1287 | exclude_dump_test_schema => 1, |
1288 | | - only_dump_test_table => 1, |
1289 | 1288 | no_owner => 1, |
1290 | | - role => 1, |
1291 | 1289 | only_dump_measurement => 1, |
1292 | 1290 | }, |
1293 | 1291 | }, |
|
1351 | 1349 | binary_upgrade => 1, |
1352 | 1350 | no_large_objects => 1, |
1353 | 1351 | schema_only => 1, |
1354 | | - section_pre_data => 1, |
1355 | 1352 | }, |
1356 | 1353 | }, |
1357 | 1354 |
|
|
3210 | 3207 | binary_upgrade => 1, |
3211 | 3208 | exclude_dump_test_schema => 1, |
3212 | 3209 | schema_only => 1, |
3213 | | - only_dump_measurement => 1, |
3214 | 3210 | }, |
3215 | 3211 | }, |
3216 | 3212 |
|
|
3457 | 3453 | 'Disabled trigger on partition is not created' => { |
3458 | 3454 | regexp => qr/CREATE TRIGGER test_trigger.*ON dump_test_second_schema/, |
3459 | 3455 | like => {}, |
3460 | | - unlike => { %full_runs, %dump_test_schema_runs }, |
3461 | 3456 | }, |
3462 | 3457 |
|
3463 | 3458 | # Triggers on partitions should not be dropped individually |
|
3834 | 3829 | \QCREATE INDEX measurement_city_id_logdate_idx ON ONLY dump_test.measurement USING\E |
3835 | 3830 | /xm, |
3836 | 3831 | like => { |
3837 | | - binary_upgrade => 1, |
3838 | | - clean => 1, |
3839 | | - clean_if_exists => 1, |
3840 | | - compression => 1, |
3841 | | - createdb => 1, |
3842 | | - defaults => 1, |
3843 | | - exclude_test_table => 1, |
3844 | | - exclude_test_table_data => 1, |
3845 | | - no_toast_compression => 1, |
3846 | | - no_large_objects => 1, |
3847 | | - no_privs => 1, |
3848 | | - no_owner => 1, |
3849 | | - no_table_access_method => 1, |
3850 | | - only_dump_test_schema => 1, |
3851 | | - pg_dumpall_dbprivs => 1, |
3852 | | - pg_dumpall_exclude => 1, |
3853 | | - schema_only => 1, |
| 3832 | + %full_runs, |
| 3833 | + %dump_test_schema_runs, |
3854 | 3834 | section_post_data => 1, |
3855 | | - test_schema_plus_large_objects => 1, |
3856 | | - only_dump_measurement => 1, |
3857 | | - exclude_measurement_data => 1, |
3858 | 3835 | }, |
3859 | 3836 | unlike => { |
3860 | 3837 | exclude_dump_test_schema => 1, |
3861 | | - only_dump_test_table => 1, |
3862 | | - pg_dumpall_globals => 1, |
3863 | | - pg_dumpall_globals_clean => 1, |
3864 | | - role => 1, |
3865 | | - section_pre_data => 1, |
3866 | 3838 | exclude_measurement => 1, |
3867 | 3839 | }, |
3868 | 3840 | }, |
|
3913 | 3885 | role => 1, |
3914 | 3886 | section_post_data => 1, |
3915 | 3887 | only_dump_measurement => 1, |
3916 | | - exclude_measurement_data => 1, |
3917 | 3888 | }, |
3918 | 3889 | unlike => { |
3919 | 3890 | exclude_measurement => 1, |
|
3927 | 3898 | \QALTER INDEX dump_test.measurement_pkey ATTACH PARTITION dump_test_second_schema.measurement_y2006m2_pkey\E |
3928 | 3899 | /xm, |
3929 | 3900 | like => { |
3930 | | - binary_upgrade => 1, |
3931 | | - clean => 1, |
3932 | | - clean_if_exists => 1, |
3933 | | - compression => 1, |
3934 | | - createdb => 1, |
3935 | | - defaults => 1, |
3936 | | - exclude_dump_test_schema => 1, |
3937 | | - exclude_test_table => 1, |
3938 | | - exclude_test_table_data => 1, |
3939 | | - no_toast_compression => 1, |
3940 | | - no_large_objects => 1, |
3941 | | - no_privs => 1, |
3942 | | - no_owner => 1, |
3943 | | - no_table_access_method => 1, |
3944 | | - pg_dumpall_dbprivs => 1, |
3945 | | - pg_dumpall_exclude => 1, |
| 3901 | + %full_runs, |
3946 | 3902 | role => 1, |
3947 | | - schema_only => 1, |
3948 | 3903 | section_post_data => 1, |
3949 | 3904 | only_dump_measurement => 1, |
3950 | | - exclude_measurement_data => 1, |
3951 | 3905 | }, |
3952 | 3906 | unlike => { |
3953 | | - only_dump_test_schema => 1, |
3954 | | - only_dump_test_table => 1, |
3955 | | - pg_dumpall_globals => 1, |
3956 | | - pg_dumpall_globals_clean => 1, |
3957 | | - section_pre_data => 1, |
3958 | | - test_schema_plus_large_objects => 1, |
3959 | 3907 | exclude_measurement => 1, |
3960 | 3908 | }, |
3961 | 3909 | }, |
|
4929 | 4877 | $test_db = $tests{$test}->{database}; |
4930 | 4878 | } |
4931 | 4879 |
|
| 4880 | + # Check for proper test definitions |
| 4881 | + # |
| 4882 | + # There should be a "like" list, even if it is empty. (This |
| 4883 | + # makes the test more self-documenting.) |
| 4884 | + if (!defined($tests{$test}->{like})) |
| 4885 | + { |
| 4886 | + die "missing \"like\" in test \"$test\""; |
| 4887 | + } |
| 4888 | + # Check for useless entries in "unlike" list. Runs that are |
| 4889 | + # not listed in "like" don't need to be excluded in "unlike". |
| 4890 | + if ($tests{$test}->{unlike}->{$test_key} && |
| 4891 | + !defined($tests{$test}->{like}->{$test_key})) |
| 4892 | + { |
| 4893 | + die "useless \"unlike\" entry \"$test_key\" in test \"$test\""; |
| 4894 | + } |
| 4895 | +
|
4932 | 4896 | # Skip any collation-related commands if there is no collation support |
4933 | 4897 | if (!$collation_support && defined($tests{$test}->{collation})) |
4934 | 4898 | { |
|
0 commit comments