Skip to content

Commit a13511a

Browse files
committed
Fix E2E tests in e2e_devfile_test.go
Some Devfiles in the default registry defines terminating container components. As such, they cannot be used as is without overriding container entrypoints with Supervisord. In other words, those cases cannot be tested with the `--no-supervisord` flag. Note: We would need to revert this once [1] is merged into devfile/registry. [1] devfile/registry#102
1 parent a0dd3b0 commit a13511a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/e2escenarios/e2e_devfile_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package e2escenarios
22

33
import (
4+
"fmt"
5+
46
"github.com/redhat-developer/odo/tests/helper"
57

68
. "github.com/onsi/ginkgo"
@@ -82,14 +84,34 @@ var _ = Describe("odo devfile supported tests", func() {
8284
// Otherwise, spec nodes would pick the last element off the loop.
8385
opts := o.opts
8486

87+
skipNoSupervisord := func(devfile string) {
88+
var noSupervisord bool
89+
for _, opt := range opts {
90+
if opt == "--no-supervisord" {
91+
noSupervisord = true
92+
break
93+
}
94+
}
95+
96+
if noSupervisord {
97+
Skip(fmt.Sprintf(`%q Devfile in the default registry defines terminating container components.
98+
As such, it cannot be used as is without overriding container entrypoints with Supervisord.
99+
Remove this once the default Devfile registry has been updated accordingly.
100+
See https://github.com/devfile/registry/pull/102
101+
`, devfile))
102+
}
103+
}
104+
85105
Context("odo debug support for devfile components", func() {
86106
It("Verify output debug information for nodeJS debug works", func() {
107+
skipNoSupervisord("nodejs")
87108
createStarterProjAndSetDebug("nodejs", "nodejs-starter", opts...)
88109
})
89110
It("Verify output debug information for java-springboot works", func() {
90111
createStarterProjAndSetDebug("java-springboot", "springbootproject", opts...)
91112
})
92113
It("Verify output debug information for java-quarkus debug works", func() {
114+
skipNoSupervisord("java-quarkus")
93115
createStarterProjAndSetDebug("java-quarkus", "community", opts...)
94116
})
95117
It("Verify output debug information for java-maven debug works", func() {

0 commit comments

Comments
 (0)