From 8400665f9ad3381c3be7e448235c7ed187fdc715 Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Tue, 9 Jul 2024 13:56:40 -0400 Subject: [PATCH 01/15] Fixed backup and batching test case IDs --- tests/cnf/ran/talm/tests/talm-backup.go | 2 +- tests/cnf/ran/talm/tests/talm-batching.go | 72 +++++++++++------------ 2 files changed, 35 insertions(+), 39 deletions(-) diff --git a/tests/cnf/ran/talm/tests/talm-backup.go b/tests/cnf/ran/talm/tests/talm-backup.go index 1474ee70f..adbe2d306 100644 --- a/tests/cnf/ran/talm/tests/talm-backup.go +++ b/tests/cnf/ran/talm/tests/talm-backup.go @@ -150,7 +150,7 @@ var _ = Describe("TALM backup tests", Label(tsparams.LabelBackupTestCases), func Expect(errorList).To(BeEmpty(), "Failed to clean up test resources on spokes") }) - It("should not affect backup on second spoke in same batch", func() { + It("should not affect backup on second spoke in same batch", reportxml.ID("74752"), func() { By("applying all the required CRs for backup") // max concurrency of 2 so both spokes are in the same batch cguBuilder := cgu.NewCguBuilder(HubAPIClient, tsparams.CguName, tsparams.TestNamespace, 2). diff --git a/tests/cnf/ran/talm/tests/talm-batching.go b/tests/cnf/ran/talm/tests/talm-batching.go index fabbab4e6..1843794ea 100644 --- a/tests/cnf/ran/talm/tests/talm-batching.go +++ b/tests/cnf/ran/talm/tests/talm-batching.go @@ -199,46 +199,47 @@ var _ = Describe("TALM Batching Tests", Label(tsparams.LabelBatchingTestCases), Spoke2APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() Expect(catSrcExistsOnSpoke2).To(BeFalse(), "Catalog source exists on spoke 2") }) + It("should continue the CGU when the first batch fails with the Continue batch timeout action", + reportxml.ID("74753"), func() { + // 74753 upgrade failure of first batch would not affect second batch + By("verifying the temporary namespace does not exist on spoke1") + tempExistsOnSpoke1 := namespace.NewBuilder(Spoke1APIClient, tsparams.TemporaryNamespace).Exists() + Expect(tempExistsOnSpoke1).To(BeFalse(), "Temporary namespace already exists on spoke 1") - It("should continue the CGU when the first batch fails with the Continue batch timeout action", func() { - By("verifying the temporary namespace does not exist on spoke1") - tempExistsOnSpoke1 := namespace.NewBuilder(Spoke1APIClient, tsparams.TemporaryNamespace).Exists() - Expect(tempExistsOnSpoke1).To(BeFalse(), "Temporary namespace already exists on spoke 1") - - By("creating the temporary namespace on spoke2 only") - _, err = namespace.NewBuilder(Spoke2APIClient, tsparams.TemporaryNamespace).Create() - Expect(err).ToNot(HaveOccurred(), "Failed to create temporary namespace on spoke 2") + By("creating the temporary namespace on spoke2 only") + _, err = namespace.NewBuilder(Spoke2APIClient, tsparams.TemporaryNamespace).Create() + Expect(err).ToNot(HaveOccurred(), "Failed to create temporary namespace on spoke 2") - By("creating the CGU and associated resources") - // Max concurrency of one to ensure two batches are used. - cguBuilder := cgu.NewCguBuilder(HubAPIClient, tsparams.CguName, tsparams.TestNamespace, 1). - WithCluster(RANConfig.Spoke1Name). - WithCluster(RANConfig.Spoke2Name). - WithManagedPolicy(tsparams.PolicyName) - cguBuilder.Definition.Spec.RemediationStrategy.Timeout = 9 - cguBuilder.Definition.Spec.Enable = ptr.To(false) + By("creating the CGU and associated resources") + // Max concurrency of one to ensure two batches are used. + cguBuilder := cgu.NewCguBuilder(HubAPIClient, tsparams.CguName, tsparams.TestNamespace, 1). + WithCluster(RANConfig.Spoke1Name). + WithCluster(RANConfig.Spoke2Name). + WithManagedPolicy(tsparams.PolicyName) + cguBuilder.Definition.Spec.RemediationStrategy.Timeout = 9 + cguBuilder.Definition.Spec.Enable = ptr.To(false) - cguBuilder, err = helper.SetupCguWithCatSrc(cguBuilder) - Expect(err).ToNot(HaveOccurred(), "Failed to setup CGU") + cguBuilder, err = helper.SetupCguWithCatSrc(cguBuilder) + Expect(err).ToNot(HaveOccurred(), "Failed to setup CGU") - By("waiting to enable the CGU") - cguBuilder, err = helper.WaitToEnableCgu(cguBuilder) - Expect(err).ToNot(HaveOccurred(), "Failed to wait and enable the CGU") + By("waiting to enable the CGU") + cguBuilder, err = helper.WaitToEnableCgu(cguBuilder) + Expect(err).ToNot(HaveOccurred(), "Failed to wait and enable the CGU") - By("waiting for the CGU to timeout") - err = helper.WaitForCguTimeout(cguBuilder, 16*time.Minute) - Expect(err).ToNot(HaveOccurred(), "Failed to wait for CGU to timeout") + By("waiting for the CGU to timeout") + err = helper.WaitForCguTimeout(cguBuilder, 16*time.Minute) + Expect(err).ToNot(HaveOccurred(), "Failed to wait for CGU to timeout") - By("validating that the policy succeeded on spoke2") - catSrcExistsOnSpoke2 := olm.NewCatalogSourceBuilder( - Spoke2APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() - Expect(catSrcExistsOnSpoke2).To(BeTrue(), "Catalog source doesn't exist on spoke 2") + By("validating that the policy succeeded on spoke2") + catSrcExistsOnSpoke2 := olm.NewCatalogSourceBuilder( + Spoke2APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() + Expect(catSrcExistsOnSpoke2).To(BeTrue(), "Catalog source doesn't exist on spoke 2") - By("validating that the policy failed on spoke1") - catSrcExistsOnSpoke1 := olm.NewCatalogSourceBuilder( - Spoke1APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() - Expect(catSrcExistsOnSpoke1).To(BeFalse(), "Catalog source exists on spoke 1") - }) + By("validating that the policy failed on spoke1") + catSrcExistsOnSpoke1 := olm.NewCatalogSourceBuilder( + Spoke1APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() + Expect(catSrcExistsOnSpoke1).To(BeFalse(), "Catalog source exists on spoke 1") + }) // 54296 - Batch Timeout Calculation It("should continue the CGU when the second batch fails with the Continue batch timeout action", @@ -304,7 +305,6 @@ var _ = Describe("TALM Batching Tests", Label(tsparams.LabelBatchingTestCases), When("there is a temporary namespace", Label(tsparams.LabelTempNamespaceTestCases), func() { // 47954 - Tests upgrade aborted due to short timeout. - // 54292 - Test Policy Deletion Upon CGU Expiration It("should report the timeout value when one cluster is in a batch and it times out", reportxml.ID("47954"), func() { By("verifying the temporary namespace does not exist on spoke1") tempExistsOnSpoke1 := namespace.NewBuilder(Spoke1APIClient, tsparams.TemporaryNamespace).Exists() @@ -362,10 +362,6 @@ var _ = Describe("TALM Batching Tests", Label(tsparams.LabelBatchingTestCases), }) // 47947 - Tests successful ocp and operator upgrade with canaries and multiple batches. - // 54288 - Test Cluster Selection with K8s matchLabels selector - // 54289 - Test Cluster Selection with K8s matchExpressions selector - // 54559 - CGU Multiple Selection Criteria - // 54292 - Test Policy Deletion Upon CGU Expiration It("should complete the CGU when two clusters are successful in a single batch", reportxml.ID("47947"), func() { By("creating the CGU and associated resources") cguBuilder := cgu.NewCguBuilder(HubAPIClient, tsparams.CguName, tsparams.TestNamespace, 1). From e601ebb4e5fdc64a1a8688e82a5b5e0c37a125d1 Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Tue, 9 Jul 2024 20:20:19 -0400 Subject: [PATCH 02/15] Fixed precache test case IDs --- tests/cnf/ran/talm/tests/talm-precache.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/cnf/ran/talm/tests/talm-precache.go b/tests/cnf/ran/talm/tests/talm-precache.go index 8df5844d4..18ad15d1d 100644 --- a/tests/cnf/ran/talm/tests/talm-precache.go +++ b/tests/cnf/ran/talm/tests/talm-precache.go @@ -300,7 +300,8 @@ var _ = Describe("TALM precache", Label(tsparams.LabelPreCacheTestCases), func() } }) - It("tests custom image precaching using an invalid image", func() { + // Precache Invalid User-Specified Image + It("tests custom image precaching using an invalid image", reportxml.ID("64747"), func() { versionInRange, err := ranhelper.IsVersionStringInRange(RANConfig.HubOperatorVersions[ranparam.TALM], "4.14", "") Expect(err).ToNot(HaveOccurred(), "Failed to compare TALM version string") From 648063a3316bba50ad234021949ccb52c75f8cea Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Tue, 9 Jul 2024 20:24:48 -0400 Subject: [PATCH 03/15] Fixed precache test case IDs --- tests/cnf/ran/talm/tests/talm-precache.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/cnf/ran/talm/tests/talm-precache.go b/tests/cnf/ran/talm/tests/talm-precache.go index 18ad15d1d..e6721e01d 100644 --- a/tests/cnf/ran/talm/tests/talm-precache.go +++ b/tests/cnf/ran/talm/tests/talm-precache.go @@ -57,7 +57,7 @@ var _ = Describe("TALM precache", Label(tsparams.LabelPreCacheTestCases), func() } }) - It("tests for precache operator with multiple sources", func() { + It("tests for precache operator with multiple sources", reportxml.ID("48902"), func() { var policies []string for _, suffix := range suffixes { policies = append(policies, tsparams.PolicyName+suffix) @@ -84,7 +84,7 @@ var _ = Describe("TALM precache", Label(tsparams.LabelPreCacheTestCases), func() Expect(errorList).To(BeEmpty(), "Failed to clean up test resources on hub") }) - It("tests for ocp cache with version", func() { + It("tests for ocp cache with version", reportxml.ID("47950"), func() { By("creating and applying policy with clusterversion CR that defines the upgrade graph, channel, and version") cguBuilder := getPrecacheCGU([]string{tsparams.PolicyName}, []string{RANConfig.Spoke1Name}) @@ -149,7 +149,7 @@ var _ = Describe("TALM precache", Label(tsparams.LabelPreCacheTestCases), func() Expect(errList).To(BeEmpty(), "Failed to clean up test resources on hub") }) - It("tests for ocp cache with image", func() { + It("tests for ocp cache with image", reportxml.ID("48903"), func() { By("creating and applying policy with clusterversion that defines the upgrade graph, channel, and version") cguBuilder := getPrecacheCGU([]string{tsparams.PolicyName}, []string{RANConfig.Spoke1Name}) From c8c1b0bb8430d288d13d775342453fc38d868f9e Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Tue, 9 Jul 2024 20:38:52 -0400 Subject: [PATCH 04/15] Fixed talm blockingcr test case IDs --- tests/cnf/ran/talm/tests/talm-blockingcr.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cnf/ran/talm/tests/talm-blockingcr.go b/tests/cnf/ran/talm/tests/talm-blockingcr.go index 2449dab82..fe7f2f9a3 100644 --- a/tests/cnf/ran/talm/tests/talm-blockingcr.go +++ b/tests/cnf/ran/talm/tests/talm-blockingcr.go @@ -55,7 +55,7 @@ var _ = Describe("TALM Blocking CRs Tests", Label(tsparams.LabelBlockingCRTestCa Expect(err).ToNot(HaveOccurred(), "Failed to delete namespace for blocking B on spoke 1") }) - When("a blocking CR passes", func() { + When("a blocking CR passes", reportxml.ID("47948"), func() { // 47948 - Tests multiple UOCRs can be enabled in parallel with blocking CR. It("verifies CGU succeeded with blocking CR", reportxml.ID("47948"), func() { By("creating two sets of CRs where B will be blocked until A is done") @@ -136,7 +136,7 @@ var _ = Describe("TALM Blocking CRs Tests", Label(tsparams.LabelBlockingCRTestCa }) }) - When("a blocking CR is missing", func() { + When("a blocking CR is missing", reportxml.ID("47956"), func() { // 47948 - Tests multiple UOCRs can be enabled in parallel with blocking CR. It("verifies CGU is blocked until blocking CR created and succeeded", reportxml.ID("47948"), func() { By("creating two sets of CRs where B will be blocked until A is done") From e0d0c919ed7c12ecdddd0c06731db58296563407 Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Wed, 10 Jul 2024 13:27:59 -0400 Subject: [PATCH 05/15] Revised TALM blockingCR test IDs --- tests/cnf/ran/talm/tests/talm-blockingcr.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/cnf/ran/talm/tests/talm-blockingcr.go b/tests/cnf/ran/talm/tests/talm-blockingcr.go index fe7f2f9a3..d82b84e4f 100644 --- a/tests/cnf/ran/talm/tests/talm-blockingcr.go +++ b/tests/cnf/ran/talm/tests/talm-blockingcr.go @@ -55,7 +55,7 @@ var _ = Describe("TALM Blocking CRs Tests", Label(tsparams.LabelBlockingCRTestCa Expect(err).ToNot(HaveOccurred(), "Failed to delete namespace for blocking B on spoke 1") }) - When("a blocking CR passes", reportxml.ID("47948"), func() { + When("a blocking CR passes", func() { // 47948 - Tests multiple UOCRs can be enabled in parallel with blocking CR. It("verifies CGU succeeded with blocking CR", reportxml.ID("47948"), func() { By("creating two sets of CRs where B will be blocked until A is done") @@ -90,8 +90,8 @@ var _ = Describe("TALM Blocking CRs Tests", Label(tsparams.LabelBlockingCRTestCa }) When("a blocking CR fails", func() { - // 47948 - Tests multiple UOCRs can be enabled in parallel with blocking CR. - It("verifies CGU fails with blocking CR", reportxml.ID("47948"), func() { + // 74768 - Tests multiple UOCRs can be enabled in parallel with blocking CR. + It("verifies CGU fails with blocking CR", reportxml.ID("74768"), func() { By("creating two sets of CRs where B will be blocked until A is done") cguA := getBlockingCGU(blockingA, 2) cguB := getBlockingCGU(blockingB, 1) @@ -137,8 +137,8 @@ var _ = Describe("TALM Blocking CRs Tests", Label(tsparams.LabelBlockingCRTestCa }) When("a blocking CR is missing", reportxml.ID("47956"), func() { - // 47948 - Tests multiple UOCRs can be enabled in parallel with blocking CR. - It("verifies CGU is blocked until blocking CR created and succeeded", reportxml.ID("47948"), func() { + // 47956 - Tests multiple UOCRs can be enabled in parallel with missing blocking CR. + It("verifies CGU is blocked until blocking CR created and succeeded", reportxml.ID("47956"), func() { By("creating two sets of CRs where B will be blocked until A is done") cguA := getBlockingCGU(blockingA, 10) cguB := getBlockingCGU(blockingB, 15) From 4d8489ef671fdc1f071546860ef9c51e1588c7e2 Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Wed, 10 Jul 2024 13:53:04 -0400 Subject: [PATCH 06/15] Test indentation --- tests/cnf/ran/talm/tests/talm-batching.go | 68 +++++++++++------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/tests/cnf/ran/talm/tests/talm-batching.go b/tests/cnf/ran/talm/tests/talm-batching.go index 1843794ea..93b5b4880 100644 --- a/tests/cnf/ran/talm/tests/talm-batching.go +++ b/tests/cnf/ran/talm/tests/talm-batching.go @@ -199,47 +199,47 @@ var _ = Describe("TALM Batching Tests", Label(tsparams.LabelBatchingTestCases), Spoke2APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() Expect(catSrcExistsOnSpoke2).To(BeFalse(), "Catalog source exists on spoke 2") }) - It("should continue the CGU when the first batch fails with the Continue batch timeout action", - reportxml.ID("74753"), func() { - // 74753 upgrade failure of first batch would not affect second batch - By("verifying the temporary namespace does not exist on spoke1") - tempExistsOnSpoke1 := namespace.NewBuilder(Spoke1APIClient, tsparams.TemporaryNamespace).Exists() - Expect(tempExistsOnSpoke1).To(BeFalse(), "Temporary namespace already exists on spoke 1") + It("should continue the CGU when the first batch fails with the Continue batch timeout + action", reportxml.ID("74753"), func() { + // 74753 upgrade failure of first batch would not affect second batch + By("verifying the temporary namespace does not exist on spoke1") + tempExistsOnSpoke1 := namespace.NewBuilder(Spoke1APIClient, tsparams.TemporaryNamespace).Exists() + Expect(tempExistsOnSpoke1).To(BeFalse(), "Temporary namespace already exists on spoke 1") - By("creating the temporary namespace on spoke2 only") - _, err = namespace.NewBuilder(Spoke2APIClient, tsparams.TemporaryNamespace).Create() - Expect(err).ToNot(HaveOccurred(), "Failed to create temporary namespace on spoke 2") + By("creating the temporary namespace on spoke2 only") + _, err = namespace.NewBuilder(Spoke2APIClient, tsparams.TemporaryNamespace).Create() + Expect(err).ToNot(HaveOccurred(), "Failed to create temporary namespace on spoke 2") - By("creating the CGU and associated resources") - // Max concurrency of one to ensure two batches are used. - cguBuilder := cgu.NewCguBuilder(HubAPIClient, tsparams.CguName, tsparams.TestNamespace, 1). - WithCluster(RANConfig.Spoke1Name). - WithCluster(RANConfig.Spoke2Name). - WithManagedPolicy(tsparams.PolicyName) - cguBuilder.Definition.Spec.RemediationStrategy.Timeout = 9 - cguBuilder.Definition.Spec.Enable = ptr.To(false) + By("creating the CGU and associated resources") + // Max concurrency of one to ensure two batches are used. + cguBuilder := cgu.NewCguBuilder(HubAPIClient, tsparams.CguName, tsparams.TestNamespace, 1). + WithCluster(RANConfig.Spoke1Name). + WithCluster(RANConfig.Spoke2Name). + WithManagedPolicy(tsparams.PolicyName) + cguBuilder.Definition.Spec.RemediationStrategy.Timeout = 9 + cguBuilder.Definition.Spec.Enable = ptr.To(false) - cguBuilder, err = helper.SetupCguWithCatSrc(cguBuilder) - Expect(err).ToNot(HaveOccurred(), "Failed to setup CGU") + cguBuilder, err = helper.SetupCguWithCatSrc(cguBuilder) + Expect(err).ToNot(HaveOccurred(), "Failed to setup CGU") - By("waiting to enable the CGU") - cguBuilder, err = helper.WaitToEnableCgu(cguBuilder) - Expect(err).ToNot(HaveOccurred(), "Failed to wait and enable the CGU") + By("waiting to enable the CGU") + cguBuilder, err = helper.WaitToEnableCgu(cguBuilder) + Expect(err).ToNot(HaveOccurred(), "Failed to wait and enable the CGU") - By("waiting for the CGU to timeout") - err = helper.WaitForCguTimeout(cguBuilder, 16*time.Minute) - Expect(err).ToNot(HaveOccurred(), "Failed to wait for CGU to timeout") + By("waiting for the CGU to timeout") + err = helper.WaitForCguTimeout(cguBuilder, 16*time.Minute) + Expect(err).ToNot(HaveOccurred(), "Failed to wait for CGU to timeout") - By("validating that the policy succeeded on spoke2") - catSrcExistsOnSpoke2 := olm.NewCatalogSourceBuilder( - Spoke2APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() - Expect(catSrcExistsOnSpoke2).To(BeTrue(), "Catalog source doesn't exist on spoke 2") + By("validating that the policy succeeded on spoke2") + catSrcExistsOnSpoke2 := olm.NewCatalogSourceBuilder( + Spoke2APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() + Expect(catSrcExistsOnSpoke2).To(BeTrue(), "Catalog source doesn't exist on spoke 2") - By("validating that the policy failed on spoke1") - catSrcExistsOnSpoke1 := olm.NewCatalogSourceBuilder( - Spoke1APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() - Expect(catSrcExistsOnSpoke1).To(BeFalse(), "Catalog source exists on spoke 1") - }) + By("validating that the policy failed on spoke1") + catSrcExistsOnSpoke1 := olm.NewCatalogSourceBuilder( + Spoke1APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() + Expect(catSrcExistsOnSpoke1).To(BeFalse(), "Catalog source exists on spoke 1") + }) // 54296 - Batch Timeout Calculation It("should continue the CGU when the second batch fails with the Continue batch timeout action", From 36936dcb5504fbd7ec6fe4b292be0b20b366ca46 Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Wed, 10 Jul 2024 14:11:39 -0400 Subject: [PATCH 07/15] Fix lint --- tests/cnf/ran/talm/tests/talm-batching.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cnf/ran/talm/tests/talm-batching.go b/tests/cnf/ran/talm/tests/talm-batching.go index 93b5b4880..f0d140c45 100644 --- a/tests/cnf/ran/talm/tests/talm-batching.go +++ b/tests/cnf/ran/talm/tests/talm-batching.go @@ -199,8 +199,8 @@ var _ = Describe("TALM Batching Tests", Label(tsparams.LabelBatchingTestCases), Spoke2APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() Expect(catSrcExistsOnSpoke2).To(BeFalse(), "Catalog source exists on spoke 2") }) - It("should continue the CGU when the first batch fails with the Continue batch timeout - action", reportxml.ID("74753"), func() { + It("should continue the CGU when the first batch fails with the Continue batch timeout"+ + "action", reportxml.ID("74753"), func() { // 74753 upgrade failure of first batch would not affect second batch By("verifying the temporary namespace does not exist on spoke1") tempExistsOnSpoke1 := namespace.NewBuilder(Spoke1APIClient, tsparams.TemporaryNamespace).Exists() From a40c80a11454e79beeea3f0c46e18147a7d4aabe Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Wed, 10 Jul 2024 14:24:37 -0400 Subject: [PATCH 08/15] fix lint --- tests/cnf/ran/talm/tests/talm-batching.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cnf/ran/talm/tests/talm-batching.go b/tests/cnf/ran/talm/tests/talm-batching.go index f0d140c45..ddf08ede6 100644 --- a/tests/cnf/ran/talm/tests/talm-batching.go +++ b/tests/cnf/ran/talm/tests/talm-batching.go @@ -200,7 +200,7 @@ var _ = Describe("TALM Batching Tests", Label(tsparams.LabelBatchingTestCases), Expect(catSrcExistsOnSpoke2).To(BeFalse(), "Catalog source exists on spoke 2") }) It("should continue the CGU when the first batch fails with the Continue batch timeout"+ - "action", reportxml.ID("74753"), func() { + "action", reportxml.ID("74753"), func() { // 74753 upgrade failure of first batch would not affect second batch By("verifying the temporary namespace does not exist on spoke1") tempExistsOnSpoke1 := namespace.NewBuilder(Spoke1APIClient, tsparams.TemporaryNamespace).Exists() From dc090096d9e999a344a8e727503631afc6803155 Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Wed, 10 Jul 2024 14:25:44 -0400 Subject: [PATCH 09/15] Added comments with Test IDs and descroptions. --- tests/cnf/ran/talm/tests/talm-backup.go | 1 + tests/cnf/ran/talm/tests/talm-batching.go | 1 + tests/cnf/ran/talm/tests/talm-blockingcr.go | 2 +- tests/cnf/ran/talm/tests/talm-precache.go | 3 +++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/cnf/ran/talm/tests/talm-backup.go b/tests/cnf/ran/talm/tests/talm-backup.go index adbe2d306..2cfeec4b8 100644 --- a/tests/cnf/ran/talm/tests/talm-backup.go +++ b/tests/cnf/ran/talm/tests/talm-backup.go @@ -150,6 +150,7 @@ var _ = Describe("TALM backup tests", Label(tsparams.LabelBackupTestCases), func Expect(errorList).To(BeEmpty(), "Failed to clean up test resources on spokes") }) + // Unblock Backup in Batch OCP Upgrade It("should not affect backup on second spoke in same batch", reportxml.ID("74752"), func() { By("applying all the required CRs for backup") // max concurrency of 2 so both spokes are in the same batch diff --git a/tests/cnf/ran/talm/tests/talm-batching.go b/tests/cnf/ran/talm/tests/talm-batching.go index ddf08ede6..7abcae39f 100644 --- a/tests/cnf/ran/talm/tests/talm-batching.go +++ b/tests/cnf/ran/talm/tests/talm-batching.go @@ -199,6 +199,7 @@ var _ = Describe("TALM Batching Tests", Label(tsparams.LabelBatchingTestCases), Spoke2APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() Expect(catSrcExistsOnSpoke2).To(BeFalse(), "Catalog source exists on spoke 2") }) + // 74753 upgrade failure of first batch would not affect second batch It("should continue the CGU when the first batch fails with the Continue batch timeout"+ "action", reportxml.ID("74753"), func() { // 74753 upgrade failure of first batch would not affect second batch diff --git a/tests/cnf/ran/talm/tests/talm-blockingcr.go b/tests/cnf/ran/talm/tests/talm-blockingcr.go index d82b84e4f..c8331c688 100644 --- a/tests/cnf/ran/talm/tests/talm-blockingcr.go +++ b/tests/cnf/ran/talm/tests/talm-blockingcr.go @@ -136,7 +136,7 @@ var _ = Describe("TALM Blocking CRs Tests", Label(tsparams.LabelBlockingCRTestCa }) }) - When("a blocking CR is missing", reportxml.ID("47956"), func() { + When("a blocking CR is missing", func() { // 47956 - Tests multiple UOCRs can be enabled in parallel with missing blocking CR. It("verifies CGU is blocked until blocking CR created and succeeded", reportxml.ID("47956"), func() { By("creating two sets of CRs where B will be blocked until A is done") diff --git a/tests/cnf/ran/talm/tests/talm-precache.go b/tests/cnf/ran/talm/tests/talm-precache.go index e6721e01d..fb3b6e001 100644 --- a/tests/cnf/ran/talm/tests/talm-precache.go +++ b/tests/cnf/ran/talm/tests/talm-precache.go @@ -57,6 +57,7 @@ var _ = Describe("TALM precache", Label(tsparams.LabelPreCacheTestCases), func() } }) + // 48902 Tests image precaching - operators It("tests for precache operator with multiple sources", reportxml.ID("48902"), func() { var policies []string for _, suffix := range suffixes { @@ -84,6 +85,7 @@ var _ = Describe("TALM precache", Label(tsparams.LabelPreCacheTestCases), func() Expect(errorList).To(BeEmpty(), "Failed to clean up test resources on hub") }) + // 47950 Tests ocp upgrade with image precaching enabled It("tests for ocp cache with version", reportxml.ID("47950"), func() { By("creating and applying policy with clusterversion CR that defines the upgrade graph, channel, and version") cguBuilder := getPrecacheCGU([]string{tsparams.PolicyName}, []string{RANConfig.Spoke1Name}) @@ -149,6 +151,7 @@ var _ = Describe("TALM precache", Label(tsparams.LabelPreCacheTestCases), func() Expect(errList).To(BeEmpty(), "Failed to clean up test resources on hub") }) + // 48903 Upgrade image precaching - OCP image with explicit image url It("tests for ocp cache with image", reportxml.ID("48903"), func() { By("creating and applying policy with clusterversion that defines the upgrade graph, channel, and version") cguBuilder := getPrecacheCGU([]string{tsparams.PolicyName}, []string{RANConfig.Spoke1Name}) From f2bc8250ddf963f2db8c0ef81ded087149d2edde Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Wed, 10 Jul 2024 14:30:05 -0400 Subject: [PATCH 10/15] added 74752 test id --- tests/cnf/ran/talm/tests/talm-backup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cnf/ran/talm/tests/talm-backup.go b/tests/cnf/ran/talm/tests/talm-backup.go index 2cfeec4b8..cb730203a 100644 --- a/tests/cnf/ran/talm/tests/talm-backup.go +++ b/tests/cnf/ran/talm/tests/talm-backup.go @@ -150,7 +150,7 @@ var _ = Describe("TALM backup tests", Label(tsparams.LabelBackupTestCases), func Expect(errorList).To(BeEmpty(), "Failed to clean up test resources on spokes") }) - // Unblock Backup in Batch OCP Upgrade + // 74752 Unblock Backup in Batch OCP Upgrade It("should not affect backup on second spoke in same batch", reportxml.ID("74752"), func() { By("applying all the required CRs for backup") // max concurrency of 2 so both spokes are in the same batch From b2e607ce24a9c76cfdc9e7044ea01e2b929ddca8 Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Wed, 10 Jul 2024 14:31:23 -0400 Subject: [PATCH 11/15] added 64747 test id --- tests/cnf/ran/talm/tests/talm-precache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cnf/ran/talm/tests/talm-precache.go b/tests/cnf/ran/talm/tests/talm-precache.go index fb3b6e001..990470dae 100644 --- a/tests/cnf/ran/talm/tests/talm-precache.go +++ b/tests/cnf/ran/talm/tests/talm-precache.go @@ -303,7 +303,7 @@ var _ = Describe("TALM precache", Label(tsparams.LabelPreCacheTestCases), func() } }) - // Precache Invalid User-Specified Image + // 64747 Precache Invalid User-Specified Image It("tests custom image precaching using an invalid image", reportxml.ID("64747"), func() { versionInRange, err := ranhelper.IsVersionStringInRange(RANConfig.HubOperatorVersions[ranparam.TALM], "4.14", "") Expect(err).ToNot(HaveOccurred(), "Failed to compare TALM version string") From 09d13abd3288b62e4946f663a18cab58c5051e12 Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Wed, 10 Jul 2024 14:46:30 -0400 Subject: [PATCH 12/15] lint fix --- tests/cnf/ran/talm/tests/talm-batching.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cnf/ran/talm/tests/talm-batching.go b/tests/cnf/ran/talm/tests/talm-batching.go index 7abcae39f..98567b530 100644 --- a/tests/cnf/ran/talm/tests/talm-batching.go +++ b/tests/cnf/ran/talm/tests/talm-batching.go @@ -201,7 +201,7 @@ var _ = Describe("TALM Batching Tests", Label(tsparams.LabelBatchingTestCases), }) // 74753 upgrade failure of first batch would not affect second batch It("should continue the CGU when the first batch fails with the Continue batch timeout"+ - "action", reportxml.ID("74753"), func() { + "action", reportxml.ID("74753"), func() { // 74753 upgrade failure of first batch would not affect second batch By("verifying the temporary namespace does not exist on spoke1") tempExistsOnSpoke1 := namespace.NewBuilder(Spoke1APIClient, tsparams.TemporaryNamespace).Exists() From 94fd77a4afefa8df4c525cdfb88aa205b7b60ee9 Mon Sep 17 00:00:00 2001 From: josclark42 <94012838+josclark42@users.noreply.github.com> Date: Wed, 10 Jul 2024 17:49:44 -0400 Subject: [PATCH 13/15] Update tests/cnf/ran/talm/tests/talm-batching.go Co-authored-by: Kirsten Laskoski <162511147+klaskosk@users.noreply.github.com> --- tests/cnf/ran/talm/tests/talm-batching.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cnf/ran/talm/tests/talm-batching.go b/tests/cnf/ran/talm/tests/talm-batching.go index 98567b530..c3c1cf8b4 100644 --- a/tests/cnf/ran/talm/tests/talm-batching.go +++ b/tests/cnf/ran/talm/tests/talm-batching.go @@ -199,10 +199,10 @@ var _ = Describe("TALM Batching Tests", Label(tsparams.LabelBatchingTestCases), Spoke2APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() Expect(catSrcExistsOnSpoke2).To(BeFalse(), "Catalog source exists on spoke 2") }) + // 74753 upgrade failure of first batch would not affect second batch It("should continue the CGU when the first batch fails with the Continue batch timeout"+ "action", reportxml.ID("74753"), func() { - // 74753 upgrade failure of first batch would not affect second batch By("verifying the temporary namespace does not exist on spoke1") tempExistsOnSpoke1 := namespace.NewBuilder(Spoke1APIClient, tsparams.TemporaryNamespace).Exists() Expect(tempExistsOnSpoke1).To(BeFalse(), "Temporary namespace already exists on spoke 1") From eda9e710ebcc35ce42838248f1450bfbcb8b5997 Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Wed, 10 Jul 2024 17:52:15 -0400 Subject: [PATCH 14/15] Changed UOCR to CGU --- tests/cnf/ran/talm/tests/talm-batching.go | 2 +- tests/cnf/ran/talm/tests/talm-blockingcr.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/cnf/ran/talm/tests/talm-batching.go b/tests/cnf/ran/talm/tests/talm-batching.go index c3c1cf8b4..15d10db37 100644 --- a/tests/cnf/ran/talm/tests/talm-batching.go +++ b/tests/cnf/ran/talm/tests/talm-batching.go @@ -52,7 +52,7 @@ var _ = Describe("TALM Batching Tests", Label(tsparams.LabelBatchingTestCases), }) When("a single spoke is missing", Label(tsparams.LabelMissingSpokeTestCases), func() { - // 47949 - Tests selected clusters must be non-compliant AND included in UOCR. + // 47949 - Tests selected clusters must be non-compliant AND included in CGU. It("should report a missing spoke", reportxml.ID("47949"), func() { By("creating the CGU with non-existent cluster and policy") cguBuilder := cgu.NewCguBuilder(HubAPIClient, tsparams.CguName, tsparams.TestNamespace, 1). diff --git a/tests/cnf/ran/talm/tests/talm-blockingcr.go b/tests/cnf/ran/talm/tests/talm-blockingcr.go index c8331c688..f1dff7c3a 100644 --- a/tests/cnf/ran/talm/tests/talm-blockingcr.go +++ b/tests/cnf/ran/talm/tests/talm-blockingcr.go @@ -56,7 +56,7 @@ var _ = Describe("TALM Blocking CRs Tests", Label(tsparams.LabelBlockingCRTestCa }) When("a blocking CR passes", func() { - // 47948 - Tests multiple UOCRs can be enabled in parallel with blocking CR. + // 47948 - Tests multiple CGUs can be enabled in parallel with blocking CR. It("verifies CGU succeeded with blocking CR", reportxml.ID("47948"), func() { By("creating two sets of CRs where B will be blocked until A is done") cguA := getBlockingCGU(blockingA, 10) @@ -90,7 +90,7 @@ var _ = Describe("TALM Blocking CRs Tests", Label(tsparams.LabelBlockingCRTestCa }) When("a blocking CR fails", func() { - // 74768 - Tests multiple UOCRs can be enabled in parallel with blocking CR. + // 74768 - Tests multiple CGUs can be enabled in parallel with blocking CR. It("verifies CGU fails with blocking CR", reportxml.ID("74768"), func() { By("creating two sets of CRs where B will be blocked until A is done") cguA := getBlockingCGU(blockingA, 2) @@ -137,7 +137,7 @@ var _ = Describe("TALM Blocking CRs Tests", Label(tsparams.LabelBlockingCRTestCa }) When("a blocking CR is missing", func() { - // 47956 - Tests multiple UOCRs can be enabled in parallel with missing blocking CR. + // 47956 - Tests multiple CGUs can be enabled in parallel with missing blocking CR. It("verifies CGU is blocked until blocking CR created and succeeded", reportxml.ID("47956"), func() { By("creating two sets of CRs where B will be blocked until A is done") cguA := getBlockingCGU(blockingA, 10) From 456baecb1a43f6e3e15029375d02ea7c40a668d0 Mon Sep 17 00:00:00 2001 From: Joshua Clark Date: Wed, 10 Jul 2024 17:54:50 -0400 Subject: [PATCH 15/15] lint fix --- tests/cnf/ran/talm/tests/talm-batching.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cnf/ran/talm/tests/talm-batching.go b/tests/cnf/ran/talm/tests/talm-batching.go index 15d10db37..a5db38def 100644 --- a/tests/cnf/ran/talm/tests/talm-batching.go +++ b/tests/cnf/ran/talm/tests/talm-batching.go @@ -199,7 +199,7 @@ var _ = Describe("TALM Batching Tests", Label(tsparams.LabelBatchingTestCases), Spoke2APIClient, tsparams.CatalogSourceName, tsparams.TemporaryNamespace).Exists() Expect(catSrcExistsOnSpoke2).To(BeFalse(), "Catalog source exists on spoke 2") }) - + // 74753 upgrade failure of first batch would not affect second batch It("should continue the CGU when the first batch fails with the Continue batch timeout"+ "action", reportxml.ID("74753"), func() {