diff --git a/test/features/corosync_ui.feature b/test/features/corosync_ui.feature index f63e83103..59d55ace7 100644 --- a/test/features/corosync_ui.feature +++ b/test/features/corosync_ui.feature @@ -1,3 +1,4 @@ +# vim: sw=2 sts=2 @bootstrap Feature: crm corosync ui test cases @@ -8,3 +9,36 @@ Feature: crm corosync ui test cases Then Except "No such file or directory: '/etc/corosync/corosync.conf'" in stderr When Try "crm corosync set totem.cluster_name xin" on "hanode1" Then Except "No such file or directory: '/etc/corosync/corosync.conf'" in stderr + When Try "crm corosync link show" on "hanode1" + Then Except "No such file or directory: '/etc/corosync/corosync.conf'" in stderr + When Try "crm corosync link update 0 hanode1=192.0.2.1" on "hanode1" + Then Except "No such file or directory: '/etc/corosync/corosync.conf'" in stderr + When Try "crm corosync link add hanode1=192.0.2.1" on "hanode1" + Then Except "No such file or directory: '/etc/corosync/corosync.conf'" in stderr + When Try "crm corosync link remove 0" on "hanode1" + Then Except "No such file or directory: '/etc/corosync/corosync.conf'" in stderr + + Scenario: link show/add/update/remove + # background + Given Nodes ["hanode1", "hanode2"] are cleaned up + And Cluster service is "stopped" on "hanode1" + And Cluster service is "stopped" on "hanode2" + When Run "crm cluster init -y" on "hanode1" + Then Cluster service is "started" on "hanode1" + When Run "crm cluster join -c hanode1 -y" on "hanode2" + Then Cluster service is "started" on "hanode2" + And Online nodes are "hanode1 hanode2" + And Cluster is using "knet" transport mode + # tests + When Run "crm corosync link show" on "hanode1" + Then Expected "Node 2: hanode2" in stdout + When Run "crm corosync link add hanode1=192.0.2.100 hanode2=192.0.2.101 options knet_link_priority=10" on "hanode1" + Then Expected "crm corosync diff" in stdout + When Run "crm corosync diff" on "hanode1" + Then Expected "linknumber: 1" in stdout + When Run "crm corosync link update 1 hanode1=192.0.2.102 hanode2=192.0.2.101 options knet_link_priority=11" on "hanode1" + Then Expected "crm corosync diff" in stdout + When Run "crm corosync diff" on "hanode1" + Then Expected "knet_link_priority: 11" in stdout + When Run "crm corosync link remove 1" on "hanode1" + Then Expected "crm corosync diff" in stdout