chore(deps): update dictionary (#1708)

This commit is contained in:
MaineK00n
2023-10-17 23:04:27 +09:00
committed by GitHub
parent 57264e1765
commit 1a55cafc91
7 changed files with 202 additions and 167 deletions

View File

@@ -306,7 +306,15 @@ func TestDebian_detect(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := (Debian{}).detect(tt.args.cves, tt.args.srcPkg, tt.args.runningKernel)
slices.SortFunc(got, func(i, j cveContent) bool { return i.cveContent.CveID < j.cveContent.CveID })
slices.SortFunc(got, func(i, j cveContent) int {
if i.cveContent.CveID < j.cveContent.CveID {
return -1
}
if i.cveContent.CveID > j.cveContent.CveID {
return +1
}
return 0
})
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("Debian.detect() = %v, want %v", got, tt.want)
}