mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-20 10:50:08 +03:00
feature #192: VM tests don't need one_auth
This commit is contained in:
parent
3f9611e0ed
commit
b2a8d1afc5
@ -146,9 +146,19 @@ protected:
|
||||
CPPUNIT_ASSERT( ((VirtualMachine*)obj)->get_name() == names[index] );
|
||||
CPPUNIT_ASSERT( xml_str == xmls[index]);
|
||||
};
|
||||
|
||||
void set_up_user_pool()
|
||||
|
||||
void set_up_user_pool()
|
||||
{
|
||||
|
||||
// The UserPool constructor checks if the DB contains at least
|
||||
// one user, and adds one automatically from the ONE_AUTH file.
|
||||
// So the ONE_AUTH environment is forced to point to a test one_auth
|
||||
// file.
|
||||
ostringstream oss;
|
||||
|
||||
oss << getenv("PWD") << "/one_auth";
|
||||
setenv("ONE_AUTH", oss.str().c_str(), 1);
|
||||
|
||||
UserPool::bootstrap(db);
|
||||
UserPool * user_pool = new UserPool(db);
|
||||
int uid_1, uid_2;
|
||||
|
1
src/vm/test/one_auth
Normal file
1
src/vm/test/one_auth
Normal file
@ -0,0 +1 @@
|
||||
one_user_test:password
|
Loading…
x
Reference in New Issue
Block a user