Skip to content

Commit

Permalink
Add in a test that exercises various attempts at adding multiple tabl…
Browse files Browse the repository at this point in the history
…es, including cases that should fail
  • Loading branch information
Christopher Browne committed Jan 26, 2011
1 parent 7c76761 commit 6782fa8
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion tests/testmanytables/init_add_tables.ik
@@ -1 +1,35 @@
set add table (set id = 1, tables='public.*');
try {
set add table (set id = 1, tables='public.*');
} on error {
echo 'Expected failure - some of the tables in public are not replicable';
} on success {
echo 'Oops - seems we added all the tables in public, which should not have worked';
exit 1;
}

try {
set add table (set id = 1, tables='public.table2');
} on error {
echo 'Expected failure - table2 does not have a primary key';
} on success {
echo 'Oops - table2 is not supposed to be successfully added!';
exit 1;
}

try {
set add table (set id = 1, tables='public.table[145]');
} on error {
echo 'table1, table4, table5 should be replicable';
exit 1;
}

try {
set add table (set id = 1, tables='public.table[145]');
} on error {
echo 'these tables are already replicated so we expect this to fail';
} on success {
echo 'Oops - these tables should not be successfully added!';
exit 1;
}

set add table (id=22, set id=1, origin=1, fully qualified name = 'public.table2', key='table2_id_key');

0 comments on commit 6782fa8

Please sign in to comment.