Skip to content

Commit

Permalink
Merge pull request #1620 from shipwright-io/refactor/image-processing…
Browse files Browse the repository at this point in the history
…-tests

Refactor/simplify test asset directory look-up
  • Loading branch information
openshift-merge-bot[bot] authored Jun 19, 2024
2 parents 5a55672 + 9362315 commit 61ed927
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions cmd/image-processing/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,12 +405,7 @@ var _ = Describe("Image Processing Resource", Ordered, func() {
})

Context("vulnerability scanning", func() {
var directory string
BeforeEach(func() {
cwd, err := os.Getwd()
Expect(err).ToNot(HaveOccurred())
directory = path.Clean(path.Join(cwd, "../..", "test/data/images/vuln-image-in-oci"))
})
directory := path.Join("..", "..", "test", "data", "images", "vuln-image-in-oci")

It("should run vulnerability scanning if it is enabled and output vulnerabilities equal to the limit defined", func() {
vulnOptions := &buildapi.VulnerabilityScanOptions{
Expand Down Expand Up @@ -491,7 +486,6 @@ var _ = Describe("Image Processing Resource", Ordered, func() {

_, err = remote.Get(ref)
Expect(err).To(HaveOccurred())

})
})

Expand Down Expand Up @@ -540,6 +534,5 @@ var _ = Describe("Image Processing Resource", Ordered, func() {
Expect(err).ToNot(HaveOccurred())
})
})

})
})

0 comments on commit 61ed927

Please sign in to comment.