From 42734644f2fd0c1c629e08938d54dcce573e4c61 Mon Sep 17 00:00:00 2001 From: Sushanta Das Date: Mon, 4 Mar 2024 13:41:05 +0530 Subject: [PATCH 1/2] show-summary task check --- tests/build/build_templates.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/build/build_templates.go b/tests/build/build_templates.go index 0e69ac069..ae7a3daee 100644 --- a/tests/build/build_templates.go +++ b/tests/build/build_templates.go @@ -230,6 +230,16 @@ var _ = framework.BuildSuiteDescribe("Build templates E2E test", Label("build", Expect(sbom.Components).ToNot(BeEmpty()) }) + It(fmt.Sprintf("should ensure show-summary task ran for component with Git source URL %s", gitUrl), Label(buildTemplatesTestLabel), func() { + pr, err = kubeadminClient.HasController.GetComponentPipelineRun(componentNames[i], applicationName, testNamespace, "") + Expect(err).ShouldNot(HaveOccurred()) + Expect(pr).ToNot(BeNil(), fmt.Sprintf("PipelineRun for the component %s/%s not found", testNamespace, componentNames[i])) + + logs, err := kubeadminClient.TektonController.GetTaskRunLogs(pr.GetName(), "show-summary", testNamespace) + Expect(err).ShouldNot(HaveOccurred()) + Expect(logs).To(HaveLen(1)) + }) + It("check for source images if enabled in pipeline", Label(buildTemplatesTestLabel), func() { isSourceBuildEnabled := build.IsSourceBuildEnabled(pr) From a7b8cabf775e24bbeb25bc2a1b1be36f94e40b05 Mon Sep 17 00:00:00 2001 From: Sushanta Das Date: Mon, 4 Mar 2024 15:13:15 +0530 Subject: [PATCH 2/2] check binary image also --- tests/build/build_templates.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/build/build_templates.go b/tests/build/build_templates.go index ae7a3daee..4f3e4566f 100644 --- a/tests/build/build_templates.go +++ b/tests/build/build_templates.go @@ -238,6 +238,9 @@ var _ = framework.BuildSuiteDescribe("Build templates E2E test", Label("build", logs, err := kubeadminClient.TektonController.GetTaskRunLogs(pr.GetName(), "show-summary", testNamespace) Expect(err).ShouldNot(HaveOccurred()) Expect(logs).To(HaveLen(1)) + buildSummaryLog := logs["step-appstudio-summary"] + binaryImage := build.GetBinaryImage(pr) + Expect(buildSummaryLog).To(ContainSubstring(binaryImage)) }) It("check for source images if enabled in pipeline", Label(buildTemplatesTestLabel), func() {