Ejemplo n.º 1
0
func (s *backupsSuite) TestCreateOkay(c *gc.C) {
	s.setBackups(c, s.meta, "")
	var args params.BackupsCreateArgs
	result, err := s.api.Create(args)
	c.Assert(err, gc.IsNil)
	var expected params.BackupsMetadataResult
	expected.UpdateFromMetadata(s.meta)

	c.Check(result, gc.DeepEquals, expected)
}
Ejemplo n.º 2
0
func (s *backupsSuite) TestCreateNotes(c *gc.C) {
	meta := s.newMeta("this backup is important")
	s.setBackups(c, meta, "")
	args := params.BackupsCreateArgs{
		Notes: "this backup is important",
	}
	result, err := s.api.Create(args)
	c.Assert(err, gc.IsNil)
	var expected params.BackupsMetadataResult
	expected.UpdateFromMetadata(meta)
	expected.Notes = "this backup is important"

	c.Check(result, gc.DeepEquals, expected)
}