tests/bootkube: fix destruction test reboot loop
@@ -17,12 +17,9 @@ func bootkubeDestruction(c cluster.TestCluster) error {
return err
}
- // run destruction test 3 times to avoid false positives
- for i := 0; i < 3; i++ {
if err := masterRestart(bc); err != nil {
return fmt.Errorf("masterRestart: %s", err)
}
- }
// TODO: add more destructive tests. Also test that workloads started
// before any destruction test are still working after the destruction
@@ -33,6 +30,8 @@ func bootkubeDestruction(c cluster.TestCluster) error {
// Restart master node and run nginxCheck
func masterRestart(c *pluton.Cluster) error {
+ // reboot and wait for api to come up 3 times to avoid false positives
+ for i := 0; i < 3; i++ {
if err := platform.Reboot(c.Masters[0]); err != nil {
return err
}
@@ -46,6 +45,7 @@ func masterRestart(c *pluton.Cluster) error {
if err := c.NodeCheck(25); err != nil {
return fmt.Errorf("nodeCheck: %s", err)
}
+ }
if err := nginxCheck(c); err != nil {
return fmt.Errorf("nginxCheck: %s", err)
