R-1348: the mail of an interrupted put-back names a restore, not an off-site run (seen on the live proof); changelog: R-1347, R-1348 proven live on 9202. Commit only.
gates / gates (push) Successful in 32s
gates / gates (push) Successful in 32s
This commit is contained in:
1 parent
c4b6844d34
commit
37644458c7
4 files changed
+40
-7
No files matched your search
@@ -1,6 +1,10 @@
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"gitea.dooplex.hu/admin/felhom-controller/internal/settings"
|
||||
)
|
||||
|
||||
// R-1347 and R-1348: each seam is CALLED from main.go (an AST walk) — a seam built and never wired is the project's
|
||||
// oldest shape.
|
||||
@@ -17,3 +21,21 @@ func TestR1348_HeldNotifyIsWiredAtStartup(t *testing.T) {
|
||||
t.Fatal("main.go never calls SetHeldNotify — a failed put-back at start-up would mail nobody")
|
||||
}
|
||||
}
|
||||
|
||||
// The mail's run name for an interrupted put-back. RED (2026-11-03, live on 9202): the sink showed run_kind offsite-reconstitute for a
|
||||
// local restore.
|
||||
func TestR1348_HeldRunKind(t *testing.T) {
|
||||
for _, c := range []struct {
|
||||
h settings.RestoreHold
|
||||
want string
|
||||
}{
|
||||
{settings.RestoreHold{Reason: settings.HoldReasonRestoreMixed, MixedCause: settings.MixedCauseInterruptedPutBack}, "restore"},
|
||||
{settings.RestoreHold{RestoreKind: settings.RestoreKindLocal}, "restore"},
|
||||
{settings.RestoreHold{RestoreKind: settings.RestoreKindOffsite}, "offsite-reconstitute"},
|
||||
{settings.RestoreHold{Reason: settings.HoldReasonRestoreMixed}, "offsite-reconstitute"},
|
||||
} {
|
||||
if got := heldRunKind(c.h); got != c.want {
|
||||
t.Errorf("%+v: run kind %q, want %q", c.h, got, c.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user