Skip to content
Merged
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
19 changes: 9 additions & 10 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@ sequenceDiagram
AgentBakerCode-->>-E2E: VM Configuration
E2E->>+ARM: Create VM using fetched VM Config in cluster network
ARM-->>-E2E: VM instance
E2E->>+KubeAPI: Create test Pod
KubeAPI->>+TestPod: Perform healthcheck
TestPod-->>-KubeAPI: Healthcheck OK
KubeAPI-->>-E2E: Test Pod ready
E2E->>+KubeAPI: Execute test validators
KubeAPI->>+DebugPod: Execute test validator
DebugPod->>+VM: Execute test validator
VM-->>-DebugPod: Test results
DebugPod-->>-KubeAPI: Test results
KubeAPI-->>-E2E: Final results
E2E->>+Bastion: Create SSH Tunnel
Bastion->>+VM: Forward SSH Connection
E2E->>VM: Healthcheck via SSH Tunnel
VM-->>E2E: Healthcheck OK
E2E->>+KubeAPI: Verify Node Ready
KubeAPI-->>-E2E: Node Ready
E2E->>VM: Execute test validators via SSH Tunnel
VM-->>-E2E: Test results
Bastion-->>-E2E: Close SSH Tunnel
```

## Running Locally
Expand Down
4 changes: 3 additions & 1 deletion e2e/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ func validatePodRunning(ctx context.Context, s *Scenario, pod *corev1.Pod) error

func ValidatePodRunningWithRetry(ctx context.Context, s *Scenario, pod *corev1.Pod, maxRetries int) {
var err error
for i := 0; i < maxRetries && err != nil; i++ {
for i := range maxRetries {
err = validatePodRunning(ctx, s, pod)
if err != nil {
time.Sleep(1 * time.Second)
s.T.Logf("retrying pod %q validation (%d/%d)", pod.Name, i+1, maxRetries)
continue
}
break
}
require.NoErrorf(s.T, err, "failed to validate pod running %q", pod.Name)
}
Expand Down
Loading