Genesis registers the control plane with the manifest its build produced (hq issue 072) #17

Merged
jschoubben merged 3 commits from feat/one-controller-manifest into main 2026-09-21 17:23:18 +00:00
Showing only changes of commit ffe7dbd348 - Show all commits
+18
View File
@@ -307,3 +307,21 @@ func TestABrokerSettingReadFromAFileIsDeliveredToo(t *testing.T) {
t.Fatal("a plain path variable was taken for a secret")
}
}
// Step 9 with nothing built is a caller's fault, and it stops rather than pretending to pivot.
func TestTheControlPlaneCannotBeInstalledWithoutABuild(t *testing.T) {
runtime := &asked{answer: aMeshThatAgrees(map[string]string{})}
control := controlPlane{container: "temp-mesh-controller", run: runtime.run, timeout: time.Second}
rewritten, err := Rewrite(theRealBundle(t), held)
if err != nil {
t.Fatal(err)
}
_, err = InstallControlPlane(context.Background(), installing(t, t.TempDir()),
Deps{Run: runtime.run}, control, rewritten.Declaration, Built{}, pushedReference, func(string) {})
if err == nil || !strings.Contains(err.Error(), "was not built") {
t.Fatalf("a missing build was not refused: %v", err)
}
if runtime.ran("module add") {
t.Error("something was registered without a manifest")
}
}