fix: handle a scratch/busybox/DockerSlim image gracefully (#476)

* fix: handle unknown OS and no package errors

* chore(mod): update dependencies

* integration: add busybox

* update depdendencies and fix tests

Signed-off-by: Simarpreet Singh <simar@linux.com>

* chore(mod): use the latest trivy-db

Co-authored-by: Simarpreet Singh <simar@linux.com>
This commit is contained in:
Teppei Fukuda
2020-04-30 12:48:28 +03:00
committed by GitHub
parent ad0bb7ce23
commit 216a33b4cd
11 changed files with 279 additions and 96 deletions

View File

@@ -226,11 +226,17 @@ func TestRun_WithDockerEngine(t *testing.T) {
expectedOutputFile: "testdata/photon-30.json.golden",
testfile: "testdata/fixtures/photon-30.tar.gz",
},
{
name: "buxybox with Cargo.lock integration",
imageTag: "busy-cargo:latest",
expectedOutputFile: "testdata/busybox-with-lockfile.json.golden",
testfile: "testdata/fixtures/busybox-with-lockfile.tar.gz",
},
{
name: "sad path, invalid image",
invalidImage: true,
testfile: "badimage:latest",
expectedError: "unable to access the remote image (index.docker.io/library/badimage:latest)",
expectedError: "unable to inspect the image (index.docker.io/library/badimage:latest): Error: No such image: index.docker.io/library/badimage:latest",
},
}