mirror of
https://github.com/jenkinsci/kubernetes-operator.git
synced 2026-09-30 13:15:52 +02:00
fix(tests) (#936)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")),
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user