fix(scan-freebsd): also get installed with pkg info #1042 (#1051)

* fix(scan-freebsd): also get installed with `pkg info` #1042

* fix test
This commit is contained in:
Kota Kanbe
2020-09-12 05:08:41 +09:00
committed by GitHub
parent 8a8ab8cb18
commit 4b680b9960
5 changed files with 88 additions and 4 deletions

View File

@@ -416,6 +416,10 @@ func (r ScanResult) FormatAlertSummary() string {
}
func (r ScanResult) isDisplayUpdatableNum() bool {
if r.Family == config.FreeBSD {
return false
}
var mode config.ScanMode
s, _ := config.Conf.Servers[r.ServerName]
mode = s.Mode

View File

@@ -688,7 +688,7 @@ func TestIsDisplayUpdatableNum(t *testing.T) {
{
mode: []byte{config.Fast},
family: config.FreeBSD,
expected: true,
expected: false,
},
{
mode: []byte{config.Fast},