Skip to content

Commit 9012a82

Browse files
committed
tests: clarify standalone mode simulation and rename deployAgent
Add a note to the README explaining that the standalone phase simulates a bare-metal host via a privileged pod (hostPID + hostNetwork) on the test node. Rename deployAgent to deployStandaloneAgent for clarity. Signed-off-by: Aishu Kamal <aishuk@google.com>
1 parent 3f5b2a4 commit 9012a82

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

tests/integration/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ All snapshot/restore calls go through the **Python client** (`timeslice.snapshot
1111
- `harness/` — shared framework: in-cluster client, node selection, pod lifecycle, exec/HTTP/VRAM helpers
1212
- `snapshot-agent/` — the agent suite: `standalone_test.go` / `k8s_test.go`, plus the agent specifics (`harness.go` agent deployment, `engines.go` engine specs, `agentctl.py` — a thin CLI over the Python client that builds `BackendConfig` protos from primitive flags)
1313

14+
**How the standalone mode for snapshot-agent works:** since the test suite runs inside a GKE cluster, standalone mode is simulated by deploying a privileged pod with `hostPID` and `hostNetwork` on the test node. The `make standalone` artifacts are built in the test runner and copied into this pod, which then runs the agent binary with the same GPU and PID namespace access as a host process. Long-term, standalone tests will run on an actual GPU VM.
15+
1416
## Adding a test
1517

1618
Add a `t.Run(...)` inside the engine group that provides the pods it needs, using the harness helpers:

tests/integration/snapshot-agent/harness.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func NewHarness(t *testing.T) *Harness {
9191
h.Node = h.PickNode(t)
9292
t.Logf("using node %s, mode %s", h.Node, h.Mode)
9393

94-
h.deployAgent(t)
94+
h.deployStandaloneAgent(t)
9595
return h
9696
}
9797

@@ -131,7 +131,7 @@ func NewChartHarness(t *testing.T) *Harness {
131131
return h
132132
}
133133

134-
func (h *Harness) deployAgent(t *testing.T) {
134+
func (h *Harness) deployStandaloneAgent(t *testing.T) {
135135
t.Helper()
136136
h.DeletePodAndWait(t, agentPodName)
137137

0 commit comments

Comments
 (0)