Step 9 without a build is refused, and a test says so
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user