LEFT | RIGHT |
(no file at all) | |
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/charm" | 5 "launchpad.net/juju-core/charm" |
6 "launchpad.net/juju-core/state" | 6 "launchpad.net/juju-core/state" |
7 "sort" | 7 "sort" |
8 "strconv" | 8 "strconv" |
9 "time" | 9 "time" |
10 ) | 10 ) |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 } | 721 } |
722 } | 722 } |
723 | 723 |
724 func (s *UnitSuite) TestAnnotatorForUnit(c *C) { | 724 func (s *UnitSuite) TestAnnotatorForUnit(c *C) { |
725 testAnnotator(c, func() (state.Annotator, error) { | 725 testAnnotator(c, func() (state.Annotator, error) { |
726 return s.State.Unit("wordpress/0") | 726 return s.State.Unit("wordpress/0") |
727 }) | 727 }) |
728 } | 728 } |
729 | 729 |
730 func (s *UnitSuite) TestAnnotationRemovalForUnit(c *C) { | 730 func (s *UnitSuite) TestAnnotationRemovalForUnit(c *C) { |
731 » err := s.unit.SetAnnotation("mykey", "myvalue") | 731 » annotations := map[string]string{"mykey": "myvalue"} |
| 732 » err := s.unit.SetAnnotations(annotations) |
732 c.Assert(err, IsNil) | 733 c.Assert(err, IsNil) |
733 err = s.unit.EnsureDead() | 734 err = s.unit.EnsureDead() |
734 c.Assert(err, IsNil) | 735 c.Assert(err, IsNil) |
735 err = s.unit.Remove() | 736 err = s.unit.Remove() |
736 c.Assert(err, IsNil) | 737 c.Assert(err, IsNil) |
737 ann, err := s.unit.Annotations() | 738 ann, err := s.unit.Annotations() |
738 c.Assert(err, IsNil) | 739 c.Assert(err, IsNil) |
739 c.Assert(ann, DeepEquals, make(map[string]string)) | 740 c.Assert(ann, DeepEquals, make(map[string]string)) |
740 } | 741 } |
LEFT | RIGHT |