summaryrefslogtreecommitdiff
path: root/service/limit
diff options
context:
space:
mode:
Diffstat (limited to 'service/limit')
-rw-r--r--service/limit/config_test.go7
-rw-r--r--service/limit/service_test.go3
2 files changed, 7 insertions, 3 deletions
diff --git a/service/limit/config_test.go b/service/limit/config_test.go
index 72c4bde8..c79836b8 100644
--- a/service/limit/config_test.go
+++ b/service/limit/config_test.go
@@ -10,8 +10,11 @@ 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) Get(name string) service.Config { return nil }
+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{`{"enable: true}`}
diff --git a/service/limit/service_test.go b/service/limit/service_test.go
index eab80af9..5f6ff183 100644
--- a/service/limit/service_test.go
+++ b/service/limit/service_test.go
@@ -37,7 +37,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)
if cl, ok := out.(*Config); ok {
// to speed up tests