зеркало из https://github.com/Azure/ARO-RP.git
for now, make e2es tolerant to kubernetes api blips
This commit is contained in:
Родитель
2932d411a6
Коммит
aa21d7a718
|
@ -71,13 +71,13 @@ var _ = Describe("[Admin API] Kubernetes objects action", func() {
|
|||
By("waiting for the test customer namespace to be deleted")
|
||||
err = wait.PollImmediate(10*time.Second, 5*time.Minute, func() (bool, error) {
|
||||
_, err := clients.Kubernetes.CoreV1().Namespaces().Get(context.Background(), namespace, metav1.GetOptions{})
|
||||
if err == nil {
|
||||
return false, nil
|
||||
}
|
||||
if !errors.IsNotFound(err) {
|
||||
return false, err
|
||||
}
|
||||
if errors.IsNotFound(err) {
|
||||
return true, nil
|
||||
}
|
||||
if err != nil {
|
||||
log.Warn(err)
|
||||
}
|
||||
return false, nil // swallow error
|
||||
})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
}()
|
||||
|
@ -244,13 +244,13 @@ func testConfigMapDeleteOK(objName, namespace string) {
|
|||
By("waiting for the configmap to be deleted")
|
||||
err = wait.PollImmediate(10*time.Second, time.Minute, func() (bool, error) {
|
||||
_, err = clients.Kubernetes.CoreV1().ConfigMaps(namespace).Get(context.Background(), objName, metav1.GetOptions{})
|
||||
if err == nil {
|
||||
return false, nil
|
||||
}
|
||||
if !errors.IsNotFound(err) {
|
||||
return false, err
|
||||
}
|
||||
if errors.IsNotFound(err) {
|
||||
return true, nil
|
||||
}
|
||||
if err != nil {
|
||||
log.Warn(err)
|
||||
}
|
||||
return false, nil // swallow error
|
||||
})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
}
|
||||
|
|
|
@ -73,7 +73,8 @@ var _ = Describe("[Admin API] VM redeploy action", func() {
|
|||
err = wait.PollImmediate(10*time.Second, 10*time.Minute, func() (bool, error) {
|
||||
nodes, err := clients.Kubernetes.CoreV1().Nodes().List(context.Background(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
return false, err
|
||||
log.Warn(err)
|
||||
return false, nil // swallow error
|
||||
}
|
||||
|
||||
for _, node := range nodes.Items {
|
||||
|
|
|
@ -104,7 +104,8 @@ var _ = Describe("ARO Operator - Internet checking", func() {
|
|||
err = wait.PollImmediate(10*time.Second, 10*time.Minute, func() (bool, error) {
|
||||
co, err := clients.AROClusters.Clusters().Get(context.Background(), "cluster", metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return false, err
|
||||
log.Warn(err)
|
||||
return false, nil // swallow error
|
||||
}
|
||||
|
||||
log.Debugf("ClusterStatus.Conditions %s", co.Status.Conditions)
|
||||
|
@ -117,7 +118,13 @@ var _ = Describe("ARO Operator - Internet checking", func() {
|
|||
|
||||
var _ = Describe("ARO Operator - Geneva Logging", func() {
|
||||
Specify("genevalogging must be repaired if deployment deleted", func() {
|
||||
mdsdReady := ready.CheckDaemonSetIsReady(context.Background(), clients.Kubernetes.AppsV1().DaemonSets("openshift-azure-logging"), "mdsd")
|
||||
mdsdReady := func() (bool, error) {
|
||||
done, err := ready.CheckDaemonSetIsReady(context.Background(), clients.Kubernetes.AppsV1().DaemonSets("openshift-azure-logging"), "mdsd")()
|
||||
if err != nil {
|
||||
log.Warn(err)
|
||||
}
|
||||
return done, nil // swallow error
|
||||
}
|
||||
|
||||
err := wait.PollImmediate(30*time.Second, 15*time.Minute, mdsdReady)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
@ -149,7 +156,13 @@ var _ = Describe("ARO Operator - Routefix Daemonset", func() {
|
|||
BeforeEach(skipIfNotInDevelopmentEnv)
|
||||
|
||||
Specify("routefix must be repaired if daemonset is deleted", func() {
|
||||
dsReady := ready.CheckDaemonSetIsReady(context.Background(), clients.Kubernetes.AppsV1().DaemonSets("openshift-azure-routefix"), "routefix")
|
||||
dsReady := func() (bool, error) {
|
||||
done, err := ready.CheckDaemonSetIsReady(context.Background(), clients.Kubernetes.AppsV1().DaemonSets("openshift-azure-routefix"), "routefix")()
|
||||
if err != nil {
|
||||
log.Warn(err)
|
||||
}
|
||||
return done, nil // swallow error
|
||||
}
|
||||
|
||||
err := wait.PollImmediate(30*time.Second, 15*time.Minute, dsReady)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
|
|
@ -38,7 +38,8 @@ var _ = Describe("Scale nodes", func() {
|
|||
err = wait.PollImmediate(10*time.Second, 30*time.Minute, func() (bool, error) {
|
||||
nodes, err := clients.Kubernetes.CoreV1().Nodes().List(context.Background(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
return false, err
|
||||
log.Warn(err)
|
||||
return false, nil // swallow error
|
||||
}
|
||||
|
||||
var nodeCount int
|
||||
|
@ -97,7 +98,8 @@ func waitForScale(name string) error {
|
|||
return wait.PollImmediate(10*time.Second, 30*time.Minute, func() (bool, error) {
|
||||
ms, err := clients.MachineAPI.MachineV1beta1().MachineSets("openshift-machine-api").Get(context.Background(), name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return false, err
|
||||
log.Warn(err)
|
||||
return false, nil // swallow error
|
||||
}
|
||||
|
||||
if ms.Spec.Replicas == nil {
|
||||
|
|
Загрузка…
Ссылка в новой задаче