Skip to content

Commit

Permalink
Add regression test for #790
Browse files Browse the repository at this point in the history
verify that k0s returns error when it should

Signed-off-by: Natanael Copa <[email protected]>
  • Loading branch information
ncopa authored and jnummelin committed Mar 29, 2021
1 parent 6310751 commit ff90132
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inttest/hacontrolplane/hacontrolplane_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ func (s *HAControlplaneSuite) makeNodeLeave(executeOnControllerIdx int, peerAddr
}

func (s *HAControlplaneSuite) TestDeregistration() {
// Verify that k0s return failure (https://github.com/k0sproject/k0s/issues/790)
sshC0, err := s.SSH(s.ControllerNode(0))
s.Require().NoError(err)
_, err = sshC0.ExecWithOutput("k0s etcd member-list")
s.Require().Error(err)

s.NoError(s.InitController(0))
token, err := s.GetJoinToken("controller")
s.NoError(err)
Expand Down

0 comments on commit ff90132

Please sign in to comment.