Clarify managed session storage and excluded native histories
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user