diff --git a/internal/service/templategenerator/templategenerator_test.go b/internal/service/templategenerator/templategenerator_test.go index ea80823..0d6f68e 100644 --- a/internal/service/templategenerator/templategenerator_test.go +++ b/internal/service/templategenerator/templategenerator_test.go @@ -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 { diff --git a/tests/e2e/create/create_test.go b/tests/e2e/create/create_test.go index 553d297..b7f861c 100644 --- a/tests/e2e/create/create_test.go +++ b/tests/e2e/create/create_test.go @@ -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)