Skip to content

Commit

Permalink
check whether yurt manager's container is ready in e2e (#1631)
Browse files Browse the repository at this point in the history
* modify

* modify

* modify

* modify

* move check to deployYurtManager

* modify

* modify

* modify
  • Loading branch information
vie-serendipity authored Jul 28, 2023
1 parent 4efa1bf commit 237fe8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 9 additions & 4 deletions test/e2e/cmd/init/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,18 @@ func (c *ClusterConverter) deployYurtManager() error {
if podList.Items[0].Status.Phase == corev1.PodRunning {
for i := range podList.Items[0].Status.Conditions {
if podList.Items[0].Status.Conditions[i].Type == corev1.PodReady &&
podList.Items[0].Status.Conditions[i].Status == corev1.ConditionTrue {
return true, nil
podList.Items[0].Status.Conditions[i].Status != corev1.ConditionTrue {
klog.Infof("pod(%s/%s): %#v", podList.Items[0].Namespace, podList.Items[0].Name, podList.Items[0])
return false, nil
}
if podList.Items[0].Status.Conditions[i].Type == corev1.ContainersReady &&
podList.Items[0].Status.Conditions[i].Status != corev1.ConditionTrue {
klog.Info("yurt manager's container is not ready")
return false, nil
}
}
}
klog.Infof("pod(%s/%s): %#v", podList.Items[0].Namespace, podList.Items[0].Name, podList.Items[0])
return false, nil
return true, nil
})
}

Expand Down
1 change: 1 addition & 0 deletions test/e2e/cmd/init/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ func (ki *Initializer) prepareKindConfigFile(kindConfigPath string) error {
}

func (ki *Initializer) configureAddons() error {

if err := ki.configureCoreDnsAddon(); err != nil {
return err
}
Expand Down

0 comments on commit 237fe8f

Please sign in to comment.