File: replication_flow.sh

package info (click to toggle)
mysql-sandbox 3.2.05-1.1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 916 kB
  • sloc: perl: 9,878; sh: 191; makefile: 8
file content (39 lines) | stat: -rwxr-xr-x 995 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash

sandbox_home=$SANDBOX_HOME
replication_dir=repl_deployment


function ok_equal
{
    fact="$1"
    expected="$2"
    msg="$3"
    if [ "$fact" == "$expected" ]
    then
        echo -n "ok"
    else
        echo -n "not ok"
    fi
    echo " - $msg";
}

make_replication_sandbox --replication_directory=$replication_dir $TEST_VERSION 
ok_equal $? 0 "Replication directory created"
sleep 1
$sandbox_home/$replication_dir/test_replication
ok_equal $? 0 "Replication test was successful"

sbtool -o delete -s $sandbox_home/$replication_dir 
ok_equal $? 0 "Regular replication directory $replication_dir removed"

make_replication_sandbox --circular=3 --replication_directory=$replication_dir $TEST_VERSION 
ok_equal $? 0 'circular replication installed'
sleep 1

$sandbox_home/$replication_dir/test_replication
ok_equal $? 0 "Replication test was successful"

sbtool -o delete -s $sandbox_home/$replication_dir 
ok_equal $? 0 "Circular replication directory $replication_dir removed"