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
38 lines
1.3 KiB
Go
38 lines
1.3 KiB
Go
package catalogue
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// A module version prepares its state before it runs (novox/hq ADR 0135).
|
|
//
|
|
// What the mesh derives is the module's own resource, run once with one word, placed immediately in
|
|
// front of the thing it prepares for. What matters in these tests is that the derivation is a copy
|
|
// rather than a second description: the failure it replaces was a hand-written step repeating six
|
|
// fields of the resource it preceded, each free to drift from it.
|
|
|
|
func aPreparingModule() Manifest {
|
|
return Manifest{
|
|
Module: "gitea",
|
|
Prepares: true,
|
|
Resources: []map[string]any{
|
|
{"id": "state", "type": "directory", "path": "/var/lib/gitea", "mode": "0700"},
|
|
{"id": "server", "type": "container", "name": "mesh-gitea-server",
|
|
"image": "gitea/gitea@" + digest, "ports": []any{"3000:3000"}},
|
|
{"id": "runtime", "type": "container", "name": "mesh-gitea",
|
|
"image": ArtifactStoreScheme + "gitea/runtime@" + digest, "network": "host",
|
|
"env": map[string]any{"MESH_GITEA_STATE_DIR": "/run/state"},
|
|
"volumes": []any{"/var/lib/gitea:/run/state:ro"},
|
|
"ports": []any{"9000:9000"}},
|
|
},
|
|
}
|
|
}
|
|
|
|
func idsOf(resources []map[string]any) []string {
|
|
var ids []string
|
|
for _, r := range resources {
|
|
ids = append(ids, fmt.Sprint(r["id"]))
|
|
}
|
|
return ids
|
|
}
|