Skip to content

Commit

Permalink
Skip DevfileRegistriesList-related tests on non Kubernetes clusters (#…
Browse files Browse the repository at this point in the history
…6640)

On Prow, users might not have the permission to install the CRDs.
It is actually fine to execute these tests only on Kubernetes.
  • Loading branch information
rm3l authored Mar 7, 2023
1 parent f001676 commit b3bc7c4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/integration/cmd_devfile_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,9 @@ var _ = Describe("odo devfile init command tests", func() {

When("DevfileRegistriesList CRD is installed on cluster", func() {
BeforeEach(func() {
if !helper.IsKubernetesCluster() {
Skip("skipped on non Kubernetes clusters")
}
devfileRegistriesLists := commonVar.CliRunner.Run("apply", "-f", helper.GetExamplePath("manifests", "devfileregistrieslists.yaml"))
Expect(devfileRegistriesLists.ExitCode()).To(BeEquivalentTo(0))
})
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/cmd_devfile_registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ var _ = Describe("odo devfile registry command tests", func() {

When("DevfileRegistriesList CRD is installed on cluster", func() {
BeforeEach(func() {
if !helper.IsKubernetesCluster() {
Skip("skipped on non Kubernetes clusters")
}
// install CRDs for devfile registry
devfileRegistriesLists := commonVar.CliRunner.Run("apply", "-f", helper.GetExamplePath("manifests", "devfileregistrieslists.yaml"))
Expect(devfileRegistriesLists.ExitCode()).To(BeEquivalentTo(0))
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/cmd_pref_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ OdoSettings:
}
When("DevfileRegistriesList CRD is installed on cluster", func() {
BeforeEach(func() {
if !helper.IsKubernetesCluster() {
Skip("skipped on non Kubernetes clusters")
}
// install CRDs for devfile registry
//TODO: install clusterRegestryList from scripts
// clusterRegistryList := commonVar.CliRunner.Run("apply", "-f", helper.GetExamplePath("manifests", "clusterdevfileregistrieslists.yaml"))
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/interactive_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ var _ = Describe("odo init interactive command tests", func() {

When("DevfileRegistriesList CRD is installed on cluster", func() {
BeforeEach(func() {
if !helper.IsKubernetesCluster() {
Skip("skipped on non Kubernetes clusters")
}
devfileRegistriesLists := commonVar.CliRunner.Run("apply", "-f", helper.GetExamplePath("manifests", "devfileregistrieslists.yaml"))
Expect(devfileRegistriesLists.ExitCode()).To(BeEquivalentTo(0))
})
Expand Down

0 comments on commit b3bc7c4

Please sign in to comment.