mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 05:04:56 +09:00
M #-: Fix minor bug in GOCA tests (#3486)
This commit is contained in:
1 parent
17b1b8628b
commit
b4aedb465a
1 file changed
+11
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user