1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-25 06:03:36 +03:00

Fix core unit testing tests for ImagePool: duplicated image names are not allowed

This commit is contained in:
Carlos Martín 2011-07-12 19:30:26 +02:00
parent 32e10726d4
commit 81d9a077b3

View File

@ -333,15 +333,15 @@ public:
CPPUNIT_ASSERT( oid == 0 );
CPPUNIT_ASSERT( oid == rc );
// Try to allocate twice the same image, should work
// Try to allocate twice the same image, shouldn't work
rc = imp->allocate(uids[0], templates[0], &oid);
CPPUNIT_ASSERT( rc == 1 );
CPPUNIT_ASSERT( oid == 1 );
CPPUNIT_ASSERT( rc == -1 );
CPPUNIT_ASSERT( oid == -1 );
// Try again, this time with different uid. Should be allowed
rc = imp->allocate(uids[1], templates[0], &oid);
CPPUNIT_ASSERT( rc >= 0 );
CPPUNIT_ASSERT( oid == 2 );
CPPUNIT_ASSERT( oid == 1 );
}
/* -------------------------------------------------------------------------- */