Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests) #936

Merged
merged 3 commits into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chart/jenkins-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugins/base_plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions test/bats/2-deploy-with-more-options.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down
6 changes: 3 additions & 3 deletions test/helm/helm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
}
)

Expand Down Expand Up @@ -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() {
Expand Down
Loading