/[rserv]/misc/regress.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /misc/regress.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations)
Wed Oct 29 17:05:46 2003 UTC (20 years, 6 months ago) by dpavlin
Branch: MAIN
CVS Tags: r_0_3
Changes since 1.5: +17 -13 lines
File MIME type: application/x-sh
optionally use pgdiff to check differences between databases

1 dpavlin 1.1 # regress.sh
2     # rserv regression test script
3     # (c) 2000 Thomas Lockhart, PostgreSQL Inc.
4    
5 dpavlin 1.6 dir="`dirname $0`/../"
6 dpavlin 1.2
7 dpavlin 1.1 dropdb master
8     dropdb slave
9    
10 dpavlin 1.6 createdb master || exit 1;
11     createdb slave || exit 1;
12 dpavlin 1.1
13 dpavlin 1.6 $dir/bin/MasterInit master
14     $dir/bin/SlaveInit master slave
15 dpavlin 1.1
16 dpavlin 1.3 psql -c "create table t1 (i int, t text, d timestamp default 'now');" master
17 dpavlin 1.6 $dir/bin/MasterAddTable master t1 d
18 dpavlin 1.1
19 dpavlin 1.3 psql -c "create table t1 (i int, t text, d timestamp default 'now');" slave
20 dpavlin 1.6 $dir/bin/SlaveAddTable slave t1 d
21 dpavlin 1.1
22     psql -c "insert into t1 values (1, 'one');" master
23     psql -c "insert into t1 values (2, 'two');" master
24    
25 dpavlin 1.6 $dir/bin/Replicate master slave
26     $dir/bin/MasterSync master `$dir/bin/GetSyncID --noverbose slave`
27 dpavlin 1.1
28 dpavlin 1.4 psql -c "delete from t1 where i=1;" master
29     psql -c "update t1 set t='two, updated' where i=2;" master
30 dpavlin 1.1 psql -c "insert into t1 values (3, 'three');" master
31     psql -c "insert into t1 values (4, 'four');" master
32    
33 dpavlin 1.6 $dir/bin/Replicate master slave
34     $dir/bin/MasterSync master `$dir/bin/GetSyncID --noverbose slave`
35 dpavlin 1.1
36 dpavlin 1.4 psql -c "insert into t1 values (1, 'one-insert2');" master
37     psql -c "delete from t1 where i=3;" master
38     psql -c "insert into t1 values (3, 'three-insert2');" master
39     psql -c "update t1 set t='four, updated' where i=4;" master
40    
41 dpavlin 1.6 $dir/bin/Replicate master slave
42     $dir/bin/MasterSync master `$dir/bin/GetSyncID --noverbose slave`
43    
44     if [ -e "$dir/bin/../pgdiff/pgdiff" ] ; then
45     cd $dir/bin/../pgdiff/ && ./pgdiff -v master slave
46     fi
47 dpavlin 1.4
48 dpavlin 1.1 exit

  ViewVC Help
Powered by ViewVC 1.1.26