summaryrefslogtreecommitdiffstats
path: root/tests/kata.rs
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-20 21:12:59 +0000
committeraur-build <aur-build@localhost>2026-11-20 21:12:59 +0000
commit72dcae2a04644609a30a90200edca368d131d600 (patch)
tree8eb16225659e4a977deeec38b29c94420ff256b0 /tests/kata.rs
parent2210c934d4a25602318f094e0eca72f42862d44a (diff)
downloadaur-build-72dcae2a04644609a30a90200edca368d131d600.tar.gz
aur-build-72dcae2a04644609a30a90200edca368d131d600.zip
http, config, sandbox: apply the rest of the dispositions
Five http items were being counted as test-pinned on the strength of a string alone, and are now `pub(crate)`: render::Attention the word appears in crash.rs inside a message Res::html "text/html" is a content type, not a call Res::redirect "redirect" appears in an assertion message routes::logout "/logout" is a route path routes::route "mutating route" appears in an assertion message Nothing in the test tier calls any of them; each carries a comment saying so, because "the census said a test needed this" is not a reason and will be re-asked by the next person to read the line. `config::TestHooks` was already half-gated — the `hooks` field and the `Default` line that fills it are both behind `test-support` — while the type and its impl were not, so a release binary compiled a struct it could never construct, read, or deserialize. Now gated whole. The live kata tier moved into `src/sandbox/kata.rs`. It is not a fixture test: it records its own absence without /dev/kvm or AUR_KATA_API, the same way the vercmp live tier does. It was the only thing outside the module naming `K8sSandboxProvisioner` field by field, so that struct is `pub(crate)` now too. One correction to the table, and it is the kind of correction a heuristic deserves: `http::cookie` and `http::login` were classified `move-test` because their tests contain no harness keyword. They do — `Web::` starts a real HTTP listener, and a test that talks to one is not a unit test however little code it holds. The detector now knows that, and both items are residue, which is what they always were. http: 27 pub -> 22 pub. Test-only items across the crate: 52 -> 46. Suite: 284 passed, 0 failed, 0 ignored. Clippy clean.
Diffstat (limited to 'tests/kata.rs')
-rw-r--r--tests/kata.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/tests/kata.rs b/tests/kata.rs
index a0c61fa..a87a800 100644
--- a/tests/kata.rs
+++ b/tests/kata.rs
@@ -1,6 +1,5 @@
mod common;
-use std::path::Path;
use std::sync::Arc;
use std::time::Duration;
@@ -55,33 +54,6 @@ fn a_provisioned_sandbox_rendezvous_and_runs_a_command() {
}
#[test]
-fn the_live_kata_tier_is_recorded_not_silently_absent() {
- if !Path::new("/dev/kvm").exists() {
- println!("note: no /dev/kvm on this host; the live kata tier is skipped, not passed");
- return;
- }
- let Ok(api) = std::env::var("AUR_KATA_API") else {
- println!("note: /dev/kvm present but AUR_KATA_API unset; live kata tier still skipped");
- return;
- };
- let cfg = Config::default();
- let prov = Arc::new(aur_build::sandbox::kata::K8sSandboxProvisioner {
- api,
- bearer: std::env::var("AUR_KATA_TOKEN").unwrap_or_default(),
- namespace: std::env::var("AUR_KATA_NS").unwrap_or_else(|_| "default".into()),
- });
- let backend = KataBackend::bind(&cfg, "0.0.0.0:9443", &std::env::var("AUR_AGENT_TOKEN").unwrap(), prov).unwrap();
- let sbx = backend
- .acquire(&SandboxSpec::new("extra-x86_64", "live", Duration::from_secs(300)))
- .expect("live kata sandbox should lease");
- let out = sbx.run(&Cmd::new(["/bin/echo", "kata"]), &mut |_| {}).unwrap();
- assert!(out.success() && String::from_utf8_lossy(&out.stdout).contains("kata"));
- sbx.destroy().unwrap();
-}
-
-
-
-#[test]
fn agent_sandbox_is_a_backend_not_a_fallthrough_to_loopback() {
let cfg = agent_sandbox_config();
let backend = aur_build::sandbox::backend_for(&cfg).unwrap();