Skip to content

Commit

Permalink
Dev: behave: adjust test cases for podman network config (#1572)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasyang2022 committed Oct 17, 2024
1 parent b74cd9f commit c159dc9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions test/features/bootstrap_bugs.feature
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ Feature: Regression test for bootstrap bugs
When Run "crm cluster join -c hanode1 -i eth1 -y" on "hanode2"
Then Cluster service is "started" on "hanode2"
When Run "crm corosync get nodelist.node.ring0_addr" on "hanode1"
Then Expected "@hanode2.ip.0" in stdout
Then Expected "@hanode2.ip.1" in stdout
#And Service "hawk.service" is "started" on "hanode2"
When Run "crm cluster remove hanode2 -y" on "hanode1"
Then Online nodes are "hanode1"
And Cluster service is "stopped" on "hanode2"
# verify bsc#1175708
#And Service "hawk.service" is "stopped" on "hanode2"
When Run "crm corosync get nodelist.node.ring0_addr" on "hanode1"
Then Expected "@hanode2.ip.0" not in stdout
Then Expected "@hanode2.ip.1" not in stdout

@clean
Scenario: Multi nodes join in parallel(bsc#1175976)
Expand Down
26 changes: 13 additions & 13 deletions test/features/bootstrap_options.feature
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ Feature: crmsh bootstrap process - options
@clean
Scenario: Bind specific network interface using "-i" option
Given Cluster service is "stopped" on "hanode1"
And IP "@hanode1.ip.0" is belong to "eth1"
And IP "@hanode1.ip.1" is belong to "eth1"
When Run "crm cluster init -i eth1 -y" on "hanode1"
Then Cluster service is "started" on "hanode1"
And IP "@hanode1.ip.0" is used by corosync on "hanode1"
And IP "@hanode1.ip.1" is used by corosync on "hanode1"
And Show corosync ring status

@clean
Expand All @@ -84,25 +84,25 @@ Feature: crmsh bootstrap process - options
Scenario: Using multiple network interface using "-i" option
Given Cluster service is "stopped" on "hanode1"
And IP "@hanode1.ip.0" is belong to "eth0"
And IP "@hanode1.ip.0" is belong to "eth1"
And IP "@hanode1.ip.1" is belong to "eth1"
When Run "crm cluster init -i eth0 -i eth1 -y" on "hanode1"
Then Cluster service is "started" on "hanode1"
And IP "@hanode1.ip.0" is used by corosync on "hanode1"
And IP "@hanode1.ip.0" is used by corosync on "hanode1"
And IP "@hanode1.ip.1" is used by corosync on "hanode1"
And Show corosync ring status

@clean
Scenario: Using "-i" option, mixing with IP and NIC name
Given Cluster service is "stopped" on "hanode1"
Given Cluster service is "stopped" on "hanode2"
When Run "crm cluster init -i eth0 -i @hanode1.ip.0 -y" on "hanode1"
When Run "crm cluster init -i eth0 -i @hanode1.ip.1 -y" on "hanode1"
Then Cluster service is "started" on "hanode1"
And IP "@hanode1.ip.0" is used by corosync on "hanode1"
And IP "@hanode1.ip.0" is used by corosync on "hanode1"
When Run "crm cluster join -c hanode1 -i eth0 -i @hanode2.ip.0 -y" on "hanode2"
And IP "@hanode1.ip.1" is used by corosync on "hanode1"
When Run "crm cluster join -c hanode1 -i eth0 -i @hanode2.ip.1 -y" on "hanode2"
Then Cluster service is "started" on "hanode2"
And IP "@hanode2.ip.0" is used by corosync on "hanode2"
And IP "@hanode2.ip.0" is used by corosync on "hanode2"
And IP "@hanode2.ip.1" is used by corosync on "hanode2"

When Try "crm cluster join cluster -c hanode1 -y" on "hanode2"
Then Expected "Cluster is active, can't run 'cluster' stage" in stderr
Expand Down Expand Up @@ -136,19 +136,19 @@ Feature: crmsh bootstrap process - options
@clean
Scenario: Detect multi IP in the same NIC
Given Cluster service is "stopped" on "hanode1"
When Try "crm cluster init -i eth1 -i @hanode1.ip.0 -y"
When Try "crm cluster init -i eth0 -i @hanode1.ip.0 -y"
Then Except "ERROR: cluster.init: Invalid input '@hanode1.ip.0': the IP in the same NIC already used"
When Try "crm cluster init -i @hanode1.ip.0 -i eth1 -y"
Then Except "ERROR: cluster.init: Invalid input 'eth1': The same NIC already used"
When Try "crm cluster init -i @hanode1.ip.0 -i eth0 -y"
Then Except "ERROR: cluster.init: Invalid input 'eth0': The same NIC already used"

@clean
Scenario: Init cluster service with ipv6 using "-I" option
Given Cluster service is "stopped" on "hanode1"
Given Cluster service is "stopped" on "hanode2"
When Run "crm cluster init -I -i eth1 -y" on "hanode1"
When Run "crm cluster init -I -i eth0 -y" on "hanode1"
Then Cluster service is "started" on "hanode1"
And IP "@hanode1.ip6.0" is used by corosync on "hanode1"
When Run "crm cluster join -c hanode1 -i eth1 -y" on "hanode2"
When Run "crm cluster join -c hanode1 -i eth0 -y" on "hanode2"
Then Cluster service is "started" on "hanode2"
And IP "@hanode2.ip6.0" is used by corosync on "hanode2"

Expand Down

0 comments on commit c159dc9

Please sign in to comment.