replace fmt by logrus
This commit is contained in:
parent
f8d0f10c78
commit
e05afeeee5
@ -2,7 +2,6 @@ package clair
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
@ -54,7 +53,6 @@ func TestRelativeCount(t *testing.T) {
|
||||
}
|
||||
|
||||
vulnerabilitiesCount := allVulnerabilities(analysis)
|
||||
fmt.Printf("v: %v\n", vulnerabilitiesCount)
|
||||
if vulnerabilitiesCount.RelativeCount("High") != 1.3 {
|
||||
t.Errorf("analysis.CountAllVulnerabilities().RelativeCount(\"High\") => %v, want 1.3", vulnerabilitiesCount.RelativeCount("High"))
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package clair
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
@ -24,8 +23,6 @@ func TestReportAsHtml(t *testing.T) {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
fmt.Println(os.TempDir() + "/clairctl-html-report.html")
|
||||
|
||||
err = ioutil.WriteFile(os.TempDir()+"/clairctl-html-report.html", []byte(html), 0700)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
@ -35,7 +32,6 @@ func TestReportAsHtml(t *testing.T) {
|
||||
func TestInvertedPriorities(t *testing.T) {
|
||||
expected := []types.Priority{types.Defcon1, types.Critical, types.High, types.Medium, types.Low, types.Negligible, types.Unknown}
|
||||
ip := invertedPriorities()
|
||||
fmt.Printf("%v - %v", len(expected), len(ip))
|
||||
for i, v := range ip {
|
||||
if v != expected[i] {
|
||||
t.Errorf("Expecting %v, got %v", expected, ip)
|
||||
|
Loading…
Reference in New Issue
Block a user