28 lines
834 B
Go
28 lines
834 B
Go
//go:build integration
|
|
|
|
package main
|
|
|
|
import (
|
|
"encoding/json"
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/novox/mesh-controller/internal/catalogue"
|
|
)
|
|
|
|
// The store test's manifests are manifests the controller takes in: checked here, where no store is needed,
|
|
// so a fixture the module rules refuse fails before the store test is run (repo-check of #230 at 325575b2).
|
|
func TestTheGrantsStepFixturesAreManifests(t *testing.T) {
|
|
for name, m := range map[string]map[string]any{"nats": natsFixture(), "restic-c1": resticFixture(false),
|
|
"restic-c2": resticFixture(true), "wallpaper": wallpaperFixture()} {
|
|
m["module"], m["version"] = strings.SplitN(name, "-", 2)[0], "1"
|
|
raw, err := json.Marshal(m)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if _, err := catalogue.ParseManifest(raw); err != nil {
|
|
t.Errorf("%s: %v", name, err)
|
|
}
|
|
}
|
|
}
|