diff --git a/pkg/test/ginkgo/cmd_runsuite.go b/pkg/test/ginkgo/cmd_runsuite.go index 7d011e9c725e..b4edbd8a8131 100644 --- a/pkg/test/ginkgo/cmd_runsuite.go +++ b/pkg/test/ginkgo/cmd_runsuite.go @@ -583,6 +583,32 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc return strings.Contains(t.name, "OrderedNamespaceDeletion") }) + draTests, kubeTests := splitTests(kubeTests, func(t *testCase) bool { + return strings.Contains(t.name, "[DRA]") + }) + + inPlaceResizeTests, kubeTests := splitTests(kubeTests, func(t *testCase) bool { + return strings.Contains(t.name, "InPlace Resize") + }) + + probingTests, kubeTests := splitTests(kubeTests, func(t *testCase) bool { + return strings.Contains(t.name, "Probing container") || strings.Contains(t.name, "Probing restartable init container") + }) + + podGenerationTests, kubeTests := splitTests(kubeTests, func(t *testCase) bool { + return strings.Contains(t.name, "Pod Generation") + }) + + crdTests, kubeTests := splitTests(kubeTests, func(t *testCase) bool { + return strings.Contains(t.name, "CustomResourcePublishOpenAPI") || + strings.Contains(t.name, "CustomResourceValidationRules") || + strings.Contains(t.name, "CustomResourceConversionWebhook") || + strings.Contains(t.name, "CustomResourceDefinition Watch") || + strings.Contains(t.name, "CustomResourceFieldSelectors") || + strings.Contains(t.name, "CRDValidationRatcheting") || + strings.Contains(t.name, "FieldValidation") + }) + networkTests, openshiftTests := splitTests(openshiftTests, func(t *testCase) bool { return strings.Contains(t.name, "[sig-network]") }) @@ -600,6 +626,10 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc return strings.Contains(t.name, "[sig-cli] oc adm must-gather") }) + deploymentConfigTests, openshiftTests := splitTests(openshiftTests, func(t *testCase) bool { + return strings.Contains(t.name, "[Feature:DeploymentConfig]") + }) + logrus.Infof("Found %d openshift tests", len(openshiftTests)) logrus.Infof("Found %d kubernetes tests", len(kubeTests)) logrus.Infof("Found %d storage tests", len(storageTests)) @@ -609,6 +639,12 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc logrus.Infof("Found %d netpol tests", len(netpolTests)) logrus.Infof("Found %d builds tests", len(buildsTests)) logrus.Infof("Found %d must-gather tests", len(mustGatherTests)) + logrus.Infof("Found %d DeploymentConfig tests", len(deploymentConfigTests)) + logrus.Infof("Found %d DRA tests", len(draTests)) + logrus.Infof("Found %d InPlace Resize tests", len(inPlaceResizeTests)) + logrus.Infof("Found %d Probing tests", len(probingTests)) + logrus.Infof("Found %d Pod Generation tests", len(podGenerationTests)) + logrus.Infof("Found %d CRD tests", len(crdTests)) // If user specifies a count, duplicate the kube and openshift tests that many times. expectedTestCount := len(early) + len(late) @@ -622,6 +658,12 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc originalNetpol := netpolTests originalBuilds := buildsTests originalMustGather := mustGatherTests + originalDRA := draTests + originalInPlaceResize := inPlaceResizeTests + originalProbing := probingTests + originalPodGeneration := podGenerationTests + originalCRD := crdTests + originalDeploymentConfig := deploymentConfigTests for i := 1; i < count; i++ { kubeTests = append(kubeTests, copyTests(originalKube)...) @@ -633,9 +675,15 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc netpolTests = append(netpolTests, copyTests(originalNetpol)...) buildsTests = append(buildsTests, copyTests(originalBuilds)...) mustGatherTests = append(mustGatherTests, copyTests(originalMustGather)...) + draTests = append(draTests, copyTests(originalDRA)...) + inPlaceResizeTests = append(inPlaceResizeTests, copyTests(originalInPlaceResize)...) + probingTests = append(probingTests, copyTests(originalProbing)...) + podGenerationTests = append(podGenerationTests, copyTests(originalPodGeneration)...) + crdTests = append(crdTests, copyTests(originalCRD)...) + deploymentConfigTests = append(deploymentConfigTests, copyTests(originalDeploymentConfig)...) } } - expectedTestCount += len(openshiftTests) + len(kubeTests) + len(storageTests) + len(networkK8sTests) + len(orderedNamespaceDeletionTests) + len(networkTests) + len(netpolTests) + len(buildsTests) + len(mustGatherTests) + expectedTestCount += len(openshiftTests) + len(kubeTests) + len(storageTests) + len(networkK8sTests) + len(orderedNamespaceDeletionTests) + len(networkTests) + len(netpolTests) + len(buildsTests) + len(mustGatherTests) + len(draTests) + len(inPlaceResizeTests) + len(probingTests) + len(podGenerationTests) + len(crdTests) + len(deploymentConfigTests) abortFn := neverAbort testCtx := ctx @@ -667,6 +715,41 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc logrus.Infof("Completed Kubernetes test bucket in %v", time.Since(kubeStartTime)) tests = append(tests, kubeTestsCopy...) + draTestsCopy := copyTests(draTests) + draIntervalID, draStartTime := recordTestBucketInterval(monitorEventRecorder, "DRA") + q.Execute(testCtx, draTestsCopy, parallelism, testOutputConfig, abortFn) + monitorEventRecorder.EndInterval(draIntervalID, time.Now()) + logrus.Infof("Completed DRA test bucket in %v", time.Since(draStartTime)) + tests = append(tests, draTestsCopy...) + + inPlaceResizeTestsCopy := copyTests(inPlaceResizeTests) + inPlaceResizeIntervalID, inPlaceResizeStartTime := recordTestBucketInterval(monitorEventRecorder, "InPlaceResize") + q.Execute(testCtx, inPlaceResizeTestsCopy, parallelism, testOutputConfig, abortFn) + monitorEventRecorder.EndInterval(inPlaceResizeIntervalID, time.Now()) + logrus.Infof("Completed InPlaceResize test bucket in %v", time.Since(inPlaceResizeStartTime)) + tests = append(tests, inPlaceResizeTestsCopy...) + + probingTestsCopy := copyTests(probingTests) + probingIntervalID, probingStartTime := recordTestBucketInterval(monitorEventRecorder, "Probing") + q.Execute(testCtx, probingTestsCopy, parallelism, testOutputConfig, abortFn) + monitorEventRecorder.EndInterval(probingIntervalID, time.Now()) + logrus.Infof("Completed Probing test bucket in %v", time.Since(probingStartTime)) + tests = append(tests, probingTestsCopy...) + + podGenerationTestsCopy := copyTests(podGenerationTests) + podGenerationIntervalID, podGenerationStartTime := recordTestBucketInterval(monitorEventRecorder, "PodGeneration") + q.Execute(testCtx, podGenerationTestsCopy, parallelism, testOutputConfig, abortFn) + monitorEventRecorder.EndInterval(podGenerationIntervalID, time.Now()) + logrus.Infof("Completed PodGeneration test bucket in %v", time.Since(podGenerationStartTime)) + tests = append(tests, podGenerationTestsCopy...) + + crdTestsCopy := copyTests(crdTests) + crdIntervalID, crdStartTime := recordTestBucketInterval(monitorEventRecorder, "CRD") + q.Execute(testCtx, crdTestsCopy, parallelism, testOutputConfig, abortFn) + monitorEventRecorder.EndInterval(crdIntervalID, time.Now()) + logrus.Infof("Completed CRD test bucket in %v", time.Since(crdStartTime)) + tests = append(tests, crdTestsCopy...) + // I thought about randomizing the order of the kube, storage, and openshift tests, but storage dominates our e2e runs, so it doesn't help much. storageTestsCopy := copyTests(storageTests) storageIntervalID, storageStartTime := recordTestBucketInterval(monitorEventRecorder, "Storage") @@ -721,6 +804,13 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc logrus.Infof("Completed OpenShift test bucket in %v", time.Since(openshiftStartTime)) tests = append(tests, openshiftTestsCopy...) + deploymentConfigTestsCopy := copyTests(deploymentConfigTests) + deploymentConfigIntervalID, deploymentConfigStartTime := recordTestBucketInterval(monitorEventRecorder, "DeploymentConfig") + q.Execute(testCtx, deploymentConfigTestsCopy, parallelism, testOutputConfig, abortFn) + monitorEventRecorder.EndInterval(deploymentConfigIntervalID, time.Now()) + logrus.Infof("Completed DeploymentConfig test bucket in %v", time.Since(deploymentConfigStartTime)) + tests = append(tests, deploymentConfigTestsCopy...) + // run the must-gather tests after parallel tests to reduce resource contention mustGatherTestsCopy := copyTests(mustGatherTests) mustGatherIntervalID, mustGatherStartTime := recordTestBucketInterval(monitorEventRecorder, "MustGather")