6 "git.curoverse.com/arvados.git/sdk/go/arvados"
8 check "gopkg.in/check.v1"
11 var _ = check.Suite(&changeSetSuite{})
13 type changeSetSuite struct{}
15 func (s *changeSetSuite) TestJSONFormat(c *check.C) {
17 KeepService: arvados.KeepService{
18 UUID: "zzzzz-bi6l4-000000000000001",
20 ServiceSSLFlag: false,
21 ServiceHost: "keep1.zzzzz.arvadosapi.com",
24 buf, err := json.Marshal([]Pull{{
25 SizedDigest: arvados.SizedDigest("acbd18db4cc2f85cedef654fccc4a4d8+3"),
27 c.Check(err, check.IsNil)
28 c.Check(string(buf), check.Equals, `[{"locator":"acbd18db4cc2f85cedef654fccc4a4d8","servers":["http://keep1.zzzzz.arvadosapi.com:25107"]}]`)
30 buf, err = json.Marshal([]Trash{{
31 SizedDigest: arvados.SizedDigest("acbd18db4cc2f85cedef654fccc4a4d8+3"),
33 c.Check(err, check.IsNil)
34 c.Check(string(buf), check.Equals, `[{"locator":"acbd18db4cc2f85cedef654fccc4a4d8","block_mtime":123456789}]`)