mirror of https://github.com/apache/jclouds.git
fix createUser test
This commit is contained in:
parent
f301a2ec18
commit
33128f8d8b
|
@ -86,11 +86,13 @@ public class UserClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
|
|
||||||
@Test(testName = "POST /admin/org/{id}/users")
|
@Test(testName = "POST /admin/org/{id}/users")
|
||||||
public void testCreateUser() {
|
public void testCreateUser() {
|
||||||
Checks.checkUser(randomTestUser("testCreateUser"));
|
User newUser = randomTestUser("testCreateUser");
|
||||||
|
user = userClient.createUser(orgRef.getHref(), newUser);
|
||||||
|
Checks.checkUser(newUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static User randomTestUser(String prefix) {
|
public static User randomTestUser(String prefix) {
|
||||||
User newUser = User.builder()
|
return User.builder()
|
||||||
.name(prefix+random.nextInt())
|
.name(prefix+random.nextInt())
|
||||||
.fullName("testFullName")
|
.fullName("testFullName")
|
||||||
.emailAddress("test@test.com")
|
.emailAddress("test@test.com")
|
||||||
|
@ -108,7 +110,6 @@ public class UserClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
.build())
|
.build())
|
||||||
.password("password")
|
.password("password")
|
||||||
.build();
|
.build();
|
||||||
return newUser;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/user/{id}",
|
@Test(testName = "GET /admin/user/{id}",
|
||||||
|
|
Loading…
Reference in New Issue