summaryrefslogtreecommitdiff
path: root/service/health
diff options
context:
space:
mode:
Diffstat (limited to 'service/health')
-rw-r--r--service/health/config_test.go7
-rw-r--r--service/health/service_test.go5
2 files changed, 8 insertions, 4 deletions
diff --git a/service/health/config_test.go b/service/health/config_test.go
index 9068f2ca..ba7d7c12 100644
--- a/service/health/config_test.go
+++ b/service/health/config_test.go
@@ -1,7 +1,7 @@
package health
import (
- "encoding/json"
+ json "github.com/json-iterator/go"
"testing"
"github.com/spiral/roadrunner/service"
@@ -11,7 +11,10 @@ import (
type mockCfg struct{ cfg string }
func (cfg *mockCfg) Get(name string) service.Config { return nil }
-func (cfg *mockCfg) Unmarshal(out interface{}) error { return json.Unmarshal([]byte(cfg.cfg), out) }
+func (cfg *mockCfg) Unmarshal(out interface{}) error {
+ j := json.ConfigCompatibleWithStandardLibrary
+ return j.Unmarshal([]byte(cfg.cfg), out)
+}
func Test_Config_Hydrate_Error1(t *testing.T) {
cfg := &mockCfg{`{"address": "localhost:8080"}`}
diff --git a/service/health/service_test.go b/service/health/service_test.go
index e8685548..fc743a62 100644
--- a/service/health/service_test.go
+++ b/service/health/service_test.go
@@ -1,7 +1,7 @@
package health
import (
- "encoding/json"
+ json "github.com/json-iterator/go"
"io/ioutil"
"net/http"
"testing"
@@ -33,7 +33,8 @@ func (cfg *testCfg) Get(name string) service.Config {
}
func (cfg *testCfg) Unmarshal(out interface{}) error {
- err := json.Unmarshal([]byte(cfg.target), out)
+ j := json.ConfigCompatibleWithStandardLibrary
+ err := j.Unmarshal([]byte(cfg.target), out)
return err
}