forked from jjzhang/booth
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7bf1855
commit 72ece97
Showing
1 changed file
with
39 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/sh | ||
|
||
add_crmv1_group() { | ||
crmv1 group testgrp rsc1 Dummy rsc2 Dummy fake=test | ||
} | ||
|
||
rm_crmv1_group() { | ||
crmv1 group delete testgrp | ||
} | ||
|
||
check_resources() { | ||
export OCF_ROOT=/usr/lib/ocf | ||
export OCF_RESOURCE_INSTANCE=rsc1 | ||
. /usr/lib/ocf/lib/heartbeat/ocf-shellfuncs | ||
/usr/lib/ocf/resource.d/heartbeat/Dummy monitor || return 1 | ||
OCF_RESOURCE_INSTANCE=rsc2 | ||
export OCF_RESKEY_fake=test | ||
/usr/lib/ocf/resource.d/heartbeat/Dummy monitor || return 1 | ||
return 0 | ||
} | ||
|
||
# crmv1 start a group | ||
setup_crmv1_group_start_ok() { | ||
add_crmv1_group | ||
} | ||
test_crmv1_group_start_ok() { | ||
wait_exp | ||
wait_timeout | ||
} | ||
check_crmv1_group_start_ok() { | ||
check_resources | ||
} | ||
recover_crmv1_group_start_ok() { | ||
stop_site `get_site 1` | ||
stop_site `get_site 2` | ||
rm_crmv1_group | ||
} | ||
|
||
check_crmv1_group_start_ok |