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: e2e/validation.go
+9-1
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ import (
4
4
"context"
5
5
"encoding/base64"
6
6
"fmt"
7
+
"strings"
7
8
8
9
"github.com/Azure/agentbaker/e2e/config"
9
10
"github.com/stretchr/testify/require"
@@ -38,6 +39,13 @@ func ValidateCommonLinux(ctx context.Context, s *Scenario) {
38
39
stdout:=execResult.stdout.String()
39
40
require.NotContains(s.T, stdout, "--dynamic-config-dir", "kubelet flag '--dynamic-config-dir' should not be present in /etc/default/kubelet\nContents:\n%s")
40
41
42
+
kubeletLogs:=execScriptOnVMForScenarioValidateExitCode(ctx, s, "sudo journalctl -u kubelet", 0, "could not retrieve kubelet logs with journalctl").stdout.String()
43
+
require.True(
44
+
s.T,
45
+
!strings.Contains(kubeletLogs, "unable to validate bootstrap credentials") &&strings.Contains(kubeletLogs, "kubelet bootstrap token credential is valid"),
46
+
"expected to have successfully validated bootstrap token credential before kubelet startup, but did not",
47
+
)
48
+
41
49
// the instructions belows expects the SSH key to be uploaded to the user pool VM.
42
50
// which happens as a side-effect of execCommandOnVMForScenario, it's ugly but works.
43
51
// maybe we should use a single ssh key per cluster, but need to be careful with parallel test runs.
@@ -62,7 +70,7 @@ func ValidateCommonLinux(ctx context.Context, s *Scenario) {
62
70
//"cloud-config.txt", // file with UserData
63
71
})
64
72
65
-
execResult=execScriptOnVMForScenarioValidateExitCode(ctx, s, "sudo curl http://168.63.129.16:32526/vmSettings", 0, "curl to wireserver failed")
73
+
_=execScriptOnVMForScenarioValidateExitCode(ctx, s, "sudo curl http://168.63.129.16:32526/vmSettings", 0, "curl to wireserver failed")
0 commit comments