summaryrefslogtreecommitdiff
path: root/service/static
diff options
context:
space:
mode:
Diffstat (limited to 'service/static')
-rw-r--r--service/static/config_test.go7
-rw-r--r--service/static/service_test.go6
2 files changed, 9 insertions, 4 deletions
diff --git a/service/static/config_test.go b/service/static/config_test.go
index 710f9c42..442d87f9 100644
--- a/service/static/config_test.go
+++ b/service/static/config_test.go
@@ -9,8 +9,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(t *testing.T) {
cfg := &mockCfg{`{"dir": "./"}`}
diff --git a/service/static/service_test.go b/service/static/service_test.go
index b9e44247..1a137cbc 100644
--- a/service/static/service_test.go
+++ b/service/static/service_test.go
@@ -33,7 +33,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 get(url string) (string, *http.Response, error) {
@@ -443,7 +444,8 @@ func Test_Files_NotForbid(t *testing.T) {
func tmpDir() string {
p := os.TempDir()
- r, _ := json.Marshal(p)
+ j := json.ConfigCompatibleWithStandardLibrary
+ r, _ := j.Marshal(p)
return string(r)
}