1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #1112: Fix compilation of unit tests

This commit is contained in:
Ruben S. Montero 2012-02-26 22:08:27 +01:00
parent 37e25141de
commit 31be0a2000
2 changed files with 16 additions and 19 deletions

View File

@ -48,7 +48,6 @@ static int hid = 123;
static string hostname = "test_hostname";
static string vmm_mad = "vmm_mad";
static string vnm_mad = "vnm_mad";
static string vmdir = "vmdir";
class LifeCycleManagerTest : public OneUnitTest
{
@ -225,7 +224,7 @@ private:
vm->lock();
vm->add_history(hid,hostname,vmdir,vmm_mad,vnm_mad);
vm->add_history(hid,hostname,vmm_mad,vnm_mad);
rc = vmpool->update_history(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -489,7 +488,7 @@ public:
{
vm = allocate_running(0);
vm->add_history(hid,hostname,vmdir,vmm_mad,vnm_mad);
vm->add_history(hid,hostname,vmm_mad,vnm_mad);
rc = vmpool->update_history(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -573,7 +572,7 @@ public:
{
vm = allocate_running(0);
vm->add_history(hid,hostname,vmdir,vmm_mad,vnm_mad);
vm->add_history(hid,hostname,vmm_mad,vnm_mad);
rc = vmpool->update_history(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -594,7 +593,7 @@ public:
{
vm = allocate_running(0);
vm->add_history(hid,hostname,vmdir,vmm_mad,vnm_mad);
vm->add_history(hid,hostname,vmm_mad,vnm_mad);
rc = vmpool->update_history(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -615,7 +614,7 @@ public:
{
vm = allocate_running(0);
vm->add_history(hid,hostname,vmdir,vmm_mad,vnm_mad);
vm->add_history(hid,hostname,vmm_mad,vnm_mad);
rc = vmpool->update_history(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -637,7 +636,7 @@ public:
{
vm = allocate_running(0);
vm->add_history(hid,hostname,vmdir,vmm_mad,vnm_mad);
vm->add_history(hid,hostname,vmm_mad,vnm_mad);
rc = vmpool->update_history(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -661,7 +660,7 @@ public:
{
vm = allocate_running(0);
vm->add_history(hid,hostname,vmdir,vmm_mad,vnm_mad);
vm->add_history(hid,hostname,vmm_mad,vnm_mad);
rc = vmpool->update_history(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -685,7 +684,7 @@ public:
{
vm = allocate_running(0);
vm->add_history(hid,hostname,vmdir,vmm_mad,vnm_mad);
vm->add_history(hid,hostname,vmm_mad,vnm_mad);
rc = vmpool->update_history(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -749,7 +748,7 @@ public:
{
vm = allocate_running(0);
vm->add_history(hid,hostname,vmdir,vmm_mad,vnm_mad);
vm->add_history(hid,hostname,vmm_mad,vnm_mad);
rc = vmpool->update_history(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -772,7 +771,7 @@ public:
{
vm = allocate_running(0);
vm->add_history(hid,hostname,vmdir,vmm_mad,vnm_mad);
vm->add_history(hid,hostname,vmm_mad,vnm_mad);
rc = vmpool->update_history(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -795,7 +794,7 @@ public:
{
vm = allocate_running(0);
vm->add_history(hid,hostname,vmdir,vmm_mad,vnm_mad);
vm->add_history(hid,hostname,vmm_mad,vnm_mad);
rc = vmpool->update_history(vm);
CPPUNIT_ASSERT( rc == 0 );

View File

@ -298,7 +298,6 @@ public:
VirtualMachine* vm;
string hostnames[] = {"A_hostname", "B_hostname", "C_hostname"};
string vm_dirs[] = {"A_vm_dir", "B_vm_dir", "C_vm_dir"};
string vmm_mads[] = {"A_vmm_mad", "B_vmm_mad", "C_vmm_mad"};
string vnm_mads[] = {"A_vnm_mad", "B_vnm_mad", "C_vnm_mad"};
@ -322,7 +321,7 @@ public:
CPPUNIT_ASSERT( vm != 0 );
// Add a history item
vm->add_history(0, hostnames[0], vm_dirs[0], vmm_mads[0], vnm_mads[0]);
vm->add_history(0, hostnames[0], vmm_mads[0], vnm_mads[0]);
rc = vmp->update(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -340,7 +339,7 @@ public:
CPPUNIT_ASSERT( vm != 0 );
// Add a history item
vm->add_history(1, hostnames[1], vm_dirs[1], vmm_mads[1], vnm_mads[1]);
vm->add_history(1, hostnames[1], vmm_mads[1], vnm_mads[1]);
rc = vmp->update(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -349,7 +348,7 @@ public:
CPPUNIT_ASSERT( rc == 0 );
// Add another history item
vm->add_history(2, hostnames[2], vm_dirs[2], vmm_mads[2], vnm_mads[2]);
vm->add_history(2, hostnames[2], vmm_mads[2], vnm_mads[2]);
rc = vmp->update(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -404,7 +403,6 @@ public:
string hostname = "hostname";
string new_hostname = "new_hostname";
string vm_dir = "vm_dir";
string vmm_mad = "vm_mad";
string vnm_mad = "vn_mad";
@ -416,7 +414,7 @@ public:
CPPUNIT_ASSERT( vm != 0 );
// Add a history item
vm->add_history(0, hostname, vm_dir, vmm_mad, vnm_mad);
vm->add_history(0, hostname, vmm_mad, vnm_mad);
rc = vmp->update(vm);
CPPUNIT_ASSERT( rc == 0 );
@ -424,7 +422,7 @@ public:
rc = vmp->update_history(vm);
CPPUNIT_ASSERT( rc == 0 );
vm->add_history(0, new_hostname, vm_dir, vmm_mad, vnm_mad);
vm->add_history(0, new_hostname, vmm_mad, vnm_mad);
rc = vmp->update(vm);
CPPUNIT_ASSERT( rc == 0 );