Refuse a port given for the whole mesh where it is set, not at every node's composition (hq ADR 0100)
This commit is contained in:
@@ -214,17 +214,19 @@ func TestConsumersAreToldTheGivenPort(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// A port for the whole mesh is refused where it is set, not stored to refuse every node's
|
||||
// declaration afterwards.
|
||||
if err := open.inventory.SetSettings(ctx, "", "store",
|
||||
map[string]any{catalogue.PortsSetting: map[string]any{"5432": 5434}}); err != nil {
|
||||
t.Fatal(err)
|
||||
map[string]any{catalogue.PortsSetting: map[string]any{"5432": 5434}}); err == nil ||
|
||||
!strings.Contains(err.Error(), "per node") {
|
||||
t.Fatalf("a port given for the whole mesh was not refused: %v", err)
|
||||
}
|
||||
plan, settings, err := planFor(ctx, open, "anchor")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := declarationFor(ctx, open, "anchor", plan, settings); err == nil ||
|
||||
!strings.Contains(err.Error(), "per node") {
|
||||
t.Fatalf("a port given for the whole mesh was not refused: %v", err)
|
||||
if _, err := declarationFor(ctx, open, "anchor", plan, settings); err != nil {
|
||||
t.Fatalf("the refused mesh-wide layer was stored anyway: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user