mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-28 11:46:20 -04:00
18 lines
337 B
Go
18 lines
337 B
Go
|
package main
|
||
|
|
||
|
import "testing"
|
||
|
|
||
|
func TestList(t *testing.T) {
|
||
|
out, err := run("ls")
|
||
|
if err != nil {
|
||
|
t.Fatalf("output: %s, error: %v", string(out), err)
|
||
|
}
|
||
|
expected := `Repositories for localhost:5000
|
||
|
REPO TAGS
|
||
|
alpine latest
|
||
|
`
|
||
|
if out != expected {
|
||
|
t.Fatalf("expected: %s\ngot: %s", expected, out)
|
||
|
}
|
||
|
}
|