mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
feature #258: Updated VM tests
This commit is contained in:
1 parent
2e06f4f26d
commit
6c322afd32
1 file changed
+4
-3
@@ -254,6 +254,7 @@ public:
|
||||
vector<float> priorities;
|
||||
int hid;
|
||||
int rc;
|
||||
map<int, int> host_vms;
|
||||
|
||||
CPPUNIT_ASSERT( vmp != 0 );
|
||||
|
||||
@@ -267,7 +268,7 @@ public:
|
||||
vm = vmp->get(0);
|
||||
CPPUNIT_ASSERT( vm != 0 );
|
||||
|
||||
rc = vm->get_host(hid, hpool);
|
||||
rc = vm->get_host(hid, hpool,host_vms,1);
|
||||
CPPUNIT_ASSERT( rc == -1 );
|
||||
|
||||
// get_host will iterate in reverse order the available hosts, and
|
||||
@@ -278,7 +279,7 @@ public:
|
||||
vm->add_host( 2 );
|
||||
vm->add_host( 1 );
|
||||
|
||||
rc = vm->get_host(hid, hpool);
|
||||
rc = vm->get_host(hid, hpool,host_vms,1);
|
||||
|
||||
CPPUNIT_ASSERT( rc == 0 );
|
||||
CPPUNIT_ASSERT( hid == 4 );
|
||||
@@ -293,7 +294,7 @@ public:
|
||||
|
||||
vm->set_priorities(priorities);
|
||||
|
||||
rc = vm->get_host(hid, hpool);
|
||||
rc = vm->get_host(hid, hpool,host_vms,1);
|
||||
|
||||
CPPUNIT_ASSERT( rc == 0 );
|
||||
CPPUNIT_ASSERT( hid == 5 );
|
||||
|
||||
Reference in new issue
Block a user