Narrow the bar test to what the controller owns for a moved bar; rendering is issue 915 (issue 914)
mesh/merge-gate head c860426c555a merged into trunk a20680dfe769 — pass: builds build-agent, mesh-controller → ace, g14, novox, shanks; no bus step; every …
mesh/repo-check head c860426c555a merged into trunk a20680dfe769 — pass: its merge-check.sh passed
mesh/delivery delivered
mesh/merge-gate head c860426c555a merged into trunk a20680dfe769 — pass: builds build-agent, mesh-controller → ace, g14, novox, shanks; no bus step; every …
mesh/repo-check head c860426c555a merged into trunk a20680dfe769 — pass: its merge-check.sh passed
mesh/delivery delivered
This commit is contained in:
@@ -157,9 +157,25 @@ func TestAPieceTheHolderCannotRenderIsLeftOutAndNamedNotTheMachine(t *testing.T)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestTheCataloguesBarRendersEveryExampleOfTheShape(t *testing.T) {
|
// A moved bar is rendered by the provisioner's client, not by the controller, so the rule that its template renders
|
||||||
|
// every example of the shape is no longer judged here (issue 915, which also covers placementProblems not reading the
|
||||||
|
// collected form). What the controller still owns is that the bar's files place the blocks at all: a moved bar's
|
||||||
|
// carry the collected placement, and one that stopped placing them fails here rather than being skipped (issue 432).
|
||||||
|
func TestTheCataloguesBarPlacesBlocksAndItsShapeCoversEveryShow(t *testing.T) {
|
||||||
holder := catalogueManifest(t, "i3status-rust")
|
holder := catalogueManifest(t, "i3status-rust")
|
||||||
s, _ := SeatNamed(BarSeat)
|
s, _ := SeatNamed(BarSeat)
|
||||||
|
if holder.Moved {
|
||||||
|
placed := "${collected:contribution:" + BarSeat + ":" + BarKindBlock + ":"
|
||||||
|
found := false
|
||||||
|
for _, res := range holder.Resources {
|
||||||
|
if content, _ := res["content"].(string); strings.Contains(content, placed) {
|
||||||
|
found = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !found {
|
||||||
|
t.Fatalf("the catalogue's moved bar places no blocks: none of its files carries %s…}", placed)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if !placesKind(holder, s, BarKindBlock) {
|
if !placesKind(holder, s, BarKindBlock) {
|
||||||
// It places them since the catalogue's bar took the seat; a skip here hid a bar that stopped
|
// It places them since the catalogue's bar took the seat; a skip here hid a bar that stopped
|
||||||
// (novox/hq issue 432).
|
// (novox/hq issue 432).
|
||||||
@@ -175,6 +191,7 @@ func TestTheCataloguesBarRendersEveryExampleOfTheShape(t *testing.T) {
|
|||||||
t.Errorf("the catalogue's bar renders %v as %q: %v", ex, out, err)
|
t.Errorf("the catalogue's bar renders %v as %q: %v", ex, out, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for shows := range barShows {
|
for shows := range barShows {
|
||||||
covered := false
|
covered := false
|
||||||
for _, ex := range s.Receives[0].Shape.Examples {
|
for _, ex := range s.Receives[0].Shape.Examples {
|
||||||
|
|||||||
Reference in New Issue
Block a user