Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions deps/rabbitmq_peer_discovery_consul/test/system_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,24 @@ start_consul(Config) ->
ct:pal("Starting Consul daemon"),
ConsulBin = ?config(consul_bin, Config),
ConsulConfDir = ?config(consul_conf_dir, Config),
Cmd = [ConsulBin, "agent", "-config-dir", ConsulConfDir],
ConsulPid = spawn(fun() -> rabbit_ct_helpers:exec(Cmd) end),
PrivDir = ?config(priv_dir, Config),
LogFile = filename:join(PrivDir, "consul.log"),
Cmd = [ConsulBin, "agent",
"-config-dir", ConsulConfDir,
"-log-file", LogFile],
ConsulPid = spawn(fun() -> do_start_consul(Cmd) end),
rabbit_ct_helpers:set_config(Config, {consul_pid, ConsulPid}).

do_start_consul(Cmd) ->
case rabbit_ct_helpers:exec(Cmd) of
{ok, Stdout} ->
ct:pal("Consul daemon exited:~n~s", [Stdout]);
{error, Reason, Stdout} ->
ct:pal(
"Consul daemon exited with error ~0p:~n~s",
[Reason, Stdout])
end.

stop_consul(Config) ->
case rabbit_ct_helpers:get_config(Config, consul_pid) of
ConsulPid when is_pid(ConsulPid) ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ connect {

# Addresses and ports
client_addr = "0.0.0.0"
bind_addr = "{{ GetInterfaceIP \"eth0\" }}"
bind_addr = "127.0.0.1"

addresses {
grpc = "0.0.0.0"
Expand Down
Loading