package bot import "testing" func TestConnectBrokerURLDefault(t *testing.T) { // Unset → the shared broker default (matches the Node runtime, which // defaults it inline; an instance sets only its per-instance token). t.Setenv("LCHAT_CONNECT_BROKER_URL", "") if got := loadConnectConfig().brokerURL; got != defaultBrokerURL { t.Errorf("default broker URL: got %q, want %q", got, defaultBrokerURL) } // A self-hosted broker overrides. t.Setenv("LCHAT_CONNECT_BROKER_URL", "https://connect.example.com") if got := loadConnectConfig().brokerURL; got != "https://connect.example.com" { t.Errorf("override broker URL: got %q", got) } }