forked from ssinger/slony1-engine
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add in a test that exercises various attempts at adding multiple tabl…
…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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); |