Skip to content

Commit

Permalink
test: skip etcd tests on non-HA clusters
Browse files Browse the repository at this point in the history
We can't test much of the flow on single-node clusters.

Fixes #3013

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
  • Loading branch information
smira authored and talos-bot committed Jan 8, 2021
1 parent 529c035 commit 47fb572
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion internal/integration/api/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ func (suite *EtcdSuite) TestEtcdForfeitLeadership() {

nodes := suite.DiscoverNodes().NodesByType(machine.TypeControlPlane)

if len(nodes) < 3 {
suite.T().Skip("test only can be run on HA etcd clusters")
}

var leader string

for _, node := range nodes {
Expand All @@ -80,6 +84,8 @@ func (suite *EtcdSuite) TestEtcdForfeitLeadership() {
}

// TestEtcdLeaveCluster tests removing an etcd member.
//
//nolint: gocyclo
func (suite *EtcdSuite) TestEtcdLeaveCluster() {
if !suite.Capabilities().SupportsReboot {
suite.T().Skip("cluster doesn't support reboot (and reset)")
Expand All @@ -91,7 +97,11 @@ func (suite *EtcdSuite) TestEtcdLeaveCluster() {

nodes := suite.DiscoverNodes().NodesByType(machine.TypeControlPlane)

node := nodes[2]
if len(nodes) < 3 {
suite.T().Skip("test only can be run on HA etcd clusters")
}

node := nodes[len(nodes)-1]

suite.T().Log("Removing etcd member", node)

Expand Down

0 comments on commit 47fb572

Please sign in to comment.