summaryrefslogtreecommitdiff
path: root/service/metrics/config_test.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-03-21 01:03:13 +0300
committerValery Piashchynski <[email protected]>2020-03-21 01:03:13 +0300
commit314b161695daae7dfa8739afb1865a3be5ff53ca (patch)
treec1342d6c7a1f9ab0f786c2a4572ac0d0e2b818df /service/metrics/config_test.go
parent96e6686c5fa55e5b055fe3d7a4635e272e69c3ac (diff)
Update GHA, go1.14 vendored mode
Update Makefile, add go vendor (go 1.14 + php hack) Update usage of new json package
Diffstat (limited to 'service/metrics/config_test.go')
-rw-r--r--service/metrics/config_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/service/metrics/config_test.go b/service/metrics/config_test.go
index 4b223905..a64e9047 100644
--- a/service/metrics/config_test.go
+++ b/service/metrics/config_test.go
@@ -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{`{"request": {"From": "Something"}}`}