From 888b6251e9fb27621a6dc9506147e163cb8dee9f Mon Sep 17 00:00:00 2001 From: Adit Sachde <23707194+aditsachde@users.noreply.github.com> Date: Tue, 1 Oct 2019 14:58:42 -0400 Subject: [PATCH] add bind test config --- common/test/config.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/test/config.go b/common/test/config.go index 08a1b398f..668e9a26e 100644 --- a/common/test/config.go +++ b/common/test/config.go @@ -106,6 +106,16 @@ func MakeConfig(configDir, kafkaURI, database, host string, startPort int) (*con cfg.Listen.PublicRoomsAPI = assignAddress() cfg.Listen.TypingServer = assignAddress() + // Bind to the same address as the listen address + // All microservices are run on the same host in testing + cfg.Bind.ClientAPI = cfg.Listen.ClientAPI + cfg.Bind.FederationAPI = cfg.Listen.FederationAPI + cfg.Bind.MediaAPI = cfg.Listen.MediaAPI + cfg.Bind.RoomServer = cfg.Listen.RoomServer + cfg.Bind.SyncAPI = cfg.Listen.SyncAPI + cfg.Bind.PublicRoomsAPI = cfg.Listen.PublicRoomsAPI + cfg.Bind.TypingServer = cfg.Listen.TypingServer + return &cfg, port, nil }