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

Bug #477: Fix AuthManagerTest, now the authorization errors are more vebose

This commit is contained in:
Carlos Martín 2011-09-13 14:58:38 +02:00
parent 6d42518b90
commit 7d0ac75b0f

View File

@ -220,14 +220,14 @@ public:
cout << endl << "ar.result: " << ar.result << endl;
}
if ( ar.message != astr )
if ( ar.message.find(astr) == ar.message.npos )
{
cout << endl << "ar.message: " << ar.message;
cout << endl << "expected: " << astr << endl;
}
//*/
CPPUNIT_ASSERT(ar.result==false);
CPPUNIT_ASSERT(ar.message==astr);
CPPUNIT_ASSERT(ar.message.find(astr) != ar.message.npos);
AuthRequest ar1(2, 2);
@ -248,14 +248,14 @@ public:
cout << endl << "ar.result: " << ar1.result << endl;
}
if ( ar1.message != astr1 )
if ( ar1.message.find(astr1) == ar1.message.npos )
{
cout << endl << "ar.message: " << ar1.message;
cout << endl << "expected: " << astr1 << endl;
}
//*/
CPPUNIT_ASSERT(ar1.result==false);
CPPUNIT_ASSERT(ar1.message==astr1);
CPPUNIT_ASSERT(ar1.message.find(astr1) != ar1.message.npos);
AuthRequest ar2(2, 2);