Skip to content

Commit e27355a

Browse files
Refactor the test to just one worker node
1 parent a383bae commit e27355a

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

pkg/monitortests/kubelet/containerfailures/container_failures.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (w *containerFailuresTests) EvaluateTestsFromConstructedIntervals(_ context
8484
// We want to report restarts of openshift containers as flakes
8585
excessiveExitsByNamespaceForFlakeTests := map[string][]string{}
8686

87-
maxRestartCountForFailures := 3
87+
maxRestartCountForFailures := 4
8888
maxRestartCountForFlakes := 2
8989

9090
clusterDataPlatform, _ := platformidentification.BuildClusterData(context.Background(), w.adminRESTConfig)

test/extended/node/node_sizing.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ var _ = g.Describe("[Suite:openshift/conformance/serial][Serial][sig-node] Node
3737
g.Skip("Not supported on MicroShift")
3838
}
3939

40-
// TODO: Add this if KubeletConfig is not supported on hypershift.
41-
// Skip test on hypershift platforms
42-
//if ok, _ := exutil.IsHypershift(ctx, oc.AdminConfigClient()); ok {
43-
// g.Skip("KubeletConfig is not supported on hypershift. Skipping test.")
44-
//}
45-
46-
// Create machine config client
4740
mcClient, err := machineconfigclient.NewForConfig(oc.KubeFramework().ClientConfig())
4841
o.Expect(err).NotTo(o.HaveOccurred(), "Error creating machine config client")
4942

@@ -59,6 +52,7 @@ var _ = g.Describe("[Suite:openshift/conformance/serial][Serial][sig-node] Node
5952
framework.Logf("Testing on node: %s", nodeName)
6053

6154
// Label the first worker node for our custom MCP
55+
// This approach is taken so that all the nodes do not restart at the same time for the test
6256
testMCPLabel := "node-sizing-test"
6357
g.By(fmt.Sprintf("Labeling node %s with %s=true", nodeName, testMCPLabel))
6458
node, err := oc.AdminKubeClient().CoreV1().Nodes().Get(ctx, nodeName, metav1.GetOptions{})
@@ -161,7 +155,6 @@ var _ = g.Describe("[Suite:openshift/conformance/serial][Serial][sig-node] Node
161155
o.Expect(err).NotTo(o.HaveOccurred(), "Should be able to delete test pod")
162156

163157
// Now apply KubeletConfig and verify NODE_SIZING_ENABLED=true
164-
165158
kubeletConfigName := "auto-sizing-enabled"
166159

167160
// Clean up KubeletConfig on test completion
@@ -254,7 +247,6 @@ var _ = g.Describe("[Suite:openshift/conformance/serial][Serial][sig-node] Node
254247

255248
verifyNodeSizingEnabledFile(ctx, oc, podName, namespace, nodeName, "true")
256249

257-
// Explicitly transition the node back to the worker pool before cleanup
258250
// This must happen before the MCP is deleted to avoid leaving the node in a degraded state
259251
g.By(fmt.Sprintf("Removing node label %s from node %s to transition back to worker pool", testMCPLabel, nodeName))
260252
node, err = oc.AdminKubeClient().CoreV1().Nodes().Get(ctx, nodeName, metav1.GetOptions{})
@@ -264,6 +256,7 @@ var _ = g.Describe("[Suite:openshift/conformance/serial][Serial][sig-node] Node
264256
o.Expect(err).NotTo(o.HaveOccurred(), "Should be able to remove label from node")
265257

266258
// Wait for the node to transition back to the worker pool configuration
259+
// Without this the other tests fail
267260
g.By(fmt.Sprintf("Waiting for node %s to transition back to worker pool", nodeName))
268261
o.Eventually(func() bool {
269262
currentNode, err := oc.AdminKubeClient().CoreV1().Nodes().Get(ctx, nodeName, metav1.GetOptions{})

0 commit comments

Comments
 (0)