Issue 1585, S19: the strict parser, every manifest problem function and the judge's tables (192 declarations, about 5,200 lines) and their 244 tests leave; composition keeps its own refusals and the helpers it uses. The catalogue's tests decode the manifests they build. ParseManifest, ParseManifestWith, ParseManifestForInputs, CatalogueProblems and the rest are gone; mesh-delivery-indexer/judge holds them. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
20 lines
670 B
Go
20 lines
670 B
Go
package catalogue
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// A module may declare its unhealthy urgent, with why; the module check refuses it without why and with any
|
|
// severity but urgent or warning (novox/hq ADR 0355).
|
|
|
|
func TestAnUnhealthyDeclaredUrgentIsUrgent(t *testing.T) {
|
|
m, err := decodeForTest([]byte(`{"module":"mail","version":"1",` +
|
|
`"unhealthy":{"severity":"urgent","why":"mail is refused or stuck for everyone with a mailbox"}}`))
|
|
if err != nil {
|
|
t.Fatalf("a manifest declaring its unhealthy urgent with why was refused: %v", err)
|
|
}
|
|
if !m.UnhealthyIsUrgent() {
|
|
t.Errorf("a manifest declaring its unhealthy urgent reads as not urgent: %+v", m.Unhealthy)
|
|
}
|
|
}
|