M #-: Fix minor bug in GOCA tests (#3486)

This commit is contained in:
Christian González authored and Tino Vázquez committed 2019-07-08 12:32:30 +02:00
1 parent 17b1b8628b
commit b4aedb465a
1 file changed
+11
+11
View File
@@ -204,6 +204,15 @@ func (s *VMSuite) TestVMResume(c *C) {
}
func (s *VMSuite) TestVMResize(c *C) {
expectHostState := func(host *Host) func() bool {
return func() bool {
host.Info()
state, _ := host.StateString()
return state == "MONITORED"
}
}
vm := NewVM(s.vmID)
err := vm.Deploy(s.hostID, false, -1)
c.Assert(err, IsNil)
@@ -213,6 +222,8 @@ func (s *VMSuite) TestVMResize(c *C) {
c.Assert(err, IsNil)
c.Assert(WaitResource(VMExpectState(c, vm, "POWEROFF", "")), Equals, true)
c.Assert(WaitResource(expectHostState(NewHost(s.hostID))), Equals, true)
err = vm.Resize("CPU=2.5\nMEMORY=512", false)
c.Assert(err, IsNil)
c.Assert(WaitResource(VMExpectState(c, vm, "POWEROFF", "")), Equals, true)