Skip to content

Commit 62d4242

Browse files
committed
test: drop fragile dogfood CI-scope regression test
The test rendered the repo's own .hm/ci.py at runtime via `hm render ci`, but hm-exec intentionally strips .hm/ from the build source archive (crates/hm-exec/src/local/source.rs) to keep __pycache__/.py out of /workspace. So inside `hm run ci`'s own sandbox the pipeline can't be re-rendered and the test fails with 'no .hm/ directory found in /workspace'. Worse, cargo test is fail-fast across binaries, so this failure aborted the run before hm-dsl-engine's bundled_sources tests (the CLI-37 ones) ever executed. The --workspace change in the parent commit is the real fix; this guardrail is redundant and environment-fragile. Removing it.
1 parent 3421350 commit 62d4242

1 file changed

Lines changed: 0 additions & 32 deletions

File tree

crates/hm/tests/cmd_init.rs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -258,38 +258,6 @@ fn init_ts_templates_roundtrip_render() {
258258
}
259259
}
260260

261-
/// CLI-37 regression: the dogfood `.hm/ci.py` must test the whole workspace,
262-
/// not a single package, so dsl-engine failures surface in CI.
263-
#[test]
264-
fn dogfood_ci_tests_whole_workspace() {
265-
if !has_python() {
266-
return;
267-
}
268-
// Render the repo's own pipeline. CARGO_MANIFEST_DIR is crates/hm; the
269-
// repo root is two levels up.
270-
let repo_root = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
271-
.ancestors()
272-
.nth(2)
273-
.unwrap();
274-
let out = hm()
275-
.args(["render", "ci", "--dir"])
276-
.arg(repo_root)
277-
.assert()
278-
.success()
279-
.get_output()
280-
.stdout
281-
.clone();
282-
let json = String::from_utf8(out).unwrap();
283-
assert!(
284-
json.contains("cargo test --workspace"),
285-
"CI must run `cargo test --workspace`; render was:\n{json}"
286-
);
287-
assert!(
288-
!json.contains("cargo test -p harmont-cli"),
289-
"CI must not scope tests to a single package"
290-
);
291-
}
292-
293261
// ── skills ───────────────────────────────────────────────────────
294262

295263
#[test]

0 commit comments

Comments
 (0)