Skip to content

Commit

Permalink
fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
nihussmann committed Sep 23, 2024
1 parent a5d2fb3 commit ee4d1c7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/com/cloudogu/gitopsbuildlib/DeployViaGitopsTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class DeployViaGitopsTest extends BasePipelineTest {
validators : [
kubeval : [
validator: new Kubeval(deployViaGitops),
enabled : true,
enabled : false,
config : [
// We use the helm image (that also contains kubeval plugin) to speed up builds by allowing to reuse image
image : 'ghcr.io/cloudogu/helm:3.15.4-1',
Expand All @@ -68,7 +68,7 @@ class DeployViaGitopsTest extends BasePipelineTest {
],
yamllint: [
validator: new Yamllint(deployViaGitops),
enabled : true,
enabled : false,
config : [
image : 'cytopia/yamllint:1.25-0.9',
// Default to relaxed profile because it's feasible for mere mortalYAML programmers.
Expand Down Expand Up @@ -234,6 +234,9 @@ spec:
validators: [
kubeval: [
enabled: true
],
yamllint: [
enabled: true
]
]
])
Expand All @@ -244,8 +247,7 @@ spec:

deployViaGitops.metaClass.validateConfig = { Map actualGitOpsConfig ->
assertThat(actualGitOpsConfig.validators.myVali.config.a).isEqualTo('b')
assertThat(actualGitOpsConfig.validators.yamllint.enabled).isEqualTo(true)
assertThat(actualGitOpsConfig.validators.yamllint.enabled).isEqualTo(true)
assertThat(actualGitOpsConfig.validators.myVali.enabled).isEqualTo(true)
}
deployViaGitops.metaClass.deploy = {Map actualGitOpsConfig ->} // Stop after validation

Expand Down

0 comments on commit ee4d1c7

Please sign in to comment.