1
0
mirror of https://github.com/rancher/os.git synced 2025-09-04 00:04:25 +00:00

migrate to upstream libcompose in one and a half go

This commit is contained in:
Ivan Mikushin
2015-11-26 17:41:42 +05:00
parent 1d691cd8d6
commit 5a363ab97d
1291 changed files with 40107 additions and 123532 deletions

View File

@@ -170,8 +170,8 @@ func TestNewTLSVersionedClientInvalidCA(t *testing.T) {
func TestNewClientInvalidEndpoint(t *testing.T) {
cases := []string{
"htp://localhost:3243", "http://localhost:a", "localhost:8080",
"", "localhost", "http://localhost:8080:8383", "http://localhost:65536",
"htp://localhost:3243", "http://localhost:a",
"", "http://localhost:8080:8383", "http://localhost:65536",
"https://localhost:-20",
}
for _, c := range cases {
@@ -185,6 +185,19 @@ func TestNewClientInvalidEndpoint(t *testing.T) {
}
}
func TestNewClientNoSchemeEndpoint(t *testing.T) {
cases := []string{"localhost", "localhost:8080"}
for _, c := range cases {
client, err := NewClient(c)
if client == nil {
t.Errorf("Want client for scheme-less endpoint, got <nil>")
}
if err != nil {
t.Errorf("Got unexpected error scheme-less endpoint: %q", err)
}
}
}
func TestNewTLSClient(t *testing.T) {
var tests = []struct {
endpoint string