mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-28 11:46:20 -04:00
f3a9b00ec8
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
19 lines
414 B
Go
19 lines
414 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestVulns(t *testing.T) {
|
|
out, err := run("vulns", "--clair", "http://localhost:6060", fmt.Sprintf("%s/alpine:3.5", domain))
|
|
if err != nil {
|
|
t.Fatalf("output: %s, error: %v", out, err)
|
|
}
|
|
|
|
expected := `clair.clair resp.Status=200 OK`
|
|
if !strings.HasSuffix(strings.TrimSpace(out), expected) {
|
|
t.Fatalf("expected: %s\ngot: %s", expected, out)
|
|
}
|
|
}
|