Skip to content

Commit

Permalink
Dev: testcases: origin testcases change for using logging in crmsh
Browse files Browse the repository at this point in the history
  • Loading branch information
liangxin1300 committed Sep 7, 2021
1 parent 582894a commit 219af9c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions test/crm-interface
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ crm_setup() {
$CRM_NO_REG options reset
$CRM_NO_REG options check-frequency on-verify
$CRM_NO_REG options check-mode relaxed
$CRM_NO_REG cib delete $CIB 2>/dev/null
$CRM_NO_REG cib delete $CIB >/dev/null 2>&1
}

crm_mksample() {
$CRM_NO_REG cib new $CIB empty 2>/dev/null
$CRM_NO_REG cib new $CIB empty >/dev/null 2>&1
$CRM_NO_REG -c $CIB<<EOF
configure
node node1
Expand Down
2 changes: 1 addition & 1 deletion test/testcases/common.excl
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Error performing operation: Transport endpoint is not connected
^\.EXT sed ["][^"]+
^\.EXT [a-zA-Z]+ validate-all
^[ ]+File ["][^"]+
^WARNING\: ([0-9]+\: )?\(cluster\_status\) warning\: Fencing and resource management disabled due to lack of quorum
^.*\: ([0-9]+\: )?\(cluster\_status\) warning\: Fencing and resource management disabled due to lack of quorum
6 changes: 3 additions & 3 deletions test/testcases/edit.exp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ op_defaults op-options: \
.INP: primitive d3 ocf:heartbeat:Dummy
.INP: group g2 d1 d2
.INP: filter "sed '/g2/s/d1/p1/;/g1/s/p1/d1/'"
ERROR: 29: Cannot create group:g1: Child primitive:d1 already in group:g2
ERROR: Cannot create group:g1: Child primitive:d1 already in group:g2
.INP: filter "sed '/g1/s/d1/p1/;/g2/s/p1/d1/'"
.INP: filter "sed '$alocation loc-d1 d1 rule $id=r1 -inf: not_defined webserver rule $id=r2 webserver: defined webserver'"
.INP: filter "sed 's/not_defined webserver/& or mem number:lte 0/'" loc-d1
Expand Down Expand Up @@ -99,9 +99,9 @@ Traceback (most recent call last):
ValueError: nosuch is not member of g1
ERROR: 44: configure.modgroup: nosuch is not member of g1
.INP: modgroup g1 add c1
ERROR: 45: a group may contain only primitives; c1 is clone
ERROR: a group may contain only primitives; c1 is clone
.INP: modgroup g1 add nosuch
ERROR: 46: g1 refers to missing object nosuch
ERROR: g1 refers to missing object nosuch
.INP: filter "sed 's/^/# this is a comment\n/'" loc-d1
.INP: rsc_defaults $id="rsc_options" failure-timeout=10m
.INP: filter "sed 's/2m/60s/'" op-options
Expand Down
4 changes: 2 additions & 2 deletions test/testcases/scripts.exp
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,15 @@ import crm_init
crm_init.install_packages(['mailx'])
crm_script.exit_ok(True)

OK: 10: Ensure mail package is installed
INFO: 10: Ensure mail package is installed
** localhost - temporary file <<END
primitive foo ocf:heartbeat:MailTo email="test@example.com" subject="hello" op start timeout="10" op stop timeout="10" op monitor interval="10" timeout="10"
clone c-foo foo

END

** localhost - crm --wait --no configure load update <<temporary file>>
OK: 10: Configure cluster resources
INFO: 10: Configure cluster resources
.INP: json '["show", "mailto"]'
{"category": "basic", "longdesc": "Notifies recipient by e-mail in the event of a resource takeover.", "name": "mailto", "shortdesc": "E-Mail", "steps": [{"longdesc": " This is a resource agent for MailTo. It sends email to a sysadmin\nwhenever a takeover occurs.", "parameters": [{"advanced": false, "longdesc": "", "name": "id", "required": true, "shortdesc": "Identifier for the cluster resource", "type": "resource", "unique": true}, {"advanced": false, "example": "", "longdesc": " The email address of sysadmin.", "name": "email", "required": true, "shortdesc": "Email address", "type": "email", "unique": false}, {"advanced": false, "example": "Resource Group", "longdesc": " The subject of the email.", "name": "subject", "required": false, "shortdesc": "Subject", "type": "string", "unique": false}], "required": true, "shortdesc": "Notifies recipients by email in the event of resource takeover"}]}
.INP: json '["verify", "mailto", {"id":"foo", "email":"test@example.com", "subject":"hello"}]'
Expand Down

0 comments on commit 219af9c

Please sign in to comment.