Feature 57 (config and provisioning): release the catalogue, the reviewed release branch merged with main, on top of main
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -11,7 +12,7 @@ type resource map[string]any
|
||||
type manifestShape struct {
|
||||
Module string `json:"module"`
|
||||
Capabilities []string `json:"capabilities"`
|
||||
Settings map[string]map[string]any `json:"settings"`
|
||||
Config map[string]map[string]any `json:"config"`
|
||||
Tools []string `json:"tools"`
|
||||
Resources []resource `json:"resources"`
|
||||
Build struct {
|
||||
@@ -77,3 +78,13 @@ func TestToolsAreTheManifests(t *testing.T) {
|
||||
t.Fatalf("loads: %v", tools["loads"])
|
||||
}
|
||||
}
|
||||
|
||||
// text is the file text a resource keeps in its template under files/ (novox/hq ADR 0349 §2).
|
||||
func (r resource) text(t *testing.T) string {
|
||||
t.Helper()
|
||||
raw, err := os.ReadFile(filepath.Join("../..", r["template"].(string)))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
return string(raw)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user