Skip to content

Commit

Permalink
changes after the PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
medmes committed Dec 3, 2024
1 parent 049e035 commit b144f9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions internal/service/templategenerator/templategenerator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ func TestGenerateModuleTemplateWithMandatoryFalse_Success(t *testing.T) {
require.Contains(t, mockFS.writtenTemplate,
"https://github.com/kyma-project/template-operator/releases/download/1.0.1/template-operator.yaml")
require.NotContains(t, mockFS.writtenTemplate, "mandatory-module")
require.Contains(t, mockFS.writtenTemplate, "mandatory: false")
require.NotContains(t, mockFS.writtenTemplate,
"\"operator.kyma-project.io/mandatory-module\"")
}

type mockFileSystem struct {
Expand Down
5 changes: 4 additions & 1 deletion tests/e2e/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,11 @@ var _ = Describe("Test 'create' command", Ordered, func() {
Expect(github.Type).To(Equal(githubAccessSpec.Type))
Expect(githubAccessSpec.RepoURL).To(Equal("https://github.com/kyma-project/template-operator"))

By("And spec.mandatory should be false")
By("And module template should not marked as mandatory")
Expect(template.Spec.Mandatory).To(BeFalse())
val, ok := template.Labels[shared.IsMandatoryModule]
Expect(val).To(BeEmpty())
Expect(ok).To(BeFalse())

By("And security scan labels should be correct")
secScanLabels := flatten(descriptor.Sources[0].Labels)
Expand Down

0 comments on commit b144f9b

Please sign in to comment.