Fix(reporting): NotFixedYet of SourcePackage in OVAL match on Debian and Ubuntu (#656)

* fix(refactoring): oval

* Fix(reporting): NotFixedYet of SourcePackage in OVAL match on Debian and Ubuntu #655
This commit is contained in:
Kota Kanbe
2018-05-22 18:53:08 +09:00
committed by GitHub
parent 9cc78770a3
commit 09779962cf
8 changed files with 89 additions and 10 deletions

View File

@@ -105,9 +105,8 @@ func TestUpsert(t *testing.T) {
func TestDefpacksToPackStatuses(t *testing.T) {
type in struct {
dp defPacks
family string
packs models.Packages
dp defPacks
packs models.Packages
}
var tests = []struct {
in in
@@ -116,7 +115,6 @@ func TestDefpacksToPackStatuses(t *testing.T) {
// Ubuntu
{
in: in{
family: "ubuntu",
dp: defPacks{
def: ovalmodels.Definition{
AffectedPacks: []ovalmodels.Package{
@@ -154,7 +152,7 @@ func TestDefpacksToPackStatuses(t *testing.T) {
},
}
for i, tt := range tests {
actual := tt.in.dp.toPackStatuses(tt.in.family)
actual := tt.in.dp.toPackStatuses()
sort.Slice(actual, func(i, j int) bool {
return actual[i].Name < actual[j].Name
})