summaryrefslogtreecommitdiff
path: root/service/gzip
diff options
context:
space:
mode:
Diffstat (limited to 'service/gzip')
-rw-r--r--service/gzip/config_test.go5
-rw-r--r--service/gzip/service_test.go3
2 files changed, 6 insertions, 2 deletions
diff --git a/service/gzip/config_test.go b/service/gzip/config_test.go
index 1913af64..c2168166 100644
--- a/service/gzip/config_test.go
+++ b/service/gzip/config_test.go
@@ -10,7 +10,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(t *testing.T) {
cfg := &mockCfg{`{"enable": true}`}
diff --git a/service/gzip/service_test.go b/service/gzip/service_test.go
index 81c2aed3..778bdacd 100644
--- a/service/gzip/service_test.go
+++ b/service/gzip/service_test.go
@@ -27,7 +27,8 @@ func (cfg *testCfg) Get(name string) service.Config {
return nil
}
func (cfg *testCfg) Unmarshal(out interface{}) error {
- return json.Unmarshal([]byte(cfg.target), out)
+ j := json.ConfigCompatibleWithStandardLibrary
+ return j.Unmarshal([]byte(cfg.target), out)
}
func Test_Disabled(t *testing.T) {