~dstroppa/juju-core/joyent-provider-storage

« back to all changes in this revision

Viewing changes to cmd/juju/addmachine_test.go

  • Committer: Daniele Stroppa
  • Date: 2014-01-08 15:58:10 UTC
  • mfrom: (1953.1.231 juju-core)
  • Revision ID: daniele.stroppa@joyent.com-20140108155810-xecbwrqkb5i0fyoe
Merging trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
 
76
76
func (s *AddMachineSuite) TestAddContainerToNewMachine(c *gc.C) {
77
77
        for i, ctype := range instance.ContainerTypes {
78
 
                err := runAddMachine(c, fmt.Sprintf("%s", ctype))
 
78
                c.Logf("test %d: %s", i, ctype)
 
79
                err := runAddMachine(c, string(ctype))
79
80
                c.Assert(err, gc.IsNil)
80
81
                s._assertAddContainer(c, strconv.Itoa(i), fmt.Sprintf("%d/%s/0", i, ctype), ctype)
81
82
        }
99
100
        c.Assert(err, gc.IsNil)
100
101
        m, err := s.State.Machine("0")
101
102
        c.Assert(err, gc.IsNil)
102
 
        m.AddSupportedContainers([]instance.ContainerType{instance.KVM})
 
103
        m.SetSupportedContainers([]instance.ContainerType{instance.KVM})
103
104
        err = runAddMachine(c, "lxc:0")
104
 
        c.Assert(err, gc.ErrorMatches, "cannot add a new container: machine 0 cannot host lxc containers")
 
105
        c.Assert(err, gc.ErrorMatches, "cannot add a new machine: machine 0 cannot host lxc containers")
105
106
}
106
107
 
107
108
func (s *AddMachineSuite) TestAddMachineErrors(c *gc.C) {