chore(CI): Fix potentially flaky tests

This commit is contained in:
Armel Soro
2024-06-28 14:41:47 +02:00
parent 92e02c5407
commit 85926ff88a
3 changed files with 7 additions and 4 deletions

View File

@@ -460,6 +460,7 @@ var _ = Describe("odo dev debug command tests", func() {
for _, podman := range []bool{false, true} {
podman := podman
When("starting with Devfile with autoBuild or deployByDefault components",
Label(helper.LabelSkipOnOpenShift), // No need to repeat this test on OCP, as it is already covered on vanilla K8s
helper.LabelPodmanIf(podman, func() {
BeforeEach(func() {
helper.CopyExample(filepath.Join("source", "nodejs"), commonVar.Context)

View File

@@ -286,9 +286,8 @@ ComponentSettings:
Expect(td.Properties.CmdProperties[segment.Platform]).To(Equal("openshift"))
}
serverVersion := commonVar.CliRunner.GetVersion()
if serverVersion == "" {
Expect(td.Properties.CmdProperties[segment.PlatformVersion]).To(BeNil())
} else {
// Result may or may not be empty, because sometimes `oc version` may not return the OpenShift Server version
if serverVersion != "" {
Expect(td.Properties.CmdProperties[segment.PlatformVersion]).To(ContainSubstring(serverVersion))
}
})