mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
Disable service binding related integration tests (#6920)
* check SKIP_SERVICE_BINDING_TESTS to skip service binding tests * Pass SKIP_SERVICE_BINDING_TESTS to Windows for Windows tests * Use fsGroup on Kubernetes * add instructions to install devfile registry in cluster
This commit is contained in:
55
tests/examples/source/devfiles/nodejs/devfile-fsgroup.yaml
Normal file
55
tests/examples/source/devfiles/nodejs/devfile-fsgroup.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
schemaVersion: 2.0.0
|
||||
metadata:
|
||||
name: nodejs
|
||||
projectType: nodejs
|
||||
language: nodejs
|
||||
starterProjects:
|
||||
- name: nodejs-starter
|
||||
git:
|
||||
remotes:
|
||||
origin: "https://github.com/odo-devfiles/nodejs-ex.git"
|
||||
components:
|
||||
- name: runtime
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi8/nodejs-12:1-36
|
||||
memoryLimit: 1024Mi
|
||||
endpoints:
|
||||
- name: "3000-tcp"
|
||||
targetPort: 3000
|
||||
mountSources: true
|
||||
attributes:
|
||||
pod-overrides:
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 2000
|
||||
commands:
|
||||
- id: devbuild
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm install
|
||||
workingDir: ${PROJECTS_ROOT}
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
- id: build
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm install
|
||||
workingDir: ${PROJECTS_ROOT}
|
||||
group:
|
||||
kind: build
|
||||
- id: devrun
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm start
|
||||
workingDir: ${PROJECTS_ROOT}
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: run
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm start
|
||||
workingDir: ${PROJECTS_ROOT}
|
||||
group:
|
||||
kind: run
|
||||
@@ -2,6 +2,7 @@ package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
@@ -20,6 +21,11 @@ var _ = Describe("odo add binding command tests", func() {
|
||||
var err error
|
||||
|
||||
var _ = BeforeEach(func() {
|
||||
skipLogin := os.Getenv("SKIP_SERVICE_BINDING_TESTS")
|
||||
if skipLogin == "true" {
|
||||
Skip("Skipping service binding tests as SKIP_SERVICE_BINDING_TESTS is true")
|
||||
}
|
||||
|
||||
commonVar = helper.CommonBeforeEach()
|
||||
helper.Chdir(commonVar.Context)
|
||||
// Ensure that the operators are installed
|
||||
|
||||
@@ -17,6 +17,11 @@ var _ = Describe("odo describe/list binding command tests", func() {
|
||||
|
||||
// This is run before every Spec (It)
|
||||
var _ = BeforeEach(func() {
|
||||
skipLogin := os.Getenv("SKIP_SERVICE_BINDING_TESTS")
|
||||
if skipLogin == "true" {
|
||||
Skip("Skipping service binding tests as SKIP_SERVICE_BINDING_TESTS is true")
|
||||
}
|
||||
|
||||
commonVar = helper.CommonBeforeEach()
|
||||
helper.Chdir(commonVar.Context)
|
||||
})
|
||||
|
||||
@@ -71,7 +71,11 @@ var _ = Describe("odo dev command tests", func() {
|
||||
When("a component is bootstrapped", func() {
|
||||
BeforeEach(func() {
|
||||
helper.CopyExample(filepath.Join("source", "devfiles", "nodejs", "project"), commonVar.Context)
|
||||
helper.Cmd("odo", "init", "--name", cmpName, "--devfile-path", helper.GetExamplePath("source", "devfiles", "nodejs", "devfile.yaml")).ShouldPass()
|
||||
devfile := "devfile.yaml"
|
||||
if os.Getenv("KUBERNETES") == "true" {
|
||||
devfile = "devfile-fsgroup.yaml"
|
||||
}
|
||||
helper.Cmd("odo", "init", "--name", cmpName, "--devfile-path", helper.GetExamplePath("source", "devfiles", "nodejs", devfile)).ShouldPass()
|
||||
Expect(helper.VerifyFileExists(".odo/env/env.yaml")).To(BeFalse())
|
||||
})
|
||||
|
||||
@@ -1786,6 +1790,11 @@ ComponentSettings:
|
||||
|
||||
When("Starting a PostgreSQL service", func() {
|
||||
BeforeEach(func() {
|
||||
skipLogin := os.Getenv("SKIP_SERVICE_BINDING_TESTS")
|
||||
if skipLogin == "true" {
|
||||
Skip("Skipping service binding tests as SKIP_SERVICE_BINDING_TESTS is true")
|
||||
}
|
||||
|
||||
// Ensure that the operators are installed
|
||||
commonVar.CliRunner.EnsureOperatorIsInstalled("service-binding-operator")
|
||||
commonVar.CliRunner.EnsureOperatorIsInstalled("cloud-native-postgresql")
|
||||
|
||||
@@ -385,6 +385,11 @@ ComponentSettings:
|
||||
When("deploying a ServiceBinding k8s resource", func() {
|
||||
const serviceBindingName = "my-nodejs-app-cluster-sample" // hard-coded from devfile-deploy-with-SB.yaml
|
||||
BeforeEach(func() {
|
||||
skipLogin := os.Getenv("SKIP_SERVICE_BINDING_TESTS")
|
||||
if skipLogin == "true" {
|
||||
Skip("Skipping service binding tests as SKIP_SERVICE_BINDING_TESTS is true")
|
||||
}
|
||||
|
||||
commonVar.CliRunner.EnsureOperatorIsInstalled("service-binding-operator")
|
||||
commonVar.CliRunner.EnsureOperatorIsInstalled("cloud-native-postgresql")
|
||||
Eventually(func() string {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
"github.com/redhat-developer/odo/tests/helper"
|
||||
@@ -12,6 +14,11 @@ var _ = Describe("odo list services tests", func() {
|
||||
var randomProject string
|
||||
|
||||
BeforeEach(func() {
|
||||
skipLogin := os.Getenv("SKIP_SERVICE_BINDING_TESTS")
|
||||
if skipLogin == "true" {
|
||||
Skip("Skipping service binding tests as SKIP_SERVICE_BINDING_TESTS is true")
|
||||
}
|
||||
|
||||
commonVar = helper.CommonBeforeEach()
|
||||
|
||||
// Ensure that the operators are installed
|
||||
|
||||
@@ -2,6 +2,7 @@ package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
@@ -14,6 +15,11 @@ var _ = Describe("odo remove binding command tests", func() {
|
||||
var commonVar helper.CommonVar
|
||||
|
||||
var _ = BeforeEach(func() {
|
||||
skipLogin := os.Getenv("SKIP_SERVICE_BINDING_TESTS")
|
||||
if skipLogin == "true" {
|
||||
Skip("Skipping service binding tests as SKIP_SERVICE_BINDING_TESTS is true")
|
||||
}
|
||||
|
||||
commonVar = helper.CommonBeforeEach()
|
||||
helper.Chdir(commonVar.Context)
|
||||
// Note: We do not add any operators here because `odo remove binding` is simply about removing the ServiceBinding from devfile.
|
||||
|
||||
@@ -20,6 +20,11 @@ var _ = Describe("odo add binding interactive command tests", func() {
|
||||
|
||||
// This is run before every Spec (It)
|
||||
var _ = BeforeEach(func() {
|
||||
skipLogin := os.Getenv("SKIP_SERVICE_BINDING_TESTS")
|
||||
if skipLogin == "true" {
|
||||
Skip("Skipping service binding tests as SKIP_SERVICE_BINDING_TESTS is true")
|
||||
}
|
||||
|
||||
commonVar = helper.CommonBeforeEach()
|
||||
helper.Chdir(commonVar.Context)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user