~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/provider/vsphere/environ_instance_test.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
func (s *environAvailzonesSuite) TestInstances(c *gc.C) {
29
29
        client := vsphere.ExposeEnvFakeClient(s.Env)
30
30
        client.SetPropertyProxyHandler("FakeDatacenter", vsphere.RetrieveDatacenterProperties)
31
 
        vmName1 := common.MachineFullName(s.Env, "1")
32
 
        vmName2 := common.MachineFullName(s.Env, "2")
 
31
        vmName1 := common.MachineFullName(s.Env.Config().UUID(), "1")
 
32
        vmName2 := common.MachineFullName(s.Env.Config().UUID(), "2")
33
33
        s.FakeInstancesWithResourcePool(client, vsphere.InstRp{Inst: vmName1, Rp: "rp1"}, vsphere.InstRp{Inst: vmName2, Rp: "rp2"})
34
34
 
35
35
        instances, err := s.Env.Instances([]instance.Id{instance.Id(vmName1), instance.Id(vmName2)})
53
53
func (s *environAvailzonesSuite) TestInstancesReturnPartialInstances(c *gc.C) {
54
54
        client := vsphere.ExposeEnvFakeClient(s.Env)
55
55
        client.SetPropertyProxyHandler("FakeDatacenter", vsphere.RetrieveDatacenterProperties)
56
 
        vmName1 := common.MachineFullName(s.Env, "1")
57
 
        vmName2 := common.MachineFullName(s.Env, "2")
 
56
        vmName1 := common.MachineFullName(s.Env.Config().UUID(), "1")
 
57
        vmName2 := common.MachineFullName(s.Env.Config().UUID(), "2")
58
58
        s.FakeInstancesWithResourcePool(client, vsphere.InstRp{Inst: vmName1, Rp: "rp1"}, vsphere.InstRp{Inst: "Some inst", Rp: "rp2"})
59
59
 
60
60
        _, err := s.Env.Instances([]instance.Id{instance.Id(vmName1), instance.Id(vmName2)})