forked from barak/tarpoon
Add glide.yaml and vendor deps
This commit is contained in:
parent
db918f12ad
commit
5b3d5e81bd
18880 changed files with 5166045 additions and 1 deletions
30
vendor/github.com/docker/distribution/registry/registry_test.go
generated
vendored
Normal file
30
vendor/github.com/docker/distribution/registry/registry_test.go
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
package registry
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/distribution/configuration"
|
||||
)
|
||||
|
||||
// Tests to ensure nextProtos returns the correct protocols when:
|
||||
// * config.HTTP.HTTP2.Disabled is not explicitly set => [h2 http/1.1]
|
||||
// * config.HTTP.HTTP2.Disabled is explicitly set to false [h2 http/1.1]
|
||||
// * config.HTTP.HTTP2.Disabled is explicitly set to true [http/1.1]
|
||||
func TestNextProtos(t *testing.T) {
|
||||
config := &configuration.Configuration{}
|
||||
protos := nextProtos(config)
|
||||
if !reflect.DeepEqual(protos, []string{"h2", "http/1.1"}) {
|
||||
t.Fatalf("expected protos to equal [h2 http/1.1], got %s", protos)
|
||||
}
|
||||
config.HTTP.HTTP2.Disabled = false
|
||||
protos = nextProtos(config)
|
||||
if !reflect.DeepEqual(protos, []string{"h2", "http/1.1"}) {
|
||||
t.Fatalf("expected protos to equal [h2 http/1.1], got %s", protos)
|
||||
}
|
||||
config.HTTP.HTTP2.Disabled = true
|
||||
protos = nextProtos(config)
|
||||
if !reflect.DeepEqual(protos, []string{"http/1.1"}) {
|
||||
t.Fatalf("expected protos to equal [http/1.1], got %s", protos)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue