diff --git a/examples/crd-client/main.go b/examples/crd-client/main.go index 94a82cab7f..077b02e2ab 100644 --- a/examples/crd-client/main.go +++ b/examples/crd-client/main.go @@ -112,7 +112,7 @@ func main() { ctx := context.Background() newGS, err := agonesClient.AgonesV1().GameServers(gs.Namespace).Create(ctx, gs, metav1.CreateOptions{}) if err != nil { - logrus.Fatal("Unable to create GameServer: %v", err) + logrus.Fatalf("Unable to create GameServer: %v", err) } logrus.Infof("New GameServer name is: %s", newGS.ObjectMeta.Name) diff --git a/pkg/gameserverallocations/allocator_test.go b/pkg/gameserverallocations/allocator_test.go index edadd6685b..67883c7569 100644 --- a/pkg/gameserverallocations/allocator_test.go +++ b/pkg/gameserverallocations/allocator_test.go @@ -88,7 +88,7 @@ func TestAllocatorAllocate(t *testing.T) { }} gsa.ApplyDefaults() errs := gsa.Validate() - require.Len(t, len(errs), 0) + require.Len(t, errs, 0) gs, err := a.allocate(ctx, &gsa) require.NoError(t, err) @@ -166,7 +166,7 @@ func TestAllocatorAllocatePriority(t *testing.T) { }} gsa.ApplyDefaults() errs := gsa.Validate() - require.Len(t, len(errs), 0) + require.Len(t, errs, 0) t.Run(name, func(t *testing.T) { test(t, a, gsa.DeepCopy()) @@ -469,7 +469,7 @@ func TestAllocatorAllocateOnGameServerUpdateError(t *testing.T) { // without converter we don't end up with at least one selector gsa.Converter() errs := gsa.Validate() - require.Len(t, len(errs), 0) + require.Len(t, errs, 0) require.Len(t, gsa.Spec.Selectors, 1) // try the private method @@ -525,7 +525,7 @@ func TestAllocatorRunLocalAllocations(t *testing.T) { }} gsa.ApplyDefaults() errs := gsa.Validate() - require.Len(t, len(errs), 0) + require.Len(t, errs, 0) // line up 3 in a batch j1 := request{gsa: gsa.DeepCopy(), response: make(chan response)} @@ -582,7 +582,7 @@ func TestAllocatorRunLocalAllocations(t *testing.T) { }} gsa.ApplyDefaults() errs := gsa.Validate() - require.Len(t, len(errs), 0) + require.Len(t, errs, 0) j1 := request{gsa: gsa.DeepCopy(), response: make(chan response)} a.pendingRequests <- j1