Skip to content

Commit

Permalink
Merge pull request #5547 from muraee/revert-5511-enabled-labels-e2e
Browse files Browse the repository at this point in the history
OCPBUGS-49804: Revert "HOSTEDCP-2120: Enable EnsureCustomLabels e2e test"
  • Loading branch information
enxebre authored Feb 4, 2025
2 parents 6f6ceda + 39d74b3 commit f21f250
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
18 changes: 5 additions & 13 deletions test/e2e/create_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1108,10 +1108,9 @@ func TestCreateCluster(t *testing.T) {
}
if !e2eutil.IsLessThan(e2eutil.Version418) {
clusterOpts.FeatureSet = string(configv1.TechPreviewNoUpgrade)
}

clusterOpts.PodsLabels = map[string]string{
"hypershift-e2e-test-label": "test",
clusterOpts.PodsLabels = map[string]string{
"hypershift-e2e-test-label": "test",
}
}

e2eutil.NewHypershiftTest(t, ctx, func(t *testing.T, g Gomega, mgtClient crclient.Client, hostedCluster *hyperv1.HostedCluster) {
Expand Down Expand Up @@ -1139,15 +1138,14 @@ func TestCreateCluster(t *testing.T) {

integration.RunTestControlPlanePKIOperatorBreakGlassCredentials(t, testContext, hostedCluster, mgmtClients, guestClients)
e2eutil.EnsureAPIUX(t, ctx, mgtClient, hostedCluster)
e2eutil.EnsureCustomLabels(t, ctx, mgtClient, hostedCluster)
// TODO: enable when CNO/CSI changes to add the Labels to their 2nd-level operands is added.
// e2eutil.EnsureCustomLabels(t, ctx, mgtClient, hostedCluster)
}).
Execute(&clusterOpts, globalOpts.Platform, globalOpts.ArtifactDir, globalOpts.ServiceAccountSigningKey)
}

// TestCreateClusterV2 tests the new CPO implementation, which is currently hidden behind an annotation.
func TestCreateClusterV2(t *testing.T) {
e2eutil.AtLeast(t, e2eutil.Version419)

t.Parallel()

ctx, cancel := context.WithCancel(testContext)
Expand All @@ -1172,11 +1170,6 @@ func TestCreateClusterV2(t *testing.T) {
}
}

clusterOpts.FeatureSet = string(configv1.TechPreviewNoUpgrade)
clusterOpts.PodsLabels = map[string]string{
"hypershift-e2e-test-label": "test",
}

e2eutil.NewHypershiftTest(t, ctx, func(t *testing.T, g Gomega, mgtClient crclient.Client, hostedCluster *hyperv1.HostedCluster) {
// Sanity check the cluster by waiting for the nodes to report ready
_ = e2eutil.WaitForGuestClient(t, ctx, mgtClient, hostedCluster)
Expand All @@ -1202,7 +1195,6 @@ func TestCreateClusterV2(t *testing.T) {

integration.RunTestControlPlanePKIOperatorBreakGlassCredentials(t, testContext, hostedCluster, mgmtClients, guestClients)
e2eutil.EnsureAPIUX(t, ctx, mgtClient, hostedCluster)
e2eutil.EnsureCustomLabels(t, ctx, mgtClient, hostedCluster)
}).Execute(&clusterOpts, globalOpts.Platform, globalOpts.ArtifactDir, globalOpts.ServiceAccountSigningKey)
}

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -1934,7 +1934,7 @@ func EnsurePayloadArchSetCorrectly(t *testing.T, ctx context.Context, client crc

func EnsureCustomLabels(t *testing.T, ctx context.Context, client crclient.Client, hostedCluster *hyperv1.HostedCluster) {
t.Run("EnsureCustomLabels", func(t *testing.T) {
AtLeast(t, Version419)
AtLeast(t, Version418)

hcpNamespace := manifests.HostedControlPlaneNamespace(hostedCluster.Namespace, hostedCluster.Name)
podList := &corev1.PodList{}
Expand Down

0 comments on commit f21f250

Please sign in to comment.