Skip to content

Commit

Permalink
Remove SBOM test
Browse files Browse the repository at this point in the history
The SBOM focused test is no longer needed because the SBOM is no longer
injected into the container image. This was removed in a separate PR in
the buildah task.

JIRA: ISV-5411

Signed-off-by: Ales Raszka <[email protected]>
  • Loading branch information
Allda committed Nov 26, 2024
1 parent d01df85 commit b9b21aa
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 132 deletions.
90 changes: 0 additions & 90 deletions pkg/utils/build/sbom.go

This file was deleted.

29 changes: 0 additions & 29 deletions tests/build/build_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,35 +597,6 @@ var _ = framework.BuildSuiteDescribe("Build templates E2E test", Label("build",
ContainElements(tekton.MatchTaskRunResultWithJSONPathValue(constants.TektonTaskTestOutputName, "{$.result}", `["SUCCESS"]`)),
)
})
It("contains non-empty sbom files", Label(buildTemplatesTestLabel), func() {
purl, cyclonedx, err := build.GetParsedSbomFilesContentFromImage(imageWithDigest)
Expect(err).NotTo(HaveOccurred())

Expect(cyclonedx.BomFormat).To(Equal("CycloneDX"))
Expect(cyclonedx.SpecVersion).ToNot(BeEmpty())
Expect(cyclonedx.Version).ToNot(BeZero())
if !strings.Contains(scenario.GitURL, "from-scratch") {
Expect(cyclonedx.Components).ToNot(BeEmpty())

numberOfLibraryComponents := 0
for _, component := range cyclonedx.Components {
Expect(component.Name).ToNot(BeEmpty())
Expect(component.Type).ToNot(BeEmpty())

if component.Type == "library" || component.Type == "application" {
Expect(component.Purl).ToNot(BeEmpty())
numberOfLibraryComponents++
}
}

Expect(purl.ImageContents.Dependencies).ToNot(BeEmpty())
Expect(purl.ImageContents.Dependencies).To(HaveLen(numberOfLibraryComponents))

for _, dependency := range purl.ImageContents.Dependencies {
Expect(dependency.Purl).ToNot(BeEmpty())
}
}
})
})

Context("build-definitions ec pipelines", Label(buildTemplatesTestLabel), func() {
Expand Down
14 changes: 1 addition & 13 deletions tests/konflux-demo/konflux-demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,19 +265,7 @@ var _ = framework.KonfluxDemoSuiteDescribe(Label(devEnvTestLabel), func() {
})

When("Build PipelineRun completes successfully", func() {
It("should be possible to download the SBOM file", func() {
var outputImage string
for _, p := range pipelineRun.Spec.Params {
if p.Name == "output-image" {
outputImage = p.Value.StringVal
}
}
Expect(outputImage).ToNot(BeEmpty(), "output image of a component could not be found")

_, _, err = build.GetParsedSbomFilesContentFromImage(outputImage)
Expect(err).NotTo(HaveOccurred())
})


It("should validate Tekton TaskRun test results successfully", func() {
pipelineRun, err = fw.AsKubeAdmin.HasController.GetComponentPipelineRun(component.GetName(), appSpec.ApplicationName, fw.UserNamespace, headSHA)
Expect(err).ShouldNot(HaveOccurred())
Expand Down

0 comments on commit b9b21aa

Please sign in to comment.