Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions e2e/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ func ValidateCommonLinux(ctx context.Context, s *Scenario) {

// ensure that no unexpected systemd units are in a failed state
ValidateNoFailedSystemdUnits(ctx, s)
ValidateStaleCachedKubeBinariesRemoved(ctx, s)
}

func ValidateCommonWindows(ctx context.Context, s *Scenario) {
Expand Down
13 changes: 13 additions & 0 deletions e2e/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -2577,6 +2577,19 @@ func ValidateScriptlessNBCCSECmd(ctx context.Context, s *Scenario) {
}
}

// ValidateStaleCachedKubeBinariesRemoved validates that stale versioned kube binaries (e.g. kubelet-1.29.0, kubectl-1.29.0)
// have been removed from /opt/bin/ after the correct version is installed.
func ValidateStaleCachedKubeBinariesRemoved(ctx context.Context, s *Scenario) {
s.T.Helper()
// List any remaining versioned kubelet/kubectl binaries in /opt/bin/
cmd := `find /opt/bin -maxdepth 1 \( -name "kubelet-*" -o -name "kubectl-*" \) -type f 2>/dev/null`
Comment on lines +2584 to +2585
Comment on lines +2584 to +2585
Comment on lines +2584 to +2585
Comment thread
Devinwong marked this conversation as resolved.
result := execScriptOnVMForScenarioValidateExitCode(ctx, s, cmd, 0, "could not list stale cached binaries")
staleFiles := strings.TrimSpace(result.stdout)
if staleFiles != "" {
s.T.Fatalf("expected no stale cached binaries in /opt/bin/, but found:\n%s", staleFiles)
}
}

// ValidateRxBufferDefault validates rx buffer config using default values based on VM's CPU count
func ValidateRxBufferDefault(ctx context.Context, s *Scenario) {
s.T.Helper()
Expand Down
Loading