Files
harmony/fleet/harmony-fleet-e2e/Cargo.toml
Jean-Gabriel Gill-Couture 13e5549d6b
All checks were successful
Run Check Script / check (pull_request) Successful in 2m22s
test(fleet-e2e): cold-restart regression baseline for operator
Adds the operator_restart integration test that gates scenario #1
in docs/fleet-operator-recovery-scenarios.md: when the operator Pod
is killed and replaced, the new instance must rebuild Deployment
status + desired-state KV from NATS alone, byte-for-byte matching
the pre-kill snapshot within 30 s.

Pattern: deploy via FleetOperatorScore (no handrolled manifests),
seed a Device + Deployment CR, wait for first patch, snapshot the
aggregate counts + desired-state bytes, delete the operator pod,
wait for the replacement Ready, then poll the snapshot until it
matches or the budget elapses.

Gated behind HARMONY_FLEET_E2E=1 so cargo test --workspace stays
cheap; runs in its own test binary to isolate the pod-kill blast
radius from the existing operator suite.

Step 2 of v0.3 Chapter 2. Steps 3-5 deferred.
2026-05-24 15:27:49 -04:00

67 lines
2.0 KiB
TOML

[package]
name = "harmony-fleet-e2e"
edition = "2024"
version.workspace = true
license.workspace = true
description = "In-cluster e2e harness for the fleet stack: brings up NATS + agent (and later: callout + operator + mock-OIDC) in a fresh k3d namespace per test run."
# Library + integration tests. No bin. Consumers are the integration
# tests in `tests/` plus future callers (the slimmed-down fleet_e2e_demo).
[lib]
path = "src/lib.rs"
[[test]]
name = "ping"
path = "tests/ping.rs"
[[test]]
name = "operator"
path = "tests/operator.rs"
[[test]]
name = "operator_restart"
path = "tests/operator_restart.rs"
[[test]]
name = "vm_ping"
path = "tests/vm_ping.rs"
[[test]]
name = "vm_isolation"
path = "tests/vm_isolation.rs"
[[test]]
name = "vm_deploy_lifecycle"
path = "tests/vm_deploy_lifecycle.rs"
[dependencies]
# `kvm` for the VM-side harness (ProvisionVmScore + KvmVirtualMachineHost),
# `podman` for `ReconcileScore`/`PodmanV0Score` the kv_admin helpers
# serialize into the desired-state bucket.
harmony = { path = "../../harmony", features = ["kvm", "podman"] }
harmony-fleet-auth = { path = "../harmony-fleet-auth" }
harmony-fleet-deploy = { path = "../harmony-fleet-deploy" }
harmony-fleet-operator = { path = "../harmony-fleet-operator" }
harmony-reconciler-contracts = { path = "../../harmony-reconciler-contracts" }
harmony_types = { path = "../../harmony_types" }
k3d-rs = { path = "../../k3d" }
anyhow = { workspace = true }
async-nats = { workspace = true }
async-trait = { workspace = true }
futures-util = { workspace = true }
k8s-openapi = { workspace = true }
kube = { workspace = true, features = ["runtime", "derive"] }
serde = { workspace = true }
serde_json = { workspace = true }
tempfile = "3"
thiserror = { workspace = true }
tokio = { workspace = true, features = ["full"] }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
directories = "6.0.0"
uuid = { version = "1", features = ["v4"] }
[dev-dependencies]
tokio = { workspace = true, features = ["full"] }