Fix 'tcp+tls' protocol not being accepted
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
80e2b1b5e2
commit
a830282265
2 changed files with 16 additions and 2 deletions
|
@ -18,6 +18,12 @@ var (
|
|||
invalidGitUrls = []string{
|
||||
"http://github.com/docker/docker.git:#branch",
|
||||
}
|
||||
transportUrls = []string{
|
||||
"tcp://example.com",
|
||||
"tcp+tls://example.com",
|
||||
"udp://example.com",
|
||||
"unix:///example",
|
||||
}
|
||||
)
|
||||
|
||||
func TestValidGitTransport(t *testing.T) {
|
||||
|
@ -53,3 +59,11 @@ func TestIsGIT(t *testing.T) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsTransport(t *testing.T) {
|
||||
for _, url := range transportUrls {
|
||||
if IsTransportURL(url) == false {
|
||||
t.Fatalf("%q should be detected as valid Transport url", url)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue