Keep the hand-act log's acts 400 days, as ADR 0565 §10 has it, now that a module log may say its age; pin mesh-sdk 2e5cc4f (issue 1953)
This commit is contained in:
@@ -25,9 +25,12 @@ func TestTheManifestSaysWhatTheCodeDoes(t *testing.T) {
|
||||
Scope string `json:"scope"`
|
||||
Serves []string `json:"serves"`
|
||||
} `json:"claims"`
|
||||
Emits []string `json:"emits"`
|
||||
Reads []string `json:"reads"`
|
||||
Logs []string `json:"logs"`
|
||||
Emits []string `json:"emits"`
|
||||
Reads []string `json:"reads"`
|
||||
Logs []struct {
|
||||
Name string `json:"name"`
|
||||
MaxAgeDays int `json:"max-age-days"`
|
||||
} `json:"logs"`
|
||||
State []json.RawMessage `json:"state"`
|
||||
}
|
||||
if err := json.Unmarshal(raw, &m); err != nil {
|
||||
@@ -49,8 +52,9 @@ func TestTheManifestSaysWhatTheCodeDoes(t *testing.T) {
|
||||
for _, tool := range Tools(&Log{}) {
|
||||
tools[tool.Name] = true
|
||||
}
|
||||
if !slices.Equal(m.Logs, []string{ActsLog}) {
|
||||
t.Errorf("logs %v, want the acts as a log", m.Logs)
|
||||
// The acts are a log kept 400 days (ADR 0565 §10).
|
||||
if len(m.Logs) != 1 || m.Logs[0].Name != ActsLog || m.Logs[0].MaxAgeDays != 400 {
|
||||
t.Errorf("logs %+v, want the acts as a log kept 400 days", m.Logs)
|
||||
}
|
||||
for _, raw := range m.State {
|
||||
var name string
|
||||
@@ -61,6 +65,9 @@ func TestTheManifestSaysWhatTheCodeDoes(t *testing.T) {
|
||||
t.Errorf("the state %s has no tool that reads it", name)
|
||||
}
|
||||
}
|
||||
if !tools[readBy[ActsLog]] {
|
||||
t.Errorf("the log %s has no tool that reads it", ActsLog)
|
||||
}
|
||||
for _, r := range m.Reads {
|
||||
if !tools[readBy[r]] {
|
||||
t.Errorf("the read %s has no tool that answers it", r)
|
||||
|
||||
Reference in New Issue
Block a user