コード例 #1
0
ファイル: marshal_test.go プロジェクト: howbazaar/juju
func (s *marshalSuite) TestMarshalIndex(c *gc.C) {
	index, legacyIndex, err := tools.MarshalToolsMetadataIndexJSON(s.streamMetadata, time.Unix(0, 0).UTC())
	c.Assert(err, jc.ErrorIsNil)
	assertIndex(c, index, expectedIndex)
	assertIndex(c, legacyIndex, expectedLegacyIndex)
}
コード例 #2
0
ファイル: marshal_test.go プロジェクト: jiasir/juju
func (s *marshalSuite) TestMarshalIndex(c *gc.C) {
	index, err := tools.MarshalToolsMetadataIndexJSON(toolMetadataForTesting, time.Unix(0, 0).UTC())
	c.Assert(err, gc.IsNil)
	c.Assert(string(index), gc.Equals, expectedIndex)
}