Explorar o código

Merge pull request #12043 from joeygibson/12041-fix-vet-warnings

Fix vet warnings in pkg/requestdecorator/requestdecorator_test.go #12041
Alexander Morozov %!s(int64=10) %!d(string=hai) anos
pai
achega
4e90b47cc2
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      pkg/requestdecorator/requestdecorator_test.go

+ 4 - 4
pkg/requestdecorator/requestdecorator_test.go

@@ -180,7 +180,7 @@ func TestRequestFactory(t *testing.T) {
 
 	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)
 	}
 
@@ -209,7 +209,7 @@ func TestRequestFactoryNewRequestWithDecorators(t *testing.T) {
 
 	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)
 	}
 
@@ -235,14 +235,14 @@ func TestRequestFactoryNewRequestWithDecorators(t *testing.T) {
 func TestRequestFactoryAddDecorator(t *testing.T) {
 	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)
 	}
 
 	ad := NewAuthDecorator("test", "password")
 	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)
 	}
 }