remove unstable CLI test (bad binaries) (#721)

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Alex Goodman 2021-12-22 15:55:37 -05:00 committed by GitHub
parent 8535ee5b2e
commit 7f8cb0bd80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ import (
func TestPackagesCmdFlags(t *testing.T) { func TestPackagesCmdFlags(t *testing.T) {
coverageImage := "docker-archive:" + getFixtureImage(t, "image-pkg-coverage") coverageImage := "docker-archive:" + getFixtureImage(t, "image-pkg-coverage")
badBinariesImage := "docker-archive:" + getFixtureImage(t, "image-bad-binaries") //badBinariesImage := "docker-archive:" + getFixtureImage(t, "image-bad-binaries")
tests := []struct { tests := []struct {
name string name string
@ -32,20 +32,26 @@ func TestPackagesCmdFlags(t *testing.T) {
assertSuccessfulReturnCode, assertSuccessfulReturnCode,
}, },
}, },
{ // I haven't been able to reproduce locally yet, but in CI this has proven to be unstable:
name: "regression-survive-bad-binaries", // For the same commit:
// this image has all sorts of rich binaries from the clang-13 test suite that should do pretty bad things // pass: https://github.com/anchore/syft/runs/4611344142?check_suite_focus=true
// to the go cataloger binary path. We should NEVER let a panic stop the cataloging process for these // fail: https://github.com/anchore/syft/runs/4611343586?check_suite_focus=true
// specific cases. // For the meantime this test will be commented out, but should be added back in as soon as possible.
//
// this is more of an integration test, however, to assert the output we want to see from the application //{
// a CLI test is much easier. // name: "regression-survive-bad-binaries",
args: []string{"packages", "-vv", badBinariesImage}, // // this image has all sorts of rich binaries from the clang-13 test suite that should do pretty bad things
assertions: []traitAssertion{ // // to the go cataloger binary path. We should NEVER let a panic stop the cataloging process for these
assertInOutput("could not parse possible go binary"), // // specific cases.
assertSuccessfulReturnCode, //
}, // // this is more of an integration test, however, to assert the output we want to see from the application
}, // // a CLI test is much easier.
// args: []string{"packages", "-vv", badBinariesImage},
// assertions: []traitAssertion{
// assertInOutput("could not parse possible go binary"),
// assertSuccessfulReturnCode,
// },
//},
{ {
name: "output-env-binding", name: "output-env-binding",
env: map[string]string{ env: map[string]string{