G findings: mesh-config, gitea and distribution declare their finding events in the foundation form, the stream <module>-findings in streams
Builds: design 47 G A-30, §529, §577
This commit is contained in:
@@ -133,20 +133,6 @@
|
||||
"max-age-days": 7,
|
||||
"max-mib": 16
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "finding-events",
|
||||
"storage": "stream",
|
||||
"template": "events",
|
||||
"options": {
|
||||
"events": [
|
||||
"finding-written.*",
|
||||
"finding-cleared.*",
|
||||
"findings-stated.*"
|
||||
],
|
||||
"max-age-days": 7,
|
||||
"max-mib": 16
|
||||
}
|
||||
}
|
||||
],
|
||||
"capabilities": [
|
||||
@@ -293,5 +279,17 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"streams": [
|
||||
{
|
||||
"name": "distribution-findings",
|
||||
"events": [
|
||||
"finding-written.*",
|
||||
"finding-cleared.*",
|
||||
"findings-stated.*"
|
||||
],
|
||||
"max-age-days": 7,
|
||||
"max-mib": 16
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -34,20 +34,6 @@
|
||||
"options": {
|
||||
"history": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "finding-events",
|
||||
"storage": "stream",
|
||||
"template": "events",
|
||||
"options": {
|
||||
"events": [
|
||||
"finding-written.*",
|
||||
"finding-cleared.*",
|
||||
"findings-stated.*"
|
||||
],
|
||||
"max-age-days": 7,
|
||||
"max-mib": 16
|
||||
}
|
||||
}
|
||||
],
|
||||
"contributes": {
|
||||
@@ -673,5 +659,13 @@
|
||||
"git.pull-closed",
|
||||
"git.pull-merged",
|
||||
"mesh-conditions.findings-asked"
|
||||
],
|
||||
"streams": [
|
||||
{
|
||||
"name": "gitea-findings",
|
||||
"events": ["finding-written.*", "finding-cleared.*", "findings-stated.*"],
|
||||
"max-age-days": 7,
|
||||
"max-mib": 16
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -63,7 +63,9 @@ func TestEveryStateAndActHasItsTool(t *testing.T) {
|
||||
if !slices.Equal(dm.Emits, []string{ConfigChanged}) {
|
||||
t.Errorf("emits %v, want only %s: the stream carries the others", dm.Emits, ConfigChanged)
|
||||
}
|
||||
if len(dm.Streams) != 1 || dm.Streams[0].Name != StreamName || !dm.Streams[0].KeepsHistory() || !dm.Streams[0].Carries(EventRenamed) ||
|
||||
// beside the findings' stream of a foundation part, `<module>-findings` (design 47 G A-30, §529)
|
||||
if len(dm.Streams) != 2 || dm.Streams[1].Name != Module+"-findings" || !dm.Streams[1].Carries("finding-written.x") ||
|
||||
dm.Streams[0].Name != StreamName || !dm.Streams[0].KeepsHistory() || !dm.Streams[0].Carries(EventRenamed) ||
|
||||
!dm.Streams[0].Carries(EventRetiring) || !dm.Streams[0].Carries(EventRetired) || dm.Streams[0].Carries(ConfigChanged) {
|
||||
t.Errorf("streams %+v: want %s, keeping its history, carrying renamed, retiring and retired but not config-changed", dm.Streams, StreamName)
|
||||
}
|
||||
|
||||
@@ -124,22 +124,16 @@
|
||||
"retired"
|
||||
],
|
||||
"retention": "history"
|
||||
}
|
||||
],
|
||||
"requires": [
|
||||
},
|
||||
{
|
||||
"name": "finding-events",
|
||||
"storage": "stream",
|
||||
"template": "events",
|
||||
"options": {
|
||||
"events": [
|
||||
"finding-written.*",
|
||||
"finding-cleared.*",
|
||||
"findings-stated.*"
|
||||
],
|
||||
"max-age-days": 7,
|
||||
"max-mib": 16
|
||||
}
|
||||
"name": "mesh-config-findings",
|
||||
"events": [
|
||||
"finding-written.*",
|
||||
"finding-cleared.*",
|
||||
"findings-stated.*"
|
||||
],
|
||||
"max-age-days": 7,
|
||||
"max-mib": 16
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user