2018-03-06 10:14:23 -05:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2018-06-17 15:41:58 -04:00
|
|
|
"fmt"
|
2018-03-06 10:14:23 -05:00
|
|
|
"strings"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestTags(t *testing.T) {
|
2018-06-17 15:41:58 -04:00
|
|
|
out, err := run("tags", fmt.Sprintf("%s/busybox", domain))
|
2018-03-06 10:14:23 -05:00
|
|
|
if err != nil {
|
2018-06-17 15:41:58 -04:00
|
|
|
t.Fatalf("output: %s, error: %v", out, err)
|
2018-03-06 10:14:23 -05:00
|
|
|
}
|
|
|
|
expected := `glibc
|
2018-06-17 15:41:58 -04:00
|
|
|
latest
|
2018-03-06 10:14:23 -05:00
|
|
|
musl
|
|
|
|
`
|
|
|
|
if !strings.HasSuffix(out, expected) {
|
2018-06-17 15:41:58 -04:00
|
|
|
t.Fatalf("expected: %s\ngot: %s", expected, out)
|
2018-03-06 10:14:23 -05:00
|
|
|
}
|
|
|
|
}
|