File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ proc log_file_matches {log pattern} {
2+ set fp [open $log r]
3+ set content [read $fp ]
4+ close $fp
5+ string match $pattern $content
6+ }
7+
8+ start_server {tags {" regression" }} {
9+ set slave [srv 0 client]
10+ set slave_host [srv 0 host]
11+ set slave_port [srv 0 port]
12+ set slave_log [srv 0 stdout]
13+ start_server {} {
14+ set master [srv 0 client]
15+ set master_host [srv 0 host]
16+ set master_port [srv 0 port]
17+
18+ # Set the AUTH password
19+ $master config set requirepass mypwd
20+ $slave config set masterauth mypwd
21+
22+ # Start the replication process...
23+ $slave slaveof $master_host $master_port
24+
25+ test {Slave is able to sync with master when AUTH is on} {
26+ wait_for_condition 50 100 {
27+ [log_file_matches $slave_log " *Finished with success*" ]
28+ } else {
29+ fail " Slave is not able to sync with master when AUTH is on"
30+ }
31+ }
32+ }
33+ }
34+
135start_server {tags {" regression" }} {
236 set A [srv 0 client]
337 set A_host [srv 0 host]
You can’t perform that action at this time.
0 commit comments