diff options
author | Valery Piashchynski <[email protected]> | 2021-08-11 11:45:24 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-08-11 11:45:24 +0300 |
commit | 3e2e9fbd9650c44d57a41a9dc702fe93aad2b77f (patch) | |
tree | 38f25c3c0679e8510b896d001d1b7dccf21c4bd8 /tests/plugins/config | |
parent | d449d9d5aec1eec6d494064299feb1551f88ffe2 (diff) |
Replace all 'localhost' with '127.0.0.1'. Fix default configuration and
other small bugs.
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'tests/plugins/config')
-rwxr-xr-x | tests/plugins/config/config_test.go | 6 | ||||
-rwxr-xr-x | tests/plugins/config/configs/.rr.yaml | 2 | ||||
-rwxr-xr-x | tests/plugins/config/plugin1.go | 2 | ||||
-rwxr-xr-x | tests/plugins/config/plugin2.go | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/tests/plugins/config/config_test.go b/tests/plugins/config/config_test.go index b6063cec..87ab1eaa 100755 --- a/tests/plugins/config/config_test.go +++ b/tests/plugins/config/config_test.go @@ -97,7 +97,7 @@ func TestConfigOverwriteValid(t *testing.T) { vp := &config.Viper{} vp.Path = "configs/.rr.yaml" vp.Prefix = "rr" - vp.Flags = []string{"rpc.listen=tcp://localhost:36643"} + vp.Flags = []string{"rpc.listen=tcp://127.0.0.1:36643"} err = container.RegisterAll( &logger.ZapLogger{}, @@ -143,7 +143,7 @@ func TestConfigEnvVariables(t *testing.T) { t.Fatal(err) } - err = os.Setenv("SUPER_RPC_ENV", "tcp://localhost:36643") + err = os.Setenv("SUPER_RPC_ENV", "tcp://127.0.0.1:36643") assert.NoError(t, err) vp := &config.Viper{} @@ -194,7 +194,7 @@ func TestConfigEnvVariablesFail(t *testing.T) { t.Fatal(err) } - err = os.Setenv("SUPER_RPC_ENV", "tcp://localhost:6065") + err = os.Setenv("SUPER_RPC_ENV", "tcp://127.0.0.1:6065") assert.NoError(t, err) vp := &config.Viper{} diff --git a/tests/plugins/config/configs/.rr.yaml b/tests/plugins/config/configs/.rr.yaml index f449dcf3..575cdd33 100755 --- a/tests/plugins/config/configs/.rr.yaml +++ b/tests/plugins/config/configs/.rr.yaml @@ -1,5 +1,5 @@ rpc: - listen: tcp://localhost:6060 + listen: tcp://127.0.0.1:6060 logs: mode: development diff --git a/tests/plugins/config/plugin1.go b/tests/plugins/config/plugin1.go index 1de9a02e..08a48a4f 100755 --- a/tests/plugins/config/plugin1.go +++ b/tests/plugins/config/plugin1.go @@ -83,7 +83,7 @@ func (f *Foo) Serve() chan error { return errCh } - if allCfg.RPC.Listen != "tcp://localhost:6060" { + if allCfg.RPC.Listen != "tcp://127.0.0.1:6060" { errCh <- errors.E(op, errors.Str("RPC.Listen should be parsed")) return errCh } diff --git a/tests/plugins/config/plugin2.go b/tests/plugins/config/plugin2.go index 9639b170..8c6f36c1 100755 --- a/tests/plugins/config/plugin2.go +++ b/tests/plugins/config/plugin2.go @@ -37,7 +37,7 @@ func (f *Foo2) Serve() chan error { return errCh } - if allCfg.RPC.Listen != "tcp://localhost:36643" { + if allCfg.RPC.Listen != "tcp://127.0.0.1:36643" { errCh <- errors.E(op, errors.Str("RPC.Listen should be overwritten")) return errCh } |