cmd/mbf: cancel remote cure
Some checks failed
Test / Create distribution (push) Failing after 59s
Test / Sandbox (push) Successful in 2m51s
Test / Hakurei (push) Failing after 3m41s
Test / ShareFS (push) Failing after 3m46s
Test / Sandbox (race detector) (push) Successful in 5m11s
Test / Hakurei (race detector) (push) Failing after 6m17s
Test / Flake checks (push) Has been skipped

This exposes the new fine-grained cancel API in cmd/mbf.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-04-17 21:30:00 +09:00
parent ae9b9adfd2
commit 30182a7134
3 changed files with 163 additions and 8 deletions

View File

@@ -109,6 +109,11 @@ func TestDaemon(t *testing.T) {
if err != nil {
t.Fatalf("cureRemote: error = %v", err)
}
if err = cancelRemote(ctx, &addr, pkg.NewFile("nonexistent", nil)); err != nil {
t.Fatalf("cancelRemote: error = %v", err)
}
cancel()
<-done
@@ -118,6 +123,7 @@ func TestDaemon(t *testing.T) {
}
const wantLog = `daemon: fulfilled artifact fiZf-ZY_Yq6qxJNrHbMiIPYCsGkUiKCRsZrcSELXTqZWtCnESlHmzV5ThhWWGGYG
daemon: attempted to cancel invalid artifact kQm9fmnCmXST1-MMmxzcau2oKZCXXrlZydo4PkeV5hO_2PKfeC8t98hrbV_ZZx_j
`
if gotLog := buf.String(); gotLog != wantLog {
t.Errorf("serve: logged\n%s\nwant\n%s", gotLog, wantLog)