From 8d61604b03b0ea22deec5a2015d3f53e8bfa5842 Mon Sep 17 00:00:00 2001 From: Luigi Operoso <40476330+brokenpip3@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:04:23 +0100 Subject: [PATCH] fix(tests) (#936) --- chart/jenkins-operator/values.yaml | 2 +- pkg/plugins/base_plugins.go | 2 +- test/bats/2-deploy-with-more-options.bats | 2 ++ test/e2e/configuration_test.go | 2 +- test/helm/helm_test.go | 6 +++--- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/chart/jenkins-operator/values.yaml b/chart/jenkins-operator/values.yaml index 28f622dc..995bf272 100644 --- a/chart/jenkins-operator/values.yaml +++ b/chart/jenkins-operator/values.yaml @@ -96,7 +96,7 @@ jenkins: # - name: workflow-aggregator # version: 596.v8c21c963d92d # - name: git - # version: 5.2.0 + # version: 5.2.1 # - name: job-dsl # version: "1.85" # - name: configuration-as-code diff --git a/pkg/plugins/base_plugins.go b/pkg/plugins/base_plugins.go index 6ea8f56f..f22dd2b1 100644 --- a/pkg/plugins/base_plugins.go +++ b/pkg/plugins/base_plugins.go @@ -2,7 +2,7 @@ package plugins const ( configurationAsCodePlugin = "configuration-as-code:1700.v6f448841296e" - gitPlugin = "git:5.2.0" + gitPlugin = "git:5.2.1" jobDslPlugin = "job-dsl:1.85" kubernetesPlugin = "kubernetes:4029.v5712230ccb_f8" kubernetesCredentialsProviderPlugin = "kubernetes-credentials-provider:1.234.vf3013b_35f5b_a" diff --git a/test/bats/2-deploy-with-more-options.bats b/test/bats/2-deploy-with-more-options.bats index a39c9ea0..91d99cc6 100644 --- a/test/bats/2-deploy-with-more-options.bats +++ b/test/bats/2-deploy-with-more-options.bats @@ -5,6 +5,8 @@ setup() { #bats test_tags=phase:helm @test "2.1 Install helm chart with options" { + # The kind storage class provider needs some sec to delete the old pvc + sleep 30 run ${HELM} dependency update chart/jenkins-operator assert_success run ${KUBECTL} label node jenkins-control-plane batstest=yep diff --git a/test/e2e/configuration_test.go b/test/e2e/configuration_test.go index 9e56e188..6de833f7 100644 --- a/test/e2e/configuration_test.go +++ b/test/e2e/configuration_test.go @@ -25,7 +25,7 @@ const e2e = "e2e" var expectedBasePluginsList = []plugins.Plugin{ plugins.Must(plugins.New("configuration-as-code:1700.v6f448841296e")), - plugins.Must(plugins.New("git:5.2.0")), + plugins.Must(plugins.New("git:5.2.1")), plugins.Must(plugins.New("kubernetes:4029.v5712230ccb_f8")), plugins.Must(plugins.New("kubernetes-credentials-provider:1.234.vf3013b_35f5b_a")), plugins.Must(plugins.New("job-dsl:1.85")), diff --git a/test/helm/helm_test.go b/test/helm/helm_test.go index 1b7ad4c0..14685cff 100644 --- a/test/helm/helm_test.go +++ b/test/helm/helm_test.go @@ -77,12 +77,12 @@ var _ = Describe("Jenkins Controller with security validator", func() { invalidPlugins = []v1alpha2.Plugin{ {Name: "simple-theme-plugin", Version: "0.6"}, {Name: "audit-trail", Version: "3.8"}, - {Name: "github", Version: "1.31.0"}, + {Name: "github", Version: "1.36.0"}, } validPlugins = []v1alpha2.Plugin{ {Name: "simple-theme-plugin", Version: "136.v23a_15f86c53d"}, {Name: "audit-trail", Version: "3.11"}, - {Name: "github", Version: "1.36.0"}, + {Name: "github", Version: "1.37.3.1"}, } ) @@ -117,7 +117,7 @@ var _ = Describe("Jenkins Controller with security validator", func() { jenkins := e2e.RenderJenkinsCR(jenkinsCRName, namespace.Name, seedJobs, groovyScripts, casc, "") jenkins.Spec.Master.Plugins = invalidPlugins jenkins.Spec.ValidateSecurityWarnings = true - Expect(e2e.K8sClient.Create(context.TODO(), jenkins)).Should(MatchError("admission webhook \"vjenkins.kb.io\" denied the request: security vulnerabilities detected in the following user-defined plugins: \ngithub:1.31.0")) + Expect(e2e.K8sClient.Create(context.TODO(), jenkins)).Should(MatchError("admission webhook \"vjenkins.kb.io\" denied the request: security vulnerabilities detected in the following user-defined plugins: \ngithub:1.36.0")) }) }) Context("When Jenkins CR doesn't contain plugins with security warnings", func() {