1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/api/client/lib/image_build_test.go
David Calavera 83b5729f64 Remove httputils dependency from API client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-14 16:48:59 -05:00

17 lines
334 B
Go

package lib
import "testing"
func TestGetDockerOS(t *testing.T) {
cases := map[string]string{
"Docker/v1.22 (linux)": "linux",
"Docker/v1.22 (windows)": "windows",
"Foo/v1.22 (bar)": "",
}
for header, os := range cases {
g := getDockerOS(header)
if g != os {
t.Fatalf("Expected %s, got %s", os, g)
}
}
}