Fix vet warnings in pkg/requestdecorator/requestdecorator_test.go #12041

Signed-off-by: Joey Gibson <joey@joeygibson.com>
This commit is contained in:
Joey Gibson 2015-04-03 00:03:30 -04:00
parent 7bde17186d
commit 11603e6535

View file

@ -180,7 +180,7 @@ func TestRequestFactory(t *testing.T) {
requestFactory := NewRequestFactory(ad, uad) requestFactory := NewRequestFactory(ad, uad)
if dlen := requestFactory.GetDecorators(); len(dlen) != 2 { if dlen := len(requestFactory.GetDecorators()); dlen != 2 {
t.Fatalf("Expected to have two decorators, got %d", dlen) t.Fatalf("Expected to have two decorators, got %d", dlen)
} }
@ -209,7 +209,7 @@ func TestRequestFactoryNewRequestWithDecorators(t *testing.T) {
requestFactory := NewRequestFactory(ad) requestFactory := NewRequestFactory(ad)
if dlen := requestFactory.GetDecorators(); len(dlen) != 1 { if dlen := len(requestFactory.GetDecorators()); dlen != 1 {
t.Fatalf("Expected to have one decorators, got %d", dlen) t.Fatalf("Expected to have one decorators, got %d", dlen)
} }
@ -235,14 +235,14 @@ func TestRequestFactoryNewRequestWithDecorators(t *testing.T) {
func TestRequestFactoryAddDecorator(t *testing.T) { func TestRequestFactoryAddDecorator(t *testing.T) {
requestFactory := NewRequestFactory() requestFactory := NewRequestFactory()
if dlen := requestFactory.GetDecorators(); len(dlen) != 0 { if dlen := len(requestFactory.GetDecorators()); dlen != 0 {
t.Fatalf("Expected to have zero decorators, got %d", dlen) t.Fatalf("Expected to have zero decorators, got %d", dlen)
} }
ad := NewAuthDecorator("test", "password") ad := NewAuthDecorator("test", "password")
requestFactory.AddDecorator(ad) requestFactory.AddDecorator(ad)
if dlen := requestFactory.GetDecorators(); len(dlen) != 1 { if dlen := len(requestFactory.GetDecorators()); dlen != 1 {
t.Fatalf("Expected to have one decorators, got %d", dlen) t.Fatalf("Expected to have one decorators, got %d", dlen)
} }
} }