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>
20 lines
414 B
Go
20 lines
414 B
Go
package main
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestList(t *testing.T) {
|
|
out, err := run("ls", domain)
|
|
if err != nil {
|
|
t.Fatalf("output: %s, error: %v", out, err)
|
|
}
|
|
|
|
expected := `REPO TAGS
|
|
alpine 3.5, latest
|
|
busybox glibc, latest, musl`
|
|
if !strings.HasSuffix(strings.TrimSpace(out), expected) {
|
|
t.Fatalf("expected to contain: %s\ngot: %s", expected, out)
|
|
}
|
|
}
|