OLD | NEW |
1 package state_test | 1 package state_test |
2 | 2 |
3 import ( | 3 import ( |
4 . "launchpad.net/gocheck" | 4 . "launchpad.net/gocheck" |
5 "launchpad.net/juju-core/state" | 5 "launchpad.net/juju-core/state" |
6 "launchpad.net/juju-core/version" | 6 "launchpad.net/juju-core/version" |
7 "sort" | 7 "sort" |
8 "time" | 8 "time" |
9 ) | 9 ) |
10 | 10 |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 assertChange("mysql/1", "logging/0") | 617 assertChange("mysql/1", "logging/0") |
618 } | 618 } |
619 | 619 |
620 func (s *MachineSuite) TestAnnotatorForMachine(c *C) { | 620 func (s *MachineSuite) TestAnnotatorForMachine(c *C) { |
621 testAnnotator(c, func() (state.Annotator, error) { | 621 testAnnotator(c, func() (state.Annotator, error) { |
622 return s.State.Machine(s.machine.Id()) | 622 return s.State.Machine(s.machine.Id()) |
623 }) | 623 }) |
624 } | 624 } |
625 | 625 |
626 func (s *MachineSuite) TestAnnotationRemovalForMachine(c *C) { | 626 func (s *MachineSuite) TestAnnotationRemovalForMachine(c *C) { |
627 » err := s.machine.SetAnnotation("mykey", "myvalue") | 627 » annotations := map[string]string{"mykey": "myvalue"} |
| 628 » err := s.machine.SetAnnotations(annotations) |
628 c.Assert(err, IsNil) | 629 c.Assert(err, IsNil) |
629 err = s.machine.EnsureDead() | 630 err = s.machine.EnsureDead() |
630 c.Assert(err, IsNil) | 631 c.Assert(err, IsNil) |
631 err = s.machine.Remove() | 632 err = s.machine.Remove() |
632 c.Assert(err, IsNil) | 633 c.Assert(err, IsNil) |
633 ann, err := s.machine.Annotations() | 634 ann, err := s.machine.Annotations() |
634 c.Assert(err, IsNil) | 635 c.Assert(err, IsNil) |
635 c.Assert(ann, DeepEquals, make(map[string]string)) | 636 c.Assert(ann, DeepEquals, make(map[string]string)) |
636 } | 637 } |
OLD | NEW |