search/cve: exclude unsupported images from fixed-tag list.

If image vulnerability scan does not support any media type, considering those images as an infected image and now this images will not be shown in fixed images list.

Fixes issue #130
This commit is contained in:
Shivam Mishra
2020-09-04 13:16:15 -07:00
parent 31687991d4
commit d63f715fe5
7 changed files with 340 additions and 152 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ go_test(
"image_cmd_test.go",
"root_test.go",
],
data = [
data = [
"//:exported_testdata",
],
embed = [":go_default_library"],
+1 -1
View File
@@ -425,7 +425,7 @@ func TestServerCVEResponse(t *testing.T) {
str := space.ReplaceAllString(buff.String(), " ")
str = strings.TrimSpace(str)
So(err, ShouldBeNil)
So(str, ShouldEqual, "")
So(strings.TrimSpace(str), ShouldContainSubstring, "IMAGE NAME TAG DIGEST SIZE")
})
Convey("invalid image", func() {