use of org.openstack4j.openstack.trove.domain.TroveDatabaseUser.DatabaseUsers in project openstack4j by ContainX.
the class DBUserServiceImplTest method testCreateDatabaseUser.
@Test
public void testCreateDatabaseUser() throws Exception {
String databaseInstanceId = "54c91755526e44b9808385a263db4aa6";
respondWith(200);
TroveBuilders troveBuilders = new TroveBuilders();
TroveDatabaseUser databaseUser = (TroveDatabaseUser) troveBuilders.databaseUserCreate().username("dbuser4").password("password").build();
List<TroveDatabaseUser> troveDatabaseUsers = new ArrayList<>();
troveDatabaseUsers.add(databaseUser);
DatabaseUsers databaseUsers = new DatabaseUsers();
databaseUsers.setTroveDatabaseUserList(troveDatabaseUsers);
ActionResponse result = osv2().trove().databaseUsersService().create(databaseInstanceId, databaseUsers);
assertTrue(result.isSuccess());
}
Aggregations