🐛 Bail out when no packages are found with default solvers (#296)

* 🐛 Bail out when no packages are found with default solvers

Checking packages is more tricky when a resolver is set. Resolvers
are capable of mutating the user request and remove part of the
constraints in order to resolve a specific solution.

This had the countereffect on a normal solver to not detect correctly
packages when missing from the wanted set and not proposed during
installation.

This should fix all the cases above taking into consideration of
resolvers and adding specific test-cases for it.

* ⚙️ Pin to tag for test image
This commit is contained in:
Ettore Di Giacinto
2022-05-24 23:01:56 +02:00
committed by GitHub
parent b5da2fa7b4
commit 1006be9271
7 changed files with 99 additions and 18 deletions

View File

@@ -53,17 +53,18 @@ var _ = Describe("Delta", func() {
var img, img2 v1.Image
var err error
ref, _ = name.ParseReference("alpine")
ref2, _ = name.ParseReference("golang:alpine")
img, _ = daemon.Image(ref)
img2, _ = daemon.Image(ref2)
BeforeEach(func() {
ctx = context.NewContext()
ctx.Config.General.Debug = true
tmpfile, err = ioutil.TempFile("", "delta")
Expect(err).ToNot(HaveOccurred())
defer os.RemoveAll(tmpfile.Name()) // clean up
ref, _ = name.ParseReference("alpine")
ref2, _ = name.ParseReference("golang:1.16-alpine3.14")
img, _ = daemon.Image(ref)
img2, _ = daemon.Image(ref2)
})
It("Extract all deltas", func() {