diff --git a/Makefile b/Makefile index e997c5723..22846c43d 100644 --- a/Makefile +++ b/Makefile @@ -197,7 +197,7 @@ ifeq ($(KUBERNETES_PROVIDER),minikube) endif endif - @RUNNING_TESTS=1 go test -parallel=1 "./test/e2e/" -tags "$(BUILDTAGS) cgo" -v -timeout 45m -run "$(E2E_TEST_SELECTOR)" \ + @RUNNING_TESTS=1 go test -parallel=1 "./test/e2e/" -tags "$(BUILDTAGS) cgo" -v -timeout 60m -run "$(E2E_TEST_SELECTOR)" \ -root=$(CURRENT_DIRECTORY) -kubeconfig=$(HOME)/.kube/config -globalMan deploy/crds/jenkins_$(API_VERSION)_jenkins_crd.yaml \ -namespacedMan deploy/namespace-init.yaml $(TEST_ARGS) diff --git a/test/e2e/configuration_test.go b/test/e2e/configuration_test.go index 184a3dd8b..8bc9cbcc0 100644 --- a/test/e2e/configuration_test.go +++ b/test/e2e/configuration_test.go @@ -142,7 +142,10 @@ func TestPlugins(t *testing.T) { assert.True(t, build.IsGood()) } -func TestPriorityClassNameSetExisting(t *testing.T) { +func TestPriorityClass(t *testing.T) { + if skipTestPriorityClass { + t.Skip() + } t.Parallel() namespace, ctx := setupTest(t) defer showLogsAndCleanup(t, ctx) diff --git a/test/e2e/mode_kubernetes.go b/test/e2e/mode_kubernetes.go index d2c27c796..f17f07304 100644 --- a/test/e2e/mode_kubernetes.go +++ b/test/e2e/mode_kubernetes.go @@ -9,7 +9,10 @@ import ( "github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2" ) -const skipTestSafeRestart = false +const ( + skipTestSafeRestart = false + skipTestPriorityClass = false +) func updateJenkinsCR(t *testing.T, jenkins *v1alpha2.Jenkins) { t.Log("Update Jenkins CR") diff --git a/test/e2e/mode_openshift.go b/test/e2e/mode_openshift.go index 5b52723d4..112151207 100644 --- a/test/e2e/mode_openshift.go +++ b/test/e2e/mode_openshift.go @@ -11,7 +11,10 @@ import ( corev1 "k8s.io/api/core/v1" ) -const skipTestSafeRestart = false +const ( + skipTestSafeRestart = false + skipTestPriorityClass = true +) func updateJenkinsCR(t *testing.T, jenkins *v1alpha2.Jenkins) { t.Log("Update Jenkins CR: OpenShift") @@ -32,4 +35,8 @@ func updateJenkinsCR(t *testing.T, jenkins *v1alpha2.Jenkins) { Value: resources.GetJenkinsSlavesServiceName(jenkins), }, ) + + if len(jenkins.Spec.Master.Plugins) == 4 && jenkins.Spec.Master.Plugins[3].Name == "devoptics" { + jenkins.Spec.Master.Plugins = jenkins.Spec.Master.Plugins[0:3] // remove devoptics plugin + } } diff --git a/test/e2e/mode_openshift_oauth.go b/test/e2e/mode_openshift_oauth.go index 5c6881297..9019853cb 100644 --- a/test/e2e/mode_openshift_oauth.go +++ b/test/e2e/mode_openshift_oauth.go @@ -16,7 +16,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -const skipTestSafeRestart = true +const ( + skipTestSafeRestart = true + skipTestPriorityClass = true +) func updateJenkinsCR(t *testing.T, jenkins *v1alpha2.Jenkins) { t.Log("Update Jenkins CR: OpenShiftOAuth") @@ -92,4 +95,8 @@ func updateJenkinsCR(t *testing.T, jenkins *v1alpha2.Jenkins) { Value: resources.GetJenkinsSlavesServiceName(jenkins), }, ) + + if len(jenkins.Spec.Master.Plugins) == 4 && jenkins.Spec.Master.Plugins[3].Name == "devoptics" { + jenkins.Spec.Master.Plugins = jenkins.Spec.Master.Plugins[0:3] // remove devoptics plugin + } }