X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/139200027a3192260b5ea7c2d0c93a8eb5f8eb7e..7e7ada63bca240416584871398076c1bafc90f76:/services/keep-balance/main_test.go diff --git a/services/keep-balance/main_test.go b/services/keep-balance/main_test.go index 4a56098b29..a2804344bf 100644 --- a/services/keep-balance/main_test.go +++ b/services/keep-balance/main_test.go @@ -1,9 +1,13 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + package main import ( - "encoding/json" "time" + "github.com/ghodss/yaml" check "gopkg.in/check.v1" ) @@ -13,7 +17,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 +25,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",