예제 #1
0
파일: backups_test.go 프로젝트: kapilt/juju
func (s *backupSuite) TestAddBackupMetadataEmpty(c *gc.C) {
	original := metadata.Metadata{}
	c.Assert(original.Timestamp(), gc.NotNil)
	_, err := state.AddBackupMetadata(s.State, &original)

	c.Check(err, gc.NotNil)
}
예제 #2
0
파일: backups_test.go 프로젝트: kapilt/juju
func (s *backupSuite) checkMetadata(
	c *gc.C, metadata, expected *metadata.Metadata, id string,
) {
	if id != "" {
		c.Check(metadata.ID(), gc.Equals, id)
	}
	c.Check(metadata.Notes(), gc.Equals, expected.Notes())
	c.Check(metadata.Timestamp().Unix(), gc.DeepEquals, expected.Timestamp().Unix())
	c.Check(metadata.Checksum(), gc.Equals, expected.Checksum())
	c.Check(metadata.ChecksumFormat(), gc.Equals, expected.ChecksumFormat())
	c.Check(metadata.Size(), gc.Equals, expected.Size())
	c.Check(metadata.Origin(), gc.DeepEquals, expected.Origin())
	c.Check(metadata.Stored(), gc.DeepEquals, expected.Stored())
}