crates/gunnar-ui-server/tests/git_only_console.rs
//! **Gunnar is only a git server** (owner, 2026-11-02), and the console says so.
//!
//! Gunnar builds nothing, holds no artifacts and never verifies a build record:
//! builds run in dwarves through Build Thing, artifacts live in Holger. The
//! chain view is commit → push → log; there is no walk from an artifact, so no
//! route, no wire field and no label for one may come back.
use std::path::{Path, PathBuf};
fn at(rel: &str) -> PathBuf {
Path::new(env!("CARGO_MANIFEST_DIR")).join(rel)
}
fn read(rel: &str) -> String {
std::fs::read_to_string(at(rel)).unwrap_or_else(|e| panic!("cannot read {rel}: {e}"))
}
#[test]
fn the_console_has_no_artifact_chain() {
let serve = read("src/serve.rs");
assert!(
!serve.contains("/api/chain/artifact"),
"src/serve.rs still routes /api/chain/artifact; Gunnar never walks from an artifact"
);
let proto = read("proto/gunnar/v1/admin.proto");
assert!(
!proto.contains("string artifact_sha256"),
"the vendored admin.proto still carries VerifyChainRequest.artifact_sha256"
);
let page = read("../gunnar-ui-web/src/pages/chain.rs");
for gone in ["artifact built", "build in the build log"] {
assert!(
!page.contains(gone),
"the chain page still labels a build link ({gone:?}); the chain is commit → push → log"
);
}
}