e2e: Add early return in Context() for disabled tests

Some parts of the Context() seem to get executed, even when BeforeEach()
did a Skip() for the test. By adding a return inside the Context(), the
tests should not get executed at all.

This was noticed in a failed test, where upgrade was running, eventhough
the job was executed as a nornal non-upgrade one.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos
2022-04-19 11:25:54 +02:00
committed by mergify[bot]
parent ef1d589caa
commit 701b5d7ecb
4 changed files with 16 additions and 0 deletions

View File

@ -162,6 +162,10 @@ var _ = Describe("CephFS Upgrade Testing", func() {
})
Context("Cephfs Upgrade Test", func() {
if !upgradeTesting || !testCephFS {
return
}
It("Cephfs Upgrade Test", func() {
By("checking provisioner deployment is running", func() {
err = waitForDeploymentComplete(f.ClientSet, cephFSDeploymentName, cephCSINamespace, deployTimeout)