You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/helpers/kube.go
+82-2Lines changed: 82 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ import (
18
18
"context"
19
19
"errors"
20
20
"fmt"
21
+
"os"
21
22
"strings"
22
23
"sync"
23
24
"testing"
@@ -34,11 +35,13 @@ import (
34
35
"k8s.io/apimachinery/pkg/runtime/schema"
35
36
"sigs.k8s.io/e2e-framework/klient"
36
37
"sigs.k8s.io/e2e-framework/klient/k8s/resources"
38
+
"sigs.k8s.io/yaml"
37
39
)
38
40
39
41
const (
40
42
WaitTimeout=10*time.Minute
41
43
WaitInterval=10*time.Second
44
+
Namespace="nvsentinel"
42
45
)
43
46
44
47
// WaitForNodesCordonState waits for nodes with names specified in `nodeNames` to be either cordoned or uncrodoned based on `shouldCordon`. If `shouldCordon` is
@@ -613,7 +616,7 @@ func CreateRebootNodeCR(
613
616
}
614
617
615
618
// WaitForNodeConditionWithCheckName waits for the node to have a condition with the reason containing the specified checkName.
616
-
funcWaitForNodeConditionWithCheckName(ctx context.Context, t*testing.T, c klient.Client, nodeName, checkNamestring) {
619
+
funcWaitForNodeConditionWithCheckName(ctx context.Context, t*testing.T, c klient.Client, nodeName, checkNamestring, expectedMessagestring) {
617
620
require.Eventually(t, func() bool {
618
621
node, err:=GetNodeByName(ctx, c, nodeName)
619
622
iferr!=nil {
@@ -623,7 +626,7 @@ func WaitForNodeConditionWithCheckName(ctx context.Context, t *testing.T, c klie
623
626
624
627
// Look for a condition where the reason contains the check name
0 commit comments