hub v0.143.1 (code): Reply-To on household mails (decision 174); R7 told-kernel refusal is temporary (R-898 test)
gates / gates (push) Successful in 3m21s
gates / gates (push) Successful in 3m21s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -282,3 +282,30 @@ func countOf(xs []string, x string) int {
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
// R-898: a told kernel that can no longer be installed is refused by the box BEFORE any change (R7) — temporary, never
|
||||
// "ended for good": the box stays due, and once its report offers the newer kernel the household is told again (inside
|
||||
// the 3-mail limit). COMPANION RED-PROOF (observed): add "R7" to kernelRefusedForGood → "an R7 refusal ended the step".
|
||||
func TestKernel_ToldKernelGoneIsTemporaryAndTheNewerIsOffered(t *testing.T) {
|
||||
f := newFix(t)
|
||||
f.hostWithPendingKernel(t, "hp") // pending: 7.0.14-22
|
||||
f.laneFacts(t, "hp", "c-hp", kOld, "none", "")
|
||||
r := kreport("refused", "night", false)
|
||||
r.Refused = json.RawMessage(`{"code":"R7","reason":"the simulation failed: E: Version '7.0.14-22' for 'proxmox-kernel-7.0' was not found"}`)
|
||||
f.ingest(t, "hp", r)
|
||||
if k, why := f.s.KernelDue("hp"); k != kNew {
|
||||
t.Fatalf("an R7 refusal ended the step: %q %q", k, why)
|
||||
}
|
||||
// the next night's report offers a newer kernel → that one is due, and its household mail is a new one
|
||||
f.ingest(t, "hp", Report{Layer: LayerHost, Trigger: "night", Mode: "apply", Outcome: "nothing", Healthy: true,
|
||||
Pending: []PendingPkg{{Name: "proxmox-kernel-7.0", From: "7.0.2-6", To: "7.0.14-23", Origin: []string{"Proxmox Debian Repository"}}}})
|
||||
if k, _ := f.s.KernelDue("hp"); k != "7.0.14-23-pve" {
|
||||
t.Fatalf("the newer kernel is not offered: %q", k)
|
||||
}
|
||||
var sent []string
|
||||
f.mail(&sent, nil)
|
||||
f.now = budapest(t, 10)
|
||||
if f.s.KernelNotify(); len(sent) != 1 || sent[0] != "c-hp:7.0.14-23-pve" {
|
||||
t.Fatalf("the household must be told again for the newer kernel: %v", sent)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user