summaryrefslogtreecommitdiff
path: root/tests/plugins
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-04-06 15:15:01 +0300
committerValery Piashchynski <[email protected]>2021-04-06 15:15:01 +0300
commitad8db0ad8907fbc562123b41323b34ec6c0dec9f (patch)
tree036884e8f37d3c9abe965e487fe2eecef903ccf2 /tests/plugins
parent4e468f900e82c344269be0129624cbfcde706e26 (diff)
- Add new configuration option to the status plugin
Diffstat (limited to 'tests/plugins')
-rwxr-xr-xtests/plugins/config/config_test.go4
-rwxr-xr-xtests/plugins/config/plugin2.go2
-rw-r--r--tests/plugins/status/plugin_test.go6
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/plugins/config/config_test.go b/tests/plugins/config/config_test.go
index 79de2f59..b6063cec 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:6061"}
+ vp.Flags = []string{"rpc.listen=tcp://localhost: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:6061")
+ err = os.Setenv("SUPER_RPC_ENV", "tcp://localhost:36643")
assert.NoError(t, err)
vp := &config.Viper{}
diff --git a/tests/plugins/config/plugin2.go b/tests/plugins/config/plugin2.go
index 0fea9007..9639b170 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:6061" {
+ if allCfg.RPC.Listen != "tcp://localhost:36643" {
errCh <- errors.E(op, errors.Str("RPC.Listen should be overwritten"))
return errCh
}
diff --git a/tests/plugins/status/plugin_test.go b/tests/plugins/status/plugin_test.go
index 85e07fcf..663f4ee3 100644
--- a/tests/plugins/status/plugin_test.go
+++ b/tests/plugins/status/plugin_test.go
@@ -368,8 +368,8 @@ func checkHTTPReadiness2(t *testing.T) {
assert.NoError(t, err)
b, err := ioutil.ReadAll(r.Body)
assert.NoError(t, err)
- assert.Equal(t, 200, r.StatusCode)
- assert.Equal(t, resp2, string(b))
+ assert.Equal(t, 503, r.StatusCode)
+ assert.Equal(t, "", string(b))
err = r.Body.Close()
assert.NoError(t, err)
@@ -384,5 +384,5 @@ func checkRPCReadiness(t *testing.T) {
err = client.Call("status.Ready", "http", &st)
assert.NoError(t, err)
- assert.Equal(t, st.Code, 204)
+ assert.Equal(t, st.Code, 503)
}