Skip to content

Commit 9b8d4e1

Browse files
committed
write to nodeLogs instead of e2e logs
1 parent f2ef580 commit 9b8d4e1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/extended/machines/cluster.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ var (
7777

7878
var _ = g.Describe("[sig-node] Managed cluster", func() {
7979
defer g.GinkgoRecover()
80-
var (
81-
oc = exutil.NewCLIWithPodSecurityLevel("managed-cluster-node", psapi.LevelPrivileged).AsAdmin()
82-
)
80+
oc := exutil.NewCLIWithPodSecurityLevel("managed-cluster-node", psapi.LevelPrivileged).AsAdmin()
8381

8482
var staticNodeNames []string
8583
g.It("record the number of nodes at the beginning of the tests [Early]", func() {
@@ -202,14 +200,14 @@ func getNumberOfBootsForNode(kubeClient kubernetes.Interface, namespaceName, nod
202200
if err != nil {
203201
return nil, nil, nodeLogs.String(), fmt.Errorf("failed reading pod/logs for list-boots container: --namespace=%v pods/%v: %w", actualPod.Namespace, actualPod.Name, err)
204202
}
205-
e2e.Logf("node/%v list-boots %v", nodeName, containerListBootsLogs)
203+
fmt.Fprintf(nodeLogs, "node/%v list-boots %v\n", nodeName, containerListBootsLogs)
206204

207205
// Fetch container logs with list of recorded reboots
208206
containerRebootsLogs, err := pod.GetPodLogs(ctx, kubeClient, actualPod.Namespace, actualPod.Name, "reboots")
209207
if err != nil {
210208
return nil, nil, nodeLogs.String(), fmt.Errorf("failed reading pod/logs for reboots container: --namespace=%v pods/%v: %w", actualPod.Namespace, actualPod.Name, err)
211209
}
212-
e2e.Logf("node/%v reboot-requests %v", nodeName, containerRebootsLogs)
210+
fmt.Fprintf(nodeLogs, "node/%v reboot-requests %v", nodeName, containerRebootsLogs)
213211

214212
bootInstances, err := parseBootInstances(containerListBootsLogs)
215213
if err != nil {

0 commit comments

Comments
 (0)