mesh/delivery-group group feat/sdk1 rejected: composed together: the checker's verdict at the members' heads (428d048dd50a): unit: git.novox.be/novox/mesh-sdk/…
mesh/delivery closed: a newer head of the same pull request
mesh/check failed: unit: git.novox.be/novox/mesh-sdk/go/process.TestStatePutWritesAKeyWhole: a Put through a short blackout: 0, mesh-mail's state send…
Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
37 lines
1.1 KiB
Go
37 lines
1.1 KiB
Go
package catalogue
|
|
|
|
import (
|
|
"encoding/json"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
// A scheduled step may hold its module's own containers still while it runs (novox/hq ADR 0189).
|
|
//
|
|
// The host judges what it receives — whether each id is a container on that machine. What the
|
|
// definition is the only place to see is judged here, near whoever wrote it.
|
|
|
|
func aStoreManifest(step map[string]any) []byte {
|
|
m := map[string]any{
|
|
"module": "distribution", "version": "1",
|
|
"resources": []any{
|
|
map[string]any{"id": "store", "type": "container", "name": "mesh-registry",
|
|
"image": "registry@sha256:" + strings.Repeat("a", 64)},
|
|
step,
|
|
},
|
|
}
|
|
raw, _ := json.Marshal(m)
|
|
return raw
|
|
}
|
|
|
|
func TestAMaintenanceWindowOnItsOwnModulesContainerIsAccepted(t *testing.T) {
|
|
raw := aStoreManifest(map[string]any{
|
|
"id": "collect", "type": "container", "name": "mesh-registry-collect",
|
|
"image": "registry@sha256:" + strings.Repeat("a", 64),
|
|
"schedule": "30 3 * * *", "while-stopped": []any{"store"},
|
|
})
|
|
if _, err := decodeForTest(raw); err != nil {
|
|
t.Fatalf("a step holding its own module's container still was refused: %v", err)
|
|
}
|
|
}
|