summaryrefslogtreecommitdiffstats
path: root/tests/kata.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/kata.rs')
-rw-r--r--tests/kata.rs37
1 files changed, 10 insertions, 27 deletions
diff --git a/tests/kata.rs b/tests/kata.rs
index 29a6f29..79bf9d6 100644
--- a/tests/kata.rs
+++ b/tests/kata.rs
@@ -1,9 +1,3 @@
-//! The kata backend, tested the way every gated tier here is tested: the
-//! logic runs for real on a machine with neither root nor `/dev/kvm`, and
-//! only the live-orchestrator tier skips — with a printed note, never
-//! silently absent (the convention `versions::vercmp_matches_the_system_oracle`
-//! set).
-
mod common;
use std::path::Path;
@@ -88,14 +82,8 @@ fn the_live_kata_tier_is_recorded_not_silently_absent() {
sbx.destroy().unwrap();
}
-// ---------------------------------------------------------------------------
-// agent-sandbox as a configuration, not a wish.
-//
-// `sandbox_backend = "kata"` used to fall through to loopback. The kind is
-// `agent-sandbox` now, it parses, and it produces a Kata backend — so the path
-// from a config file to the CR that would boot a VM is worth asserting end to
-// end, starting from parsed JSON rather than a hand-built request.
-// ---------------------------------------------------------------------------
+// agent-sandbox as a configuration, not a wish: the path from a config file to
+// the CR that would boot a VM, asserted end to end from parsed JSON.
/// A config file as an operator would write it, parsed by the real loader.
fn agent_sandbox_config() -> Config {
@@ -176,11 +164,9 @@ fn a_loopback_config_never_becomes_agent_sandbox_or_vice_versa() {
assert!(!id.contains("remote@"), "loopback must not report remote: {id}");
}
-/// The seam's whole claim, tested as one thing: a real package built and
-/// published through the kata lease path — a real `sandbox-agent` process, a
-/// real nonce-matched rendezvous, real frames — with a VM being the only thing
-/// this host cannot provide. If the lease path and the loopback path disagree
-/// about anything, this is where it shows.
+/// The seam's whole claim, tested as one thing: a real package built and published
+/// through the kata lease path, with a VM being the only thing this host cannot
+/// provide.
#[test]
fn a_fixture_builds_and_publishes_through_the_kata_lease_path() {
let (env, _fx) = env_with_fixture("plain-make");
@@ -210,18 +196,15 @@ fn a_fixture_builds_and_publishes_through_the_kata_lease_path() {
"the index must serve what the kata build produced: {world:?}"
);
- // And it ran inside the leased sandbox: the agent streamed the build output
- // over the wire into the same log file the SSE tail reads, and the shim saw
- // exactly one makepkg.
+ // And it ran inside the leased sandbox: the agent streamed the build output over
+ // the wire into the same log file the SSE tail reads.
let log = std::fs::read_to_string(env.cfg.build_log_path(&id)).unwrap();
assert!(log.contains("Making package"), "agent output must reach the log:\n{log}");
let shimlog = env.cfg.hooks.shim_dir.clone().unwrap();
assert_eq!(aur_build::shims::called_with(&shimlog, "makepkg", ""), 1);
- // Deliberately no assertion that the sandbox is gone: the pipeline never
- // calls `destroy`, and the design says the TTL is the guarantee and destroy
- // is courtesy (wire.rs). The lease window bounds how long a box lives, not
- // a teardown call — which is worth knowing, because it means a busy hub
- // holds up to `steps x builds` sandboxes until their TTL bites.
+ // Deliberately no assertion that the sandbox is gone: the design says the TTL is
+ // the guarantee and destroy is courtesy (wire.rs). A busy hub holds up to
+ // `steps x builds` sandboxes until their TTL bites.
}