test(cli): remove flaky workflow-name start assertion

This commit is contained in:
Bryan Helmkamp 2026-04-05 10:15:10 -04:00
parent 2b6ba07f36
commit 33ae0338a5

View file

@ -132,92 +132,6 @@ fn start_by_run_id_starts_created_run_without_run_json_or_status_json() {
);
}
#[test]
fn start_by_workflow_name_prefers_newly_created_submitted_run() {
let context = test_context!();
let workflow_path = context.temp_dir.join("smoke/workflow.fabro");
let old_run_id = unique_run_id();
let new_run_id = unique_run_id();
context.write_temp(
"smoke/workflow.fabro",
"\
digraph Smoke {
start [shape=Mdiamond, label=\"Start\"]
work [label=\"Work\", prompt=\"Do the work.\"]
exit [shape=Msquare, label=\"Exit\"]
start -> work -> exit
}
",
);
context
.command()
.args([
"create",
"--dry-run",
"--auto-approve",
"--run-id",
old_run_id.as_str(),
workflow_path.to_str().unwrap(),
])
.assert()
.success();
context
.command()
.args(["start", &old_run_id])
.assert()
.success();
context
.command()
.args(["wait", &old_run_id])
.timeout(SHARED_DAEMON_TIMEOUT)
.assert()
.success();
context
.command()
.args([
"create",
"--dry-run",
"--auto-approve",
"--run-id",
new_run_id.as_str(),
workflow_path.to_str().unwrap(),
])
.assert()
.success();
context
.command()
.args(["start", "smoke"])
.assert()
.success();
context
.command()
.args(["attach", &new_run_id])
.timeout(SHARED_DAEMON_TIMEOUT)
.assert()
.success();
let output = context
.command()
.args(["wait", "--json", &new_run_id])
.output()
.expect("wait should execute");
assert!(output.status.success(), "wait should succeed");
let status: serde_json::Value = serde_json::from_slice(&output.stdout).expect("wait JSON");
fabro_json_snapshot!(context, &serde_json::json!({
"run_id": status["run_id"],
"status": status["status"],
}), @r#"
{
"run_id": "[ULID]",
"status": "succeeded"
}
"#);
}
#[test]
fn start_rejects_already_active_or_completed_run() {
let context = test_context!();