From b526a4e9707847b7a7b75ce7dcacf39d1a686ca8 Mon Sep 17 00:00:00 2001 From: Mikalai Radchuk Date: Thu, 22 Jun 2023 10:37:32 +0100 Subject: [PATCH] Removes unnecessary `HaveLen` assertions Signed-off-by: Mikalai Radchuk --- .../bundlesanddependencies/bundles_and_dependencies_test.go | 1 - .../variable_sources/crdconstraints/crd_constraints_test.go | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/resolution/variable_sources/bundlesanddependencies/bundles_and_dependencies_test.go b/internal/resolution/variable_sources/bundlesanddependencies/bundles_and_dependencies_test.go index 6bc22a4ef..1aa874a5e 100644 --- a/internal/resolution/variable_sources/bundlesanddependencies/bundles_and_dependencies_test.go +++ b/internal/resolution/variable_sources/bundlesanddependencies/bundles_and_dependencies_test.go @@ -199,7 +199,6 @@ var _ = Describe("BundlesAndDepsVariableSource", func() { bundleVariables = append(bundleVariables, v) } } - Expect(bundleVariables).To(HaveLen(12)) Expect(bundleVariables).To(WithTransform(CollectBundleVariableIDs, Equal([]string{"bundle-2", "bundle-1", "bundle-15", "bundle-16", "bundle-17", "bundle-9", "bundle-8", "bundle-7", "bundle-5", "bundle-4", "bundle-11", "bundle-10"}))) // check dependencies for one of the bundles diff --git a/internal/resolution/variable_sources/crdconstraints/crd_constraints_test.go b/internal/resolution/variable_sources/crdconstraints/crd_constraints_test.go index 8f125351c..dc8c14fec 100644 --- a/internal/resolution/variable_sources/crdconstraints/crd_constraints_test.go +++ b/internal/resolution/variable_sources/crdconstraints/crd_constraints_test.go @@ -247,8 +247,7 @@ var _ = Describe("CRDUniquenessConstraintsVariableSource", func() { crdConstraintVariables = append(crdConstraintVariables, v) } } - Expect(crdConstraintVariables).To(HaveLen(11)) - Expect(crdConstraintVariables).To(WithTransform(CollectGlobalConstraintVariableIDs, ContainElements([]string{ + Expect(crdConstraintVariables).To(WithTransform(CollectGlobalConstraintVariableIDs, ConsistOf([]string{ "another-package package uniqueness", "bar-package package uniqueness", "test-package-2 package uniqueness",