X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0a98952530fb465fa31566fa5e0192bea9fc16e4..a19ffad966b25b3869e666f749f7c6da187bef68:/services/keep-balance/main_test.go diff --git a/services/keep-balance/main_test.go b/services/keep-balance/main_test.go index 4a56098b29..157ee4574b 100644 --- a/services/keep-balance/main_test.go +++ b/services/keep-balance/main_test.go @@ -1,9 +1,9 @@ package main import ( - "encoding/json" "time" + "github.com/ghodss/yaml" check "gopkg.in/check.v1" ) @@ -13,7 +13,7 @@ type mainSuite struct{} func (s *mainSuite) TestExampleJSON(c *check.C) { var config Config - c.Check(json.Unmarshal(exampleConfigFile, &config), check.IsNil) + c.Check(yaml.Unmarshal(exampleConfigFile, &config), check.IsNil) c.Check(config.KeepServiceTypes, check.DeepEquals, []string{"disk"}) c.Check(config.Client.AuthToken, check.Equals, "xyzzy") c.Check(time.Duration(config.RunPeriod), check.Equals, 600*time.Second) @@ -21,8 +21,7 @@ func (s *mainSuite) TestExampleJSON(c *check.C) { func (s *mainSuite) TestConfigJSONWithKeepServiceList(c *check.C) { var config Config - c.Check(json.Unmarshal([]byte(` - { + c.Check(yaml.Unmarshal([]byte(`{ "Client": { "APIHost": "zzzzz.arvadosapi.com:443", "AuthToken": "xyzzy",