diff --git a/pkg/factory/factory_test.go b/pkg/factory/factory_test.go index fe0f6a5a1..b00f7fcdc 100644 --- a/pkg/factory/factory_test.go +++ b/pkg/factory/factory_test.go @@ -51,19 +51,19 @@ var _ = Describe("Factory", func() { DescribeTable("getting allocator", func(policy string, shouldSucceed bool, expected reflect.Type) { f := factory.NewResourceFactory("fake", "fake", true) - a, e := f.GetAllocator(policy) + allocator, error := f.GetAllocator(policy) if shouldSucceed { - Expect(e).NotTo(HaveOccurred()) + Expect(error).NotTo(HaveOccurred()) } else { - Expect(a).To(BeNil()) + Expect(allocator).To(BeNil()) } // if statement below because gomega refuses to do "nil == nil" assertions if expected != nil { - Expect(reflect.TypeOf(a)).To(Equal(expected)) + Expect(reflect.TypeOf(allocator)).To(Equal(expected)) } else { - Expect(reflect.TypeOf(a)).To(BeNil()) + Expect(reflect.TypeOf(allocator)).To(BeNil()) } }, Entry("packed", "packed", true, reflect.TypeOf(resources.NewPackedAllocator())), diff --git a/pkg/resources/allocator_test.go b/pkg/resources/allocator_test.go index af599ae0c..d25dc289c 100644 --- a/pkg/resources/allocator_test.go +++ b/pkg/resources/allocator_test.go @@ -35,18 +35,18 @@ var _ = Describe("Allocator", func() { Describe("creating new packed allocator", func() { Context("with valid policy", func() { It("should return valid allocator", func() { - pa := resources.NewPackedAllocator() + packedAllocator := resources.NewPackedAllocator() expected := &resources.PackedAllocator{} - Expect(reflect.TypeOf(pa)).To(Equal(reflect.TypeOf(expected))) + Expect(reflect.TypeOf(packedAllocator)).To(Equal(reflect.TypeOf(expected))) }) }) }) Describe("creating new allocator", func() { Context("with default policy", func() { It("should return valid allocator", func() { - a := resources.NewAllocator() + allocator := resources.NewAllocator() expected := &resources.Allocator{} - Expect(reflect.TypeOf(a)).To(Equal(reflect.TypeOf(expected))) + Expect(reflect.TypeOf(allocator)).To(Equal(reflect.TypeOf(expected))) }) }) })