Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(520)

Side by Side Diff: state/machine_test.go

Issue 7598043: Annotation documents and Environment Entity
Patch Set: Annotation documents and Environment Entity Created 12 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 err = mysql1.UnassignFromMachine() 615 err = mysql1.UnassignFromMachine()
616 c.Assert(err, IsNil) 616 c.Assert(err, IsNil)
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() (annotator, error) { 621 testAnnotator(c, func() (annotator, error) {
622 return s.State.Machine(s.machine.Id()) 622 return s.State.Machine(s.machine.Id())
623 }) 623 })
624 } 624 }
625
626 func (s *MachineSuite) TestAnnotationRemovalForMachine(c *C) {
627 s.machine.SetAnnotation("mykey", "myvalue")
fwereade 2013/03/13 10:41:42 Error here as well.
628 err := s.machine.EnsureDead()
629 c.Assert(err, IsNil)
630 err = s.machine.Remove()
631 c.Assert(err, IsNil)
632 ann, err := s.machine.Annotations()
633 c.Assert(err, IsNil)
634 c.Assert(ann, DeepEquals, make(map[string]string))
635 }
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b