diff options
author | Wolfy-J <[email protected]> | 2018-09-30 19:41:11 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-09-30 19:41:11 +0300 |
commit | d110691233d09efb2286ace21f4a2240dbf2d373 (patch) | |
tree | aacc880ffc3fcfeac7089d300083d8876de43b6e /server_config_test.go | |
parent | 4816238fc22ad5207072c9d2eda328544b339d24 (diff) |
bugfix: RR_RELAY value fix
Diffstat (limited to 'server_config_test.go')
-rw-r--r-- | server_config_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/server_config_test.go b/server_config_test.go index ec29412e..429dd314 100644 --- a/server_config_test.go +++ b/server_config_test.go @@ -95,6 +95,7 @@ func Test_ServerConfig_Cmd(t *testing.T) { func Test_ServerConfig_SetEnv(t *testing.T) { cfg := &ServerConfig{ Command: "php tests/client.php pipes", + Relay: "pipes", } cfg.SetEnv("key", "value") @@ -105,6 +106,25 @@ func Test_ServerConfig_SetEnv(t *testing.T) { c := cmd() assert.Contains(t, c.Env, "KEY=value") + assert.Contains(t, c.Env, "RR_RELAY=pipes") +} + + +func Test_ServerConfig_SetEnv_Relay(t *testing.T) { + cfg := &ServerConfig{ + Command: "php tests/client.php pipes", + Relay: "unix://rr.sock", + } + + cfg.SetEnv("key", "value") + + cmd := cfg.makeCommand() + assert.NotNil(t, cmd) + + c := cmd() + + assert.Contains(t, c.Env, "KEY=value") + assert.Contains(t, c.Env, "RR_RELAY=unix://rr.sock") } func Test_ServerConfigDefaults(t *testing.T) { |