Skip to content

OCPBUGS-57385: Add time for each test operation #29927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test/extended/baremetal/high_availability.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
g "github.com/onsi/ginkgo/v2"
o "github.com/onsi/gomega"
exutil "github.com/openshift/origin/test/extended/util"
"github.com/sirupsen/logrus"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down Expand Up @@ -54,6 +55,7 @@ var _ = g.Describe("[sig-installer][Feature:baremetal][Serial] Baremetal platfor
g.By("delete cluster baremetal operator")
err = c.AppsV1().Deployments(baremetalNamespace).Delete(context.Background(), clusterBaremetalOperator, v1.DeleteOptions{})
o.Expect(err).NotTo(o.HaveOccurred())
logrus.Infof("Event - delete CBO")

g.By("wait until cluster baremetal operator is deleted")
err = wait.PollImmediate(deleteInterval, deleteWaitTimeout, func() (bool, error) {
Expand All @@ -70,6 +72,7 @@ var _ = g.Describe("[sig-installer][Feature:baremetal][Serial] Baremetal platfor
return false, nil
})
o.Expect(err).NotTo(o.HaveOccurred())
logrus.Infof("Event - wait until CBO is deleted")

g.By("wait until cluster baremetal operator returns back healthy")
err = wait.Poll(restartInterval, restartWaitTimeout, func() (bool, error) {
Expand Down Expand Up @@ -100,10 +103,12 @@ var _ = g.Describe("[sig-installer][Feature:baremetal][Serial] Baremetal platfor
return true, nil
})
o.Expect(err).NotTo(o.HaveOccurred())
logrus.Infof("Event - wait until CBO returns back healthy")

g.By("delete metal3 deployment")
err = c.AppsV1().Deployments(baremetalNamespace).Delete(context.Background(), metal3Deployment, v1.DeleteOptions{})
o.Expect(err).NotTo(o.HaveOccurred())
logrus.Infof("Event - delete Metal3 Deployment")

g.By("wait until metal3 deployment is deleted")
err = wait.PollImmediate(deleteInterval, deleteWaitTimeout, func() (bool, error) {
Expand All @@ -120,6 +125,7 @@ var _ = g.Describe("[sig-installer][Feature:baremetal][Serial] Baremetal platfor
return false, nil
})
o.Expect(err).NotTo(o.HaveOccurred())
logrus.Infof("Event - wait until Metal3 Deployment is deleted")

g.By("wait until metal3 deployment returns back healthy")
err = wait.Poll(restartInterval, restartWaitTimeout, func() (bool, error) {
Expand All @@ -140,9 +146,12 @@ var _ = g.Describe("[sig-installer][Feature:baremetal][Serial] Baremetal platfor
return true, nil
})
o.Expect(err).NotTo(o.HaveOccurred())
logrus.Infof("Event - wait until Metal3 Deployment returns back healthy")

g.By("verify that baremetal hosts are healthy and correct state")
checkMetal3DeploymentHealthy(oc)
e2e.Logf("Phase: verify that baremetal hosts are healthy and correct state took %s\n", time.Since(start7))
logrus.Infof("Event - Verified that baremetal hosts are healthy and in correct state")
})
})

Expand Down