Take the foundation's ports as genesis inputs, check them free, and hand them to the controller as the node's settings (hq ADR 0100)
This commit is contained in:
@@ -5,10 +5,10 @@ import "testing"
|
||||
// The endpoint other machines dial defaults to the host they already dial — the broker's — on
|
||||
// WireGuard's port. One fact, not two that drift.
|
||||
func TestTheEndpointDerivesFromTheBrokerAddress(t *testing.T) {
|
||||
if got := derivedEndpoint("192.0.2.10:5671"); got != "192.0.2.10:51820" {
|
||||
if got := derivedEndpoint("192.0.2.10:5671", 51820); got != "192.0.2.10:51820" {
|
||||
t.Fatalf("derived %q", got)
|
||||
}
|
||||
if got := derivedEndpoint(""); got != "" {
|
||||
if got := derivedEndpoint("", 51820); got != "" {
|
||||
t.Fatalf("an endpoint was invented from nothing: %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user