Skip to content

Commit 28d090c

Browse files
committed
Dev: behave: Adjust functional test for previous changes
1 parent 0fbbbb2 commit 28d090c

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

test/features/bootstrap_bugs.feature

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,31 @@ Feature: Regression test for bootstrap bugs
44
Tag @clean means need to stop cluster service if the service is available
55
Need nodes: hanode1 hanode2 hanode3
66

7+
@clean
8+
Scenario: Stages dependency (bsc#1175865)
9+
Given Cluster service is "stopped" on "hanode1"
10+
And Cluster service is "stopped" on "hanode2"
11+
When Try "crm cluster init cluster -y" on "hanode1"
12+
Then Except "ERROR: cluster.init: Please run 'ssh' stage first"
13+
When Run "crm cluster init ssh -y" on "hanode1"
14+
When Try "crm cluster init cluster -y" on "hanode1"
15+
Then Except "ERROR: cluster.init: Please run 'csync2' stage first"
16+
When Run "crm cluster init csync2 -y" on "hanode1"
17+
When Try "crm cluster init cluster -y" on "hanode1"
18+
Then Except "ERROR: cluster.init: Please run 'corosync' stage first"
19+
When Run "crm cluster init corosync -y" on "hanode1"
20+
When Run "crm cluster init cluster -y" on "hanode1"
21+
Then Cluster service is "started" on "hanode1"
22+
23+
When Try "crm cluster join cluster -c hanode1 -y" on "hanode2"
24+
Then Except "ERROR: cluster.join: Please run 'ssh' stage first"
25+
When Try "crm cluster join ssh -c hanode1 -y" on "hanode2"
26+
When Try "crm cluster join cluster -c hanode1 -y" on "hanode2"
27+
Then Except "ERROR: cluster.join: Please run 'csync2' stage first"
28+
When Try "crm cluster join csync2 -c hanode1 -y" on "hanode2"
29+
When Try "crm cluster join cluster -c hanode1 -y" on "hanode2"
30+
Then Cluster service is "started" on "hanode2"
31+
732
@clean
833
Scenario: Set placement-strategy value as "default"(bsc#1129462)
934
Given Cluster service is "stopped" on "hanode1"

test/features/bootstrap_options.feature

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ Feature: crmsh bootstrap process - options
3636
When Try "crm cluster init sbd -N hanode1 -N hanode2 -y" on "hanode1"
3737
Then Expected "Can't use -N/--nodes option and stage(sbd) together" in stderr
3838

39+
@clean
40+
Scenario: Stage validation
41+
When Try "crm cluster init fdsf -y" on "hanode1"
42+
Then Expected "Invalid stage: fdsf(available stages: ssh, csync2, corosync, sbd, cluster, ocfs2, admin, qdevice)" in stderr
43+
When Try "crm cluster join fdsf -y" on "hanode1"
44+
Then Expected "Invalid stage: fdsf(available stages: ssh, csync2, ssh_merge, cluster)" in stderr
45+
When Try "crm cluster join ssh -y" on "hanode1"
46+
Then Expected "Can't use stage(ssh) without specifying cluster node" in stderr
47+
3948
@clean
4049
Scenario: Init whole cluster service on node "hanode1" using "--node" option
4150
Given Cluster service is "stopped" on "hanode1"
@@ -46,6 +55,9 @@ Feature: crmsh bootstrap process - options
4655
And Online nodes are "hanode1 hanode2"
4756
And Show cluster status on "hanode1"
4857

58+
When Try "crm cluster init cluster -y" on "hanode1"
59+
Then Expected "Cluster is active, can't run 'cluster' stage" in stderr
60+
4961
@clean
5062
Scenario: Bind specific network interface using "-i" option
5163
Given Cluster service is "stopped" on "hanode1"
@@ -89,6 +101,9 @@ Feature: crmsh bootstrap process - options
89101
And IP "@hanode2.ip.default" is used by corosync on "hanode2"
90102
And IP "@hanode2.ip.0" is used by corosync on "hanode2"
91103

104+
When Try "crm cluster join cluster -c hanode1 -y" on "hanode2"
105+
Then Expected "Cluster is active, can't run 'cluster' stage" in stderr
106+
92107
@clean
93108
Scenario: Using "-i" option with IP address
94109
Given Cluster service is "stopped" on "hanode1"

test/features/qdevice_validate.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Feature: corosync qdevice/qnetd options validate
110110
Scenario: Run qdevice stage on inactive cluster node
111111
Given Cluster service is "stopped" on "hanode1"
112112
When Try "crm cluster init qdevice --qnetd-hostname=qnetd-node"
113-
Then Except "ERROR: cluster.init: Cluster is inactive - can't run qdevice stage"
113+
Then Except "ERROR: cluster.init: Cluster is inactive, can't run 'qdevice' stage"
114114

115115
@clean
116116
Scenario: Run qdevice stage but miss "--qnetd-hostname" option

0 commit comments

Comments
 (0)