Clarify managed session storage and excluded native histories

This commit is contained in:
2026-11-06 21:40:26 +00:00
parent f06a915dc7
commit 0f49b31ca3
3 changed files with 28 additions and 2 deletions
+24
View File
@@ -202,6 +202,30 @@ func TestStorageWebsocketProtocolAndNoStartupCleanup(t *testing.T) {
if reply.Type != protocol.StorageReply || reply.ID != "storage" || reply.Storage == nil || !reply.Storage.Policy.Enabled {
t.Fatalf("wire %+v", reply)
}
if reply.Storage.Partial {
t.Fatal("a scope notice must not mark a complete inventory partial")
}
foundNotice := false
for _, warning := range reply.Storage.Warnings {
if warning == storageScopeNotice {
foundNotice = true
}
}
if !foundNotice {
t.Fatalf("wire reply omitted inventory scope notice: %+v", reply.Storage.Warnings)
}
foundSessions := false
for _, category := range reply.Storage.Categories {
if category.ID == "sessions" {
foundSessions = true
if category.Label != "Managed Pi session files" {
t.Fatalf("ambiguous session category: %q", category.Label)
}
}
}
if !foundSessions {
t.Fatal("wire reply omitted managed Pi session category")
}
if _, err := f.m.store.GetRun(ctx, id); err != nil {
t.Fatal("startup pruned run", err)
}