mirror of https://github.com/apache/jclouds.git
Issue 830: Update API listener - Log timestamp, test name - Get test duration from framework - Uses test description paramater for operation request details - Updated live client tests to use description instead of testName
This commit is contained in:
parent
5d1c5aec9e
commit
d4713572e4
|
@ -18,17 +18,14 @@
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.testng;
|
package org.jclouds.vcloud.director.testng;
|
||||||
|
|
||||||
import java.lang.annotation.Annotation;
|
import java.text.SimpleDateFormat;
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.testng.ITestContext;
|
|
||||||
import org.testng.ITestListener;
|
|
||||||
import org.testng.ITestResult;
|
import org.testng.ITestResult;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.TestListenerAdapter;
|
||||||
|
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
import com.google.common.base.Predicates;
|
import com.google.common.base.Predicates;
|
||||||
|
@ -42,20 +39,12 @@ import com.google.common.collect.Iterables;
|
||||||
*
|
*
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class FormatApiResultsListener implements ITestListener {
|
public class FormatApiResultsListener extends TestListenerAdapter {
|
||||||
|
|
||||||
public static final Logger logger = LoggerFactory.getLogger("jclouds.vcloud.api");
|
public static final Logger logger = LoggerFactory.getLogger("jclouds.vcloud.api");
|
||||||
|
|
||||||
public static final Set<String> apis = ImmutableSet.of("admin", "user");
|
private static final SimpleDateFormat timestamp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
private static final Set<String> apis = ImmutableSet.of("admin", "user");
|
||||||
private ThreadLocal<Long> threadTestStart = new ThreadLocal<Long>();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTestStart(ITestResult res) {
|
|
||||||
if (methodInApiGroup(res)) {
|
|
||||||
threadTestStart.set(System.currentTimeMillis());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
synchronized public void onTestSuccess(ITestResult res) {
|
synchronized public void onTestSuccess(ITestResult res) {
|
||||||
|
@ -81,24 +70,12 @@ public class FormatApiResultsListener implements ITestListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStart(ITestContext arg0) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFinish(ITestContext arg0) {
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean methodInApiGroup(ITestResult res) {
|
private boolean methodInApiGroup(ITestResult res) {
|
||||||
return Iterables.any(Arrays.asList(res.getMethod().getGroups()), Predicates.in(apis));
|
return Iterables.any(Arrays.asList(res.getMethod().getGroups()), Predicates.in(apis));
|
||||||
}
|
}
|
||||||
|
|
||||||
private String resultForState(ITestResult res, String state) {
|
private String resultForState(ITestResult res, String state) {
|
||||||
return Joiner.on(',').join(getApi(res), getOperation(res), getDuration(), state);
|
return Joiner.on(',').join(getApi(res), getOperation(res), getStart(res), getTest(res), getDuration(res), state);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getApi(ITestResult res) {
|
private String getApi(ITestResult res) {
|
||||||
|
@ -106,13 +83,18 @@ public class FormatApiResultsListener implements ITestListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getOperation(ITestResult res) {
|
private String getOperation(ITestResult res) {
|
||||||
Method method = res.getMethod().getConstructorOrMethod().getMethod();
|
return res.getMethod().getDescription();
|
||||||
Test test = method.getAnnotation(Test.class);
|
|
||||||
return test != null ? test.testName() : method.getName();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getDuration() {
|
private String getTest(ITestResult res) {
|
||||||
Long start = threadTestStart.get();
|
return res.getName();
|
||||||
return (start == null) ? "" : Long.toString(System.currentTimeMillis() - start);
|
}
|
||||||
|
|
||||||
|
private String getStart(ITestResult res) {
|
||||||
|
return timestamp.format(res.getStartMillis());
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getDuration(ITestResult res) {
|
||||||
|
return Long.toString(res.getEndMillis() - res.getStartMillis());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest
|
||||||
orgRef = Iterables.getFirst(context.getApi().getOrgClient().getOrgList().getOrgs(), null).toAdminReference(endpoint);
|
orgRef = Iterables.getFirst(context.getApi().getOrgClient().getOrgList().getOrgs(), null).toAdminReference(endpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /admin/org/{id}/catalogs")
|
@Test(description = "POST /admin/org/{id}/catalogs")
|
||||||
public void testCreateCatalog() {
|
public void testCreateCatalog() {
|
||||||
AdminCatalog newCatalog = AdminCatalog.builder()
|
AdminCatalog newCatalog = AdminCatalog.builder()
|
||||||
.name(name("Test Catalog "))
|
.name(name("Test Catalog "))
|
||||||
|
@ -91,7 +91,7 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest
|
||||||
// FIXME: documentation suggests we should wait for a task here
|
// FIXME: documentation suggests we should wait for a task here
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/catalog/{id}",
|
@Test(description = "GET /admin/catalog/{id}",
|
||||||
dependsOnMethods = { "testCreateCatalog" })
|
dependsOnMethods = { "testCreateCatalog" })
|
||||||
public void testGetCatalog() {
|
public void testGetCatalog() {
|
||||||
catalog = catalogClient.getCatalog(catalog.getHref());
|
catalog = catalogClient.getCatalog(catalog.getHref());
|
||||||
|
@ -99,14 +99,14 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest
|
||||||
Checks.checkAdminCatalog(catalog);
|
Checks.checkAdminCatalog(catalog);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/catalog/{id}/owner",
|
@Test(description = "GET /admin/catalog/{id}/owner",
|
||||||
dependsOnMethods = { "testGetCatalog" })
|
dependsOnMethods = { "testGetCatalog" })
|
||||||
public void testGetCatalogOwner() {
|
public void testGetCatalogOwner() {
|
||||||
owner = catalogClient.getOwner(catalog.getHref());
|
owner = catalogClient.getOwner(catalog.getHref());
|
||||||
Checks.checkOwner(owner);
|
Checks.checkOwner(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /admin/catalog/{id}/owner",
|
@Test(description = "PUT /admin/catalog/{id}/owner",
|
||||||
dependsOnMethods = { "testGetCatalog" })
|
dependsOnMethods = { "testGetCatalog" })
|
||||||
public void updateCatalogOwner() {
|
public void updateCatalogOwner() {
|
||||||
User newOwnerUser = UserClientLiveTest.randomTestUser("testUpdateCatalogOwner", context);
|
User newOwnerUser = UserClientLiveTest.randomTestUser("testUpdateCatalogOwner", context);
|
||||||
|
@ -133,7 +133,7 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /admin/catalog/{id}", dependsOnMethods = { "testGetCatalogOwner" })
|
@Test(description = "PUT /admin/catalog/{id}", dependsOnMethods = { "testGetCatalogOwner" })
|
||||||
public void testUpdateCatalog() {
|
public void testUpdateCatalog() {
|
||||||
String oldName = catalog.getName();
|
String oldName = catalog.getName();
|
||||||
String newName = "new "+oldName;
|
String newName = "new "+oldName;
|
||||||
|
@ -171,7 +171,7 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /admin/catalog/{id}/action/publish",
|
@Test(description = "POST /admin/catalog/{id}/action/publish",
|
||||||
dependsOnMethods = { "testUpdateCatalog" } ) // FIXME: fails with a 403
|
dependsOnMethods = { "testUpdateCatalog" } ) // FIXME: fails with a 403
|
||||||
public void testPublishCatalog() {
|
public void testPublishCatalog() {
|
||||||
assertNotNull(catalog, String.format(NOT_NULL_OBJ_FMT, "Catalog"));
|
assertNotNull(catalog, String.format(NOT_NULL_OBJ_FMT, "Catalog"));
|
||||||
|
@ -189,7 +189,7 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest
|
||||||
CATALOG, "isPublished", true, catalog.isPublished()));
|
CATALOG, "isPublished", true, catalog.isPublished()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "DELETE /admin/catalog/{id}",
|
@Test(description = "DELETE /admin/catalog/{id}",
|
||||||
dependsOnMethods = { "testCreateCatalog" } )
|
dependsOnMethods = { "testCreateCatalog" } )
|
||||||
public void testDeleteCatalog() {
|
public void testDeleteCatalog() {
|
||||||
// assertEquals(catalog.getCatalogItems().getCatalogItems().size(), 0,
|
// assertEquals(catalog.getCatalogItems().getCatalogItems().size(), 0,
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class AdminNetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest
|
||||||
networkRef = Reference.builder().href(networkURI).build().toAdminReference(endpoint);
|
networkRef = Reference.builder().href(networkURI).build().toAdminReference(endpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/network/{id}")
|
@Test(description = "GET /admin/network/{id}")
|
||||||
public void testGetNetwork() {
|
public void testGetNetwork() {
|
||||||
//TODO: test both org and external networks
|
//TODO: test both org and external networks
|
||||||
assertNotNull(networkRef, String.format(OBJ_REQ_LIVE, NETWORK));
|
assertNotNull(networkRef, String.format(OBJ_REQ_LIVE, NETWORK));
|
||||||
|
@ -88,7 +88,7 @@ public class AdminNetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: this test is far from exhaustive
|
// TODO: this test is far from exhaustive
|
||||||
@Test(testName = "PUT /admin/network/{id}" )
|
@Test(description = "PUT /admin/network/{id}" )
|
||||||
public void testUpdateNetwork() {
|
public void testUpdateNetwork() {
|
||||||
//TODO: ensure network instanceof OrgNetwork, may require queries
|
//TODO: ensure network instanceof OrgNetwork, may require queries
|
||||||
assertTrue(network instanceof OrgNetwork, String.format(REF_REQ_LIVE, "OrgNetwork"));
|
assertTrue(network instanceof OrgNetwork, String.format(REF_REQ_LIVE, "OrgNetwork"));
|
||||||
|
@ -144,7 +144,7 @@ public class AdminNetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /admin/network/{id}/action/reset")
|
@Test(description = "POST /admin/network/{id}/action/reset")
|
||||||
public void testResetNetwork() {
|
public void testResetNetwork() {
|
||||||
// TODO assert that network is deployed somehow
|
// TODO assert that network is deployed somehow
|
||||||
Task resetNetworkTask = networkClient.resetNetwork(networkRef.getHref());
|
Task resetNetworkTask = networkClient.resetNetwork(networkRef.getHref());
|
||||||
|
|
|
@ -77,21 +77,21 @@ public class AdminOrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
assertNotNull(orgRef, String.format(REF_REQ_LIVE, "admin org"));
|
assertNotNull(orgRef, String.format(REF_REQ_LIVE, "admin org"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/org/{id}")
|
@Test(description = "GET /admin/org/{id}")
|
||||||
public void testGetAdminOrg() {
|
public void testGetAdminOrg() {
|
||||||
AdminOrg adminOrg = orgClient.getOrg(orgRef.getHref());
|
AdminOrg adminOrg = orgClient.getOrg(orgRef.getHref());
|
||||||
|
|
||||||
Checks.checkAdminOrg(adminOrg);
|
Checks.checkAdminOrg(adminOrg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/org/{id}/settings/email")
|
@Test(description = "GET /admin/org/{id}/settings/email")
|
||||||
public void testGetEmailSettings() {
|
public void testGetEmailSettings() {
|
||||||
emailSettings = orgClient.getEmailSettings(orgRef.getHref());
|
emailSettings = orgClient.getEmailSettings(orgRef.getHref());
|
||||||
|
|
||||||
Checks.checkEmailSettings(emailSettings);
|
Checks.checkEmailSettings(emailSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /admin/org/{id}/settings/email",
|
@Test(description = "PUT /admin/org/{id}/settings/email",
|
||||||
dependsOnMethods = { "testGetEmailSettings" })
|
dependsOnMethods = { "testGetEmailSettings" })
|
||||||
public void testUpdateEmailSettings() {
|
public void testUpdateEmailSettings() {
|
||||||
boolean isDefaultSmtpServer = emailSettings.isDefaultSmtpServer();
|
boolean isDefaultSmtpServer = emailSettings.isDefaultSmtpServer();
|
||||||
|
@ -159,14 +159,14 @@ public class AdminOrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/org/{id}/settings/general")
|
@Test(description = "GET /admin/org/{id}/settings/general")
|
||||||
public void testGetGeneralSettings() {
|
public void testGetGeneralSettings() {
|
||||||
generalSettings = orgClient.getGeneralSettings(orgRef.getHref());
|
generalSettings = orgClient.getGeneralSettings(orgRef.getHref());
|
||||||
|
|
||||||
Checks.checkGeneralSettings(generalSettings);
|
Checks.checkGeneralSettings(generalSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /admin/org/{id}/settings/general",
|
@Test(description = "PUT /admin/org/{id}/settings/general",
|
||||||
dependsOnMethods = { "testGetGeneralSettings" } )
|
dependsOnMethods = { "testGetGeneralSettings" } )
|
||||||
public void testUpdateGeneralSettings() {
|
public void testUpdateGeneralSettings() {
|
||||||
// FIXME: canPublishCatalogs does not update
|
// FIXME: canPublishCatalogs does not update
|
||||||
|
@ -221,21 +221,21 @@ public class AdminOrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/org/{id}/settings/ldap")
|
@Test(description = "GET /admin/org/{id}/settings/ldap")
|
||||||
public void testGetLdapSettings() {
|
public void testGetLdapSettings() {
|
||||||
ldapSettings = orgClient.getLdapSettings(orgRef.getHref());
|
ldapSettings = orgClient.getLdapSettings(orgRef.getHref());
|
||||||
|
|
||||||
Checks.checkLdapSettings(ldapSettings);
|
Checks.checkLdapSettings(ldapSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/org/{id}/settings/passwordPolicy")
|
@Test(description = "GET /admin/org/{id}/settings/passwordPolicy")
|
||||||
public void testGetPasswordPolicy() {
|
public void testGetPasswordPolicy() {
|
||||||
passwordPolicy = orgClient.getPasswordPolicy(orgRef.getHref());
|
passwordPolicy = orgClient.getPasswordPolicy(orgRef.getHref());
|
||||||
|
|
||||||
Checks.checkPasswordPolicySettings(passwordPolicy);
|
Checks.checkPasswordPolicySettings(passwordPolicy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /admin/org/{id}/settings/passwordPolicy",
|
@Test(description = "PUT /admin/org/{id}/settings/passwordPolicy",
|
||||||
dependsOnMethods = { "testGetPasswordPolicy" })
|
dependsOnMethods = { "testGetPasswordPolicy" })
|
||||||
public void testUpdatePasswordPolicy() {
|
public void testUpdatePasswordPolicy() {
|
||||||
boolean accountLockoutEnabled = passwordPolicy.isAccountLockoutEnabled();
|
boolean accountLockoutEnabled = passwordPolicy.isAccountLockoutEnabled();
|
||||||
|
@ -277,14 +277,14 @@ public class AdminOrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/org/{id}/settings/vAppLeaseSettings")
|
@Test(description = "GET /admin/org/{id}/settings/vAppLeaseSettings")
|
||||||
public void testGetVAppLeaseSettings() {
|
public void testGetVAppLeaseSettings() {
|
||||||
vAppLeaseSettings = orgClient.getVAppLeaseSettings(orgRef.getHref());
|
vAppLeaseSettings = orgClient.getVAppLeaseSettings(orgRef.getHref());
|
||||||
|
|
||||||
Checks.checkVAppLeaseSettings(vAppLeaseSettings);
|
Checks.checkVAppLeaseSettings(vAppLeaseSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /admin/org/{id}/settings/vAppLeaseSettings",
|
@Test(description = "PUT /admin/org/{id}/settings/vAppLeaseSettings",
|
||||||
dependsOnMethods = { "testGetVAppLeaseSettings" } ) // FIXME: fails with 403 forbidden
|
dependsOnMethods = { "testGetVAppLeaseSettings" } ) // FIXME: fails with 403 forbidden
|
||||||
public void testUpdateVAppLeaseSettings() {
|
public void testUpdateVAppLeaseSettings() {
|
||||||
boolean deleteOnStorageLeaseExpiration = vAppLeaseSettings.deleteOnStorageLeaseExpiration();
|
boolean deleteOnStorageLeaseExpiration = vAppLeaseSettings.deleteOnStorageLeaseExpiration();
|
||||||
|
@ -326,14 +326,14 @@ public class AdminOrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/org/{id}/settings/vAppTemplateLeaseSettings")
|
@Test(description = "GET /admin/org/{id}/settings/vAppTemplateLeaseSettings")
|
||||||
public void testGetVAppTemplateLeaseSettings() {
|
public void testGetVAppTemplateLeaseSettings() {
|
||||||
vAppTemplateLeaseSettings = orgClient.getVAppTemplateLeaseSettings(orgRef.getHref());
|
vAppTemplateLeaseSettings = orgClient.getVAppTemplateLeaseSettings(orgRef.getHref());
|
||||||
|
|
||||||
Checks.checkVAppTemplateLeaseSettings(vAppTemplateLeaseSettings);
|
Checks.checkVAppTemplateLeaseSettings(vAppTemplateLeaseSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /admin/org/{id}/settings/vAppTemplateLeaseSettings",
|
@Test(description = "PUT /admin/org/{id}/settings/vAppTemplateLeaseSettings",
|
||||||
dependsOnMethods = { "testGetVAppTemplateLeaseSettings" }) // FIXME: fails with 403 forbidden
|
dependsOnMethods = { "testGetVAppTemplateLeaseSettings" }) // FIXME: fails with 403 forbidden
|
||||||
public void testUpdateVAppTemplateLeaseSettings() {
|
public void testUpdateVAppTemplateLeaseSettings() {
|
||||||
boolean deleteOnStorageLeaseExpiration = vAppTemplateLeaseSettings.deleteOnStorageLeaseExpiration();
|
boolean deleteOnStorageLeaseExpiration = vAppTemplateLeaseSettings.deleteOnStorageLeaseExpiration();
|
||||||
|
@ -369,14 +369,14 @@ public class AdminOrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/org/{id}/settings")
|
@Test(description = "GET /admin/org/{id}/settings")
|
||||||
public void testGetSettings() {
|
public void testGetSettings() {
|
||||||
settings = orgClient.getSettings(orgRef.getHref());
|
settings = orgClient.getSettings(orgRef.getHref());
|
||||||
|
|
||||||
Checks.checkOrgSettings(settings);
|
Checks.checkOrgSettings(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /admin/org/{id}/settings",
|
@Test(description = "PUT /admin/org/{id}/settings",
|
||||||
dependsOnMethods = { "testGetEmailSettings" } )
|
dependsOnMethods = { "testGetEmailSettings" } )
|
||||||
public void testUpdateSettings() throws Exception {
|
public void testUpdateSettings() throws Exception {
|
||||||
String newFromEmailAddress = "test"+random.nextInt(Integer.MAX_VALUE)+"@test.com";
|
String newFromEmailAddress = "test"+random.nextInt(Integer.MAX_VALUE)+"@test.com";
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class AdminQueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
queryClient = context.getApi().getAdminQueryClient();
|
queryClient = context.getApi().getAdminQueryClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/groups/query")
|
@Test(description = "GET /admin/groups/query")
|
||||||
public void testQueryAllGroups() {
|
public void testQueryAllGroups() {
|
||||||
// TODO Ensure there will be at least one record, for asserting result
|
// TODO Ensure there will be at least one record, for asserting result
|
||||||
QueryResultRecords resultRecords = queryClient.groupsQueryAll();
|
QueryResultRecords resultRecords = queryClient.groupsQueryAll();
|
||||||
|
@ -64,7 +64,7 @@ public class AdminQueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/orgs/query")
|
@Test(description = "GET /admin/orgs/query")
|
||||||
public void testQueryAllOrgs() {
|
public void testQueryAllOrgs() {
|
||||||
// TODO Ensure there will be at least one record, for asserting result
|
// TODO Ensure there will be at least one record, for asserting result
|
||||||
QueryResultRecords resultRecords = queryClient.orgsQueryAll();
|
QueryResultRecords resultRecords = queryClient.orgsQueryAll();
|
||||||
|
@ -74,7 +74,7 @@ public class AdminQueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/rights/query")
|
@Test(description = "GET /admin/rights/query")
|
||||||
public void testQueryAllRights() {
|
public void testQueryAllRights() {
|
||||||
// TODO Ensure there will be at least one record, for asserting result
|
// TODO Ensure there will be at least one record, for asserting result
|
||||||
QueryResultRecords resultRecords = queryClient.rightsQueryAll();
|
QueryResultRecords resultRecords = queryClient.rightsQueryAll();
|
||||||
|
@ -85,7 +85,7 @@ public class AdminQueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/roles/query")
|
@Test(description = "GET /admin/roles/query")
|
||||||
public void testQueryAllRoles() {
|
public void testQueryAllRoles() {
|
||||||
// TODO Ensure there will be at least one record, for asserting result
|
// TODO Ensure there will be at least one record, for asserting result
|
||||||
QueryResultRecords resultRecords = queryClient.rolesQueryAll();
|
QueryResultRecords resultRecords = queryClient.rolesQueryAll();
|
||||||
|
@ -102,7 +102,7 @@ public class AdminQueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/strandedUsers/query")
|
@Test(description = "GET /admin/strandedUsers/query")
|
||||||
public void testQueryAllStrandedUsers() {
|
public void testQueryAllStrandedUsers() {
|
||||||
// TODO Ensure there will be at least one record, for asserting result
|
// TODO Ensure there will be at least one record, for asserting result
|
||||||
QueryResultRecords resultRecords = queryClient.strandedUsersQueryAll();
|
QueryResultRecords resultRecords = queryClient.strandedUsersQueryAll();
|
||||||
|
@ -113,7 +113,7 @@ public class AdminQueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/users/query")
|
@Test(description = "GET /admin/users/query")
|
||||||
public void testQueryAllUsers() {
|
public void testQueryAllUsers() {
|
||||||
// TODO Ensure there will be at least one record, for asserting result
|
// TODO Ensure there will be at least one record, for asserting result
|
||||||
QueryResultRecords resultRecords = queryClient.usersQueryAll();
|
QueryResultRecords resultRecords = queryClient.usersQueryAll();
|
||||||
|
@ -124,7 +124,7 @@ public class AdminQueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/vdcs/query")
|
@Test(description = "GET /admin/vdcs/query")
|
||||||
public void testQueryAllVdc() {
|
public void testQueryAllVdc() {
|
||||||
// TODO Ensure there will be at least one record, for asserting result
|
// TODO Ensure there will be at least one record, for asserting result
|
||||||
QueryResultRecords resultRecords = queryClient.vdcsQueryAll();
|
QueryResultRecords resultRecords = queryClient.vdcsQueryAll();
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/vdc/{id}")
|
@Test(description = "GET /admin/vdc/{id}")
|
||||||
public void testGetVdc() {
|
public void testGetVdc() {
|
||||||
AdminVdc vdc = vdcClient.getVdc(adminVdcUri);
|
AdminVdc vdc = vdcClient.getVdc(adminVdcUri);
|
||||||
assertNotNull(vdc, String.format(OBJ_REQ_LIVE, VDC));
|
assertNotNull(vdc, String.format(OBJ_REQ_LIVE, VDC));
|
||||||
|
@ -90,7 +90,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO insufficient permissions to test
|
// TODO insufficient permissions to test
|
||||||
@Test(testName = "PUT /admin/vdc/{id}", enabled=false)
|
@Test(description = "PUT /admin/vdc/{id}", enabled=false)
|
||||||
public void testEditVdc() throws Exception {
|
public void testEditVdc() throws Exception {
|
||||||
String origName = vdcClient.getVdc(adminVdcUri).getName();
|
String origName = vdcClient.getVdc(adminVdcUri).getName();
|
||||||
String newName = name("a");
|
String newName = name("a");
|
||||||
|
@ -128,7 +128,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO insufficient permissions to test
|
// TODO insufficient permissions to test
|
||||||
@Test(testName = "DELETE /admin/vdc/{id}", enabled=false)
|
@Test(description = "DELETE /admin/vdc/{id}", enabled=false)
|
||||||
public void testDeleteVdc() throws Exception {
|
public void testDeleteVdc() throws Exception {
|
||||||
// TODO Need to have a VDC that we're happy to delete!
|
// TODO Need to have a VDC that we're happy to delete!
|
||||||
Task task = vdcClient.deleteVdc(adminVdcUri);
|
Task task = vdcClient.deleteVdc(adminVdcUri);
|
||||||
|
@ -142,7 +142,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO insufficient permissions to test
|
// TODO insufficient permissions to test
|
||||||
@Test(testName = "DISABLE/ENABLE /admin/vdc/{id}", enabled=false)
|
@Test(description = "DISABLE/ENABLE /admin/vdc/{id}", enabled=false)
|
||||||
public void testDisableAndEnableVdc() throws Exception {
|
public void testDisableAndEnableVdc() throws Exception {
|
||||||
// TODO Need to have a VDC that we're happy to delete!
|
// TODO Need to have a VDC that we're happy to delete!
|
||||||
Exception exception = null;
|
Exception exception = null;
|
||||||
|
@ -165,7 +165,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/vdc/{id}/metadata")
|
@Test(description = "GET /admin/vdc/{id}/metadata")
|
||||||
public void testGetMetadata() throws Exception {
|
public void testGetMetadata() throws Exception {
|
||||||
Metadata metadata = metadataClient.getMetadata(adminVdcUri);
|
Metadata metadata = metadataClient.getMetadata(adminVdcUri);
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO insufficient permissions to test
|
// TODO insufficient permissions to test
|
||||||
@Test(testName = "PUT /admin/vdc/{id}/metadata", enabled=false)
|
@Test(description = "PUT /admin/vdc/{id}/metadata", enabled=false)
|
||||||
public void testSetMetadata() throws Exception {
|
public void testSetMetadata() throws Exception {
|
||||||
metadataKey = name("key-");
|
metadataKey = name("key-");
|
||||||
metadataValue = name("value-");
|
metadataValue = name("value-");
|
||||||
|
@ -190,7 +190,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO insufficient permissions to test
|
// TODO insufficient permissions to test
|
||||||
@Test(testName = "GET /admin/vdc/{id}/metadata/{key}", dependsOnMethods = { "testSetMetadata" }, enabled=false)
|
@Test(description = "GET /admin/vdc/{id}/metadata/{key}", dependsOnMethods = { "testSetMetadata" }, enabled=false)
|
||||||
public void testGetMetadataValue() throws Exception {
|
public void testGetMetadataValue() throws Exception {
|
||||||
MetadataValue retrievedMetadataValue = metadataClient.getMetadataValue(adminVdcUri, metadataKey);
|
MetadataValue retrievedMetadataValue = metadataClient.getMetadataValue(adminVdcUri, metadataKey);
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO insufficient permissions to test
|
// TODO insufficient permissions to test
|
||||||
@Test(testName = "PUT /admin/vdc/{id}/metadata/{key}", dependsOnMethods = { "testGetMetadataValue" }, enabled=false )
|
@Test(description = "PUT /admin/vdc/{id}/metadata/{key}", dependsOnMethods = { "testGetMetadataValue" }, enabled=false )
|
||||||
public void testSetMetadataValue() throws Exception {
|
public void testSetMetadataValue() throws Exception {
|
||||||
metadataValue = name("value-");
|
metadataValue = name("value-");
|
||||||
MetadataValue newV = MetadataValue.builder().value(metadataValue).build();
|
MetadataValue newV = MetadataValue.builder().value(metadataValue).build();
|
||||||
|
@ -211,7 +211,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO insufficient permissions to test
|
// TODO insufficient permissions to test
|
||||||
@Test(testName = "DELETE /admin/vdc/{id}/metadata/{key}", dependsOnMethods = { "testSetMetadataValue" }, enabled=false )
|
@Test(description = "DELETE /admin/vdc/{id}/metadata/{key}", dependsOnMethods = { "testSetMetadataValue" }, enabled=false )
|
||||||
public void testDeleteMetadataValue() throws Exception {
|
public void testDeleteMetadataValue() throws Exception {
|
||||||
// TODO Remove dependency on other tests; make cleanUp delete a list of metadata entries?
|
// TODO Remove dependency on other tests; make cleanUp delete a list of metadata entries?
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /catalog/{id}")
|
@Test(description = "GET /catalog/{id}")
|
||||||
public void testGetCatalog() {
|
public void testGetCatalog() {
|
||||||
CatalogType catalog = catalogClient.getCatalog(catalogRef.getHref());
|
CatalogType catalog = catalogClient.getCatalog(catalogRef.getHref());
|
||||||
assertNotNull(catalog);
|
assertNotNull(catalog);
|
||||||
|
@ -118,14 +118,14 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
assertEquals(catalog.getHref(), catalogRef.getHref());
|
assertEquals(catalog.getHref(), catalogRef.getHref());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /catalogItem/{id}", dependsOnMethods = "testAddCatalogItem")
|
@Test(description = "GET /catalogItem/{id}", dependsOnMethods = "testAddCatalogItem")
|
||||||
public void testGetCatalogItem() {
|
public void testGetCatalogItem() {
|
||||||
CatalogItem catalogItem = catalogClient.getCatalogItem(this.catalogItem.getHref());
|
CatalogItem catalogItem = catalogClient.getCatalogItem(this.catalogItem.getHref());
|
||||||
checkCatalogItem(catalogItem);
|
checkCatalogItem(catalogItem);
|
||||||
assertEquals(catalogItem.getEntity().getHref(), this.catalogItem.getEntity().getHref());
|
assertEquals(catalogItem.getEntity().getHref(), this.catalogItem.getEntity().getHref());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /catalog/{id}/catalogItems")
|
@Test(description = "POST /catalog/{id}/catalogItems")
|
||||||
public void testAddCatalogItem() {
|
public void testAddCatalogItem() {
|
||||||
assertNotNull(vdcURI, String.format(REF_REQ_LIVE, VDC));
|
assertNotNull(vdcURI, String.format(REF_REQ_LIVE, VDC));
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
assertEquals(catalogItem.getDescription(), "New Item");
|
assertEquals(catalogItem.getDescription(), "New Item");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /catalogItem/{id}", dependsOnMethods = "testAddCatalogItem")
|
@Test(description = "PUT /catalogItem/{id}", dependsOnMethods = "testAddCatalogItem")
|
||||||
public void testUpdateCatalogItem() {
|
public void testUpdateCatalogItem() {
|
||||||
CatalogItem updatedCatalogItem = CatalogItem.builder().fromCatalogItem(catalogItem).name("UPDATEDNAME").build();
|
CatalogItem updatedCatalogItem = CatalogItem.builder().fromCatalogItem(catalogItem).name("UPDATEDNAME").build();
|
||||||
catalogItem = catalogClient.updateCatalogItem(catalogItem.getHref(), updatedCatalogItem);
|
catalogItem = catalogClient.updateCatalogItem(catalogItem.getHref(), updatedCatalogItem);
|
||||||
|
@ -166,7 +166,7 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note this runs after all the metadata tests
|
// Note this runs after all the metadata tests
|
||||||
@Test(testName = "DELETE /catalogItem/{id}", dependsOnMethods = "testDeleteCatalogItemMetadataValue")
|
@Test(description = "DELETE /catalogItem/{id}", dependsOnMethods = "testDeleteCatalogItemMetadataValue")
|
||||||
public void testDeleteCatalogItem() {
|
public void testDeleteCatalogItem() {
|
||||||
catalogClient.deleteCatalogItem(catalogItem.getHref());
|
catalogClient.deleteCatalogItem(catalogItem.getHref());
|
||||||
try {
|
try {
|
||||||
|
@ -181,13 +181,13 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /catalog/{id}/metadata")
|
@Test(description = "GET /catalog/{id}/metadata")
|
||||||
public void testGetCatalogMetadata() {
|
public void testGetCatalogMetadata() {
|
||||||
Metadata catalogMetadata = catalogClient.getMetadataClient().getMetadata(catalogRef.getHref());
|
Metadata catalogMetadata = catalogClient.getMetadataClient().getMetadata(catalogRef.getHref());
|
||||||
checkMetadata(catalogMetadata);
|
checkMetadata(catalogMetadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /catalog/{id}/metadata/{key}")
|
@Test(description = "GET /catalog/{id}/metadata/{key}")
|
||||||
public void testGetCatalogMetadataValue() {
|
public void testGetCatalogMetadataValue() {
|
||||||
Metadata catalogMetadata = catalogClient.getMetadataClient().getMetadata(catalogRef.getHref());
|
Metadata catalogMetadata = catalogClient.getMetadataClient().getMetadata(catalogRef.getHref());
|
||||||
MetadataEntry existingMetadataEntry = Iterables.find(catalogMetadata.getMetadataEntries(), new Predicate<MetadataEntry>() {
|
MetadataEntry existingMetadataEntry = Iterables.find(catalogMetadata.getMetadataEntries(), new Predicate<MetadataEntry>() {
|
||||||
|
@ -202,13 +202,13 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
checkMetadataValue(metadataValue);
|
checkMetadataValue(metadataValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /catalogItem/{id}/metadata", dependsOnMethods = "testAddCatalogItem")
|
@Test(description = "GET /catalogItem/{id}/metadata", dependsOnMethods = "testAddCatalogItem")
|
||||||
public void testGetCatalogItemMetadata() {
|
public void testGetCatalogItemMetadata() {
|
||||||
Metadata catalogItemMetadata = catalogClient.getCatalogItemMetadataClient().getMetadata(catalogItem.getHref());
|
Metadata catalogItemMetadata = catalogClient.getCatalogItemMetadataClient().getMetadata(catalogItem.getHref());
|
||||||
checkMetadata(catalogItemMetadata);
|
checkMetadata(catalogItemMetadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /catalogItem/{id}/metadata", dependsOnMethods = "testAddCatalogItem")
|
@Test(description = "POST /catalogItem/{id}/metadata", dependsOnMethods = "testAddCatalogItem")
|
||||||
public void testMergeCatalogItemMetadata() {
|
public void testMergeCatalogItemMetadata() {
|
||||||
Metadata newMetadata = Metadata.builder()
|
Metadata newMetadata = Metadata.builder()
|
||||||
.entry(MetadataEntry.builder().entry("KEY", "MARMALADE").build())
|
.entry(MetadataEntry.builder().entry("KEY", "MARMALADE").build())
|
||||||
|
@ -236,13 +236,13 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
checkMetadataValue(newKeyMetadataValue);
|
checkMetadataValue(newKeyMetadataValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /catalogItem/{id}/metadata/{key}", dependsOnMethods = "testSetCatalogItemMetadataValue")
|
@Test(description = "GET /catalogItem/{id}/metadata/{key}", dependsOnMethods = "testSetCatalogItemMetadataValue")
|
||||||
public void testGetCatalogItemMetadataValue() {
|
public void testGetCatalogItemMetadataValue() {
|
||||||
MetadataValue metadataValue = catalogClient.getCatalogItemMetadataClient().getMetadataValue(catalogItem.getHref(), "KEY");
|
MetadataValue metadataValue = catalogClient.getCatalogItemMetadataClient().getMetadataValue(catalogItem.getHref(), "KEY");
|
||||||
checkMetadataValue(metadataValue);
|
checkMetadataValue(metadataValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /catalogItem/{id}/metadata/{key}", dependsOnMethods = "testMergeCatalogItemMetadata")
|
@Test(description = "PUT /catalogItem/{id}/metadata/{key}", dependsOnMethods = "testMergeCatalogItemMetadata")
|
||||||
public void testSetCatalogItemMetadataValue() {
|
public void testSetCatalogItemMetadataValue() {
|
||||||
MetadataValue newMetadataValue = MetadataValue.builder().value("NEW").build();
|
MetadataValue newMetadataValue = MetadataValue.builder().value("NEW").build();
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
checkMetadataValue(updatedMetadataValue);
|
checkMetadataValue(updatedMetadataValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "DELETE /catalogItem/{id}/metadata/{key}", dependsOnMethods = "testGetCatalogItemMetadataValue")
|
@Test(description = "DELETE /catalogItem/{id}/metadata/{key}", dependsOnMethods = "testGetCatalogItemMetadataValue")
|
||||||
public void testDeleteCatalogItemMetadataValue() {
|
public void testDeleteCatalogItemMetadataValue() {
|
||||||
Task deleteCatalogItemMetadataValue = catalogClient.getCatalogItemMetadataClient().deleteMetadataEntry(catalogItem.getHref(), "KEY");
|
Task deleteCatalogItemMetadataValue = catalogClient.getCatalogItemMetadataClient().deleteMetadataEntry(catalogItem.getHref(), "KEY");
|
||||||
checkTask(deleteCatalogItemMetadataValue);
|
checkTask(deleteCatalogItemMetadataValue);
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class GroupClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
// context.getApi().getAdminOrgClient().updateLdapSettings(newLdapSettings);
|
// context.getApi().getAdminOrgClient().updateLdapSettings(newLdapSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /admin/org/{id}/groups")
|
@Test(description = "POST /admin/org/{id}/groups")
|
||||||
public void testCreateGroup() {
|
public void testCreateGroup() {
|
||||||
fail("LDAP not configured, group client isn't currently testable.");
|
fail("LDAP not configured, group client isn't currently testable.");
|
||||||
// group = groupClient.createGroup(orgUri, Group.builder()
|
// group = groupClient.createGroup(orgUri, Group.builder()
|
||||||
|
@ -78,14 +78,14 @@ public class GroupClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkGroup(group);
|
Checks.checkGroup(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/group/{id}", dependsOnMethods = { "testCreateGroup" })
|
@Test(description = "GET /admin/group/{id}", dependsOnMethods = { "testCreateGroup" })
|
||||||
public void testGetGroup() {
|
public void testGetGroup() {
|
||||||
group = groupClient.getGroup(groupRef.getHref());
|
group = groupClient.getGroup(groupRef.getHref());
|
||||||
|
|
||||||
Checks.checkGroup(group);
|
Checks.checkGroup(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /admin/group/{id}", dependsOnMethods = { "testGetGroup" } )
|
@Test(description = "PUT /admin/group/{id}", dependsOnMethods = { "testGetGroup" } )
|
||||||
public void testUpdateGroup() {
|
public void testUpdateGroup() {
|
||||||
String oldName = group.getName();
|
String oldName = group.getName();
|
||||||
String newName = "new "+oldName;
|
String newName = "new "+oldName;
|
||||||
|
@ -118,7 +118,7 @@ public class GroupClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "DELETE /admin/group/{id}", dependsOnMethods = { "testUpdateGroup" } )
|
@Test(description = "DELETE /admin/group/{id}", dependsOnMethods = { "testUpdateGroup" } )
|
||||||
public void testDeleteGroup() {
|
public void testDeleteGroup() {
|
||||||
groupClient.deleteGroup(groupRef.getHref());
|
groupClient.deleteGroup(groupRef.getHref());
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
private MetadataValue metadataValue;
|
private MetadataValue metadataValue;
|
||||||
private String metadataEntryValue = "value";
|
private String metadataEntryValue = "value";
|
||||||
|
|
||||||
@Test(testName = "POST /vdc/{id}/media")
|
@Test(description = "POST /vdc/{id}/media")
|
||||||
public void testCreateMedia() throws URISyntaxException {
|
public void testCreateMedia() throws URISyntaxException {
|
||||||
assertNotNull(vdcURI, String.format(REF_REQ_LIVE, VDC));
|
assertNotNull(vdcURI, String.format(REF_REQ_LIVE, VDC));
|
||||||
Vdc vdc = vdcClient.getVdc(vdcURI);
|
Vdc vdc = vdcClient.getVdc(vdcURI);
|
||||||
|
@ -154,7 +154,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /media/{id}", dependsOnMethods = { "testCreateMedia" })
|
@Test(description = "GET /media/{id}", dependsOnMethods = { "testCreateMedia" })
|
||||||
public void testGetMedia() {
|
public void testGetMedia() {
|
||||||
media = mediaClient.getMedia(media.getHref());
|
media = mediaClient.getMedia(media.getHref());
|
||||||
assertNotNull(media, String.format(OBJ_REQ_LIVE, MEDIA));
|
assertNotNull(media, String.format(OBJ_REQ_LIVE, MEDIA));
|
||||||
|
@ -166,7 +166,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkMediaFor(MEDIA, media);
|
Checks.checkMediaFor(MEDIA, media);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /media/{id}/owner",
|
@Test(description = "GET /media/{id}/owner",
|
||||||
dependsOnMethods = { "testGetMedia" })
|
dependsOnMethods = { "testGetMedia" })
|
||||||
public void testGetMediaOwner() {
|
public void testGetMediaOwner() {
|
||||||
Owner directOwner = mediaClient.getOwner(media.getHref());
|
Owner directOwner = mediaClient.getOwner(media.getHref());
|
||||||
|
@ -185,7 +185,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkReferenceType(directOwner.getUser());
|
Checks.checkReferenceType(directOwner.getUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vdc/{id}/action/cloneMedia",
|
@Test(description = "POST /vdc/{id}/action/cloneMedia",
|
||||||
dependsOnMethods = { "testGetMediaOwner" })
|
dependsOnMethods = { "testGetMediaOwner" })
|
||||||
public void testCloneMedia() {
|
public void testCloneMedia() {
|
||||||
oldMedia = media;
|
oldMedia = media;
|
||||||
|
@ -235,7 +235,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
media.toString(), oldMedia.toString()));
|
media.toString(), oldMedia.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /media/{id}",
|
@Test(description = "PUT /media/{id}",
|
||||||
dependsOnMethods = { "testCloneMedia" })
|
dependsOnMethods = { "testCloneMedia" })
|
||||||
public void testSetMedia() {
|
public void testSetMedia() {
|
||||||
String oldName = media.getName();
|
String oldName = media.getName();
|
||||||
|
@ -265,7 +265,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
media = mediaClient.getMedia(media.getHref());
|
media = mediaClient.getMedia(media.getHref());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /media/{id}/metadata",
|
@Test(description = "GET /media/{id}/metadata",
|
||||||
dependsOnMethods = { "testSetMetadataValue" })
|
dependsOnMethods = { "testSetMetadataValue" })
|
||||||
public void testGetMetadata() {
|
public void testGetMetadata() {
|
||||||
metadata = mediaClient.getMetadataClient().getMetadata(media.getHref());
|
metadata = mediaClient.getMetadataClient().getMetadata(media.getHref());
|
||||||
|
@ -276,7 +276,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkMetadataFor(MEDIA, metadata);
|
Checks.checkMetadataFor(MEDIA, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /media/{id}/metadata",
|
@Test(description = "POST /media/{id}/metadata",
|
||||||
dependsOnMethods = { "testGetMedia" })
|
dependsOnMethods = { "testGetMedia" })
|
||||||
public void testMergeMetadata() {
|
public void testMergeMetadata() {
|
||||||
// test new
|
// test new
|
||||||
|
@ -329,14 +329,14 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /media/{id}/metadata/{key}",
|
@Test(description = "GET /media/{id}/metadata/{key}",
|
||||||
dependsOnMethods = { "testSetMetadataValue" })
|
dependsOnMethods = { "testSetMetadataValue" })
|
||||||
public void testGetMetadataValue() {
|
public void testGetMetadataValue() {
|
||||||
metadataValue = mediaClient.getMetadataClient().getMetadataValue(media.getHref(), "key");
|
metadataValue = mediaClient.getMetadataClient().getMetadataValue(media.getHref(), "key");
|
||||||
Checks.checkMetadataValueFor(MEDIA, metadataValue);
|
Checks.checkMetadataValueFor(MEDIA, metadataValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /media/{id}/metadata/{key}",
|
@Test(description = "PUT /media/{id}/metadata/{key}",
|
||||||
dependsOnMethods = { "testMergeMetadata" })
|
dependsOnMethods = { "testMergeMetadata" })
|
||||||
public void testSetMetadataValue() {
|
public void testSetMetadataValue() {
|
||||||
metadataEntryValue = "value";
|
metadataEntryValue = "value";
|
||||||
|
@ -350,7 +350,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkMetadataValueFor(MEDIA, metadataValue);
|
Checks.checkMetadataValueFor(MEDIA, metadataValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "DELETE /media/{id}/metadata/{key}",
|
@Test(description = "DELETE /media/{id}/metadata/{key}",
|
||||||
dependsOnMethods = { "testGetMetadata", "testGetMetadataValue" } )
|
dependsOnMethods = { "testGetMetadata", "testGetMetadataValue" } )
|
||||||
public void testDeleteMetadata() {
|
public void testDeleteMetadata() {
|
||||||
Task deleteMetadataEntry = mediaClient.getMetadataClient().deleteMetadataEntry(media.getHref(), "testKey");
|
Task deleteMetadataEntry = mediaClient.getMetadataClient().deleteMetadataEntry(media.getHref(), "testKey");
|
||||||
|
@ -387,7 +387,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkMediaFor(MEDIA, media);
|
Checks.checkMediaFor(MEDIA, media);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "DELETE /media/{id}",
|
@Test(description = "DELETE /media/{id}",
|
||||||
dependsOnMethods = { "testDeleteMetadata" } )
|
dependsOnMethods = { "testDeleteMetadata" } )
|
||||||
public void testDeleteMedia() {
|
public void testDeleteMedia() {
|
||||||
Task deleteMedia = mediaClient.deleteMedia(media.getHref());
|
Task deleteMedia = mediaClient.deleteMedia(media.getHref());
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* contributor license agreements. See the NOTICE file
|
* contributor license agreements. See the NOTICE file
|
||||||
* distributed with this work for additional information
|
* distributed with this work for additional information
|
||||||
*(Link.builder().regarding copyright ownership. jclouds licenses this file
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
* to you under the Apache License, Version 2.0 (the
|
* to you under the Apache License, Version 2.0 (the
|
||||||
* "License"); you may not use this file except in compliance
|
* "License"); you may not use this file except in compliance
|
||||||
* with the License. You may obtain a copy of the License at
|
* with the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless(Link.builder().required by applicable law or agreed to in writing,
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* software distributed under the License is distributed on an
|
* software distributed under the License is distributed on an
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
* KIND, either express or implied. See the License for the
|
* KIND, either express or implied. See the License for the
|
||||||
|
@ -72,7 +72,7 @@ public class NetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
.deleteMetadataEntry(toAdminUri(networkURI), "key");
|
.deleteMetadataEntry(toAdminUri(networkURI), "key");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /network/{id}")
|
@Test(description = "GET /network/{id}")
|
||||||
public void testGetNetwork() {
|
public void testGetNetwork() {
|
||||||
// required for testing
|
// required for testing
|
||||||
assertNotNull(networkURI, String.format(REF_REQ_LIVE, NETWORK));
|
assertNotNull(networkURI, String.format(REF_REQ_LIVE, NETWORK));
|
||||||
|
@ -87,7 +87,7 @@ public class NetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkOrgNetwork(network);
|
Checks.checkOrgNetwork(network);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /network/{id}/metadata")
|
@Test(description = "GET /network/{id}/metadata")
|
||||||
public void testGetMetadata() {
|
public void testGetMetadata() {
|
||||||
Metadata metadata = networkClient.getMetadataClient().getMetadata(networkURI);
|
Metadata metadata = networkClient.getMetadataClient().getMetadata(networkURI);
|
||||||
// required for testing
|
// required for testing
|
||||||
|
@ -109,7 +109,7 @@ public class NetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /network/{id}/metadata/{key}")
|
@Test(description = "GET /network/{id}/metadata/{key}")
|
||||||
public void testGetMetadataValue() {
|
public void testGetMetadataValue() {
|
||||||
MetadataValue metadataValue = networkClient.getMetadataClient().getMetadataValue(networkURI, "key");
|
MetadataValue metadataValue = networkClient.getMetadataClient().getMetadataValue(networkURI, "key");
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class OrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
orgClient = context.getApi().getOrgClient();
|
orgClient = context.getApi().getOrgClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass(groups = { "live" })
|
@AfterClass(alwaysRun = true)
|
||||||
public void cleanUp() throws Exception {
|
public void cleanUp() throws Exception {
|
||||||
if (metadataSet) {
|
if (metadataSet) {
|
||||||
context.getApi().getAdminOrgClient().getMetadataClient()
|
context.getApi().getAdminOrgClient().getMetadataClient()
|
||||||
|
@ -83,7 +83,7 @@ public class OrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
private Org org;
|
private Org org;
|
||||||
private boolean metadataSet = false;
|
private boolean metadataSet = false;
|
||||||
|
|
||||||
@Test(testName = "GET /org")
|
@Test(description = "GET /org")
|
||||||
public void testGetOrgList() {
|
public void testGetOrgList() {
|
||||||
// Call the method being tested
|
// Call the method being tested
|
||||||
orgList = orgClient.getOrgList();
|
orgList = orgClient.getOrgList();
|
||||||
|
@ -99,7 +99,7 @@ public class OrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /org/{id}", dependsOnMethods = { "testGetOrgList" })
|
@Test(description = "GET /org/{id}", dependsOnMethods = { "testGetOrgList" })
|
||||||
public void testGetOrg() {
|
public void testGetOrg() {
|
||||||
Reference orgRef = Iterables.getFirst(orgList.getOrgs(), null);
|
Reference orgRef = Iterables.getFirst(orgList.getOrgs(), null);
|
||||||
assertNotNull(orgRef);
|
assertNotNull(orgRef);
|
||||||
|
@ -112,14 +112,14 @@ public class OrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
checkOrg(org);
|
checkOrg(org);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "orgClient admin metadata setup", dependsOnMethods = { "testGetOrg" })
|
@Test(description = "orgClient admin metadata setup", dependsOnMethods = { "testGetOrg" })
|
||||||
public void testSetupMetadata() {
|
public void testSetupMetadata() {
|
||||||
context.getApi().getAdminOrgClient().getMetadataClient().setMetadata(toAdminUri(orgURI),
|
context.getApi().getAdminOrgClient().getMetadataClient().setMetadata(toAdminUri(orgURI),
|
||||||
"KEY", MetadataValue.builder().value("VALUE").build());
|
"KEY", MetadataValue.builder().value("VALUE").build());
|
||||||
metadataSet = true;
|
metadataSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /org/{id}/metadata", dependsOnMethods = { "testSetupMetadata" })
|
@Test(description = "GET /org/{id}/metadata", dependsOnMethods = { "testSetupMetadata" })
|
||||||
public void testGetOrgMetadata() {
|
public void testGetOrgMetadata() {
|
||||||
// Call the method being tested
|
// Call the method being tested
|
||||||
Metadata metadata = orgClient.getMetadataClient().getMetadata(orgURI);
|
Metadata metadata = orgClient.getMetadataClient().getMetadata(orgURI);
|
||||||
|
@ -132,7 +132,7 @@ public class OrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
assertFalse(Iterables.isEmpty(metadata.getMetadataEntries()), String.format(NOT_EMPTY_OBJECT_FMT, "MetadataEntry", "Org"));
|
assertFalse(Iterables.isEmpty(metadata.getMetadataEntries()), String.format(NOT_EMPTY_OBJECT_FMT, "MetadataEntry", "Org"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /org/{id}/metadata/{key}", dependsOnMethods = { "testGetOrgMetadata" })
|
@Test(description = "GET /org/{id}/metadata/{key}", dependsOnMethods = { "testGetOrgMetadata" })
|
||||||
public void testGetOrgMetadataValue() {
|
public void testGetOrgMetadataValue() {
|
||||||
// Call the method being tested
|
// Call the method being tested
|
||||||
MetadataValue value = orgClient.getMetadataClient().getMetadataValue(orgURI, "KEY");
|
MetadataValue value = orgClient.getMetadataClient().getMetadataValue(orgURI, "KEY");
|
||||||
|
@ -145,7 +145,7 @@ public class OrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
assertEquals(value.getValue(), expected, String.format(CORRECT_VALUE_OBJECT_FMT, "Value", "MetadataValue", expected, value.getValue()));
|
assertEquals(value.getValue(), expected, String.format(CORRECT_VALUE_OBJECT_FMT, "Value", "MetadataValue", expected, value.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /org/{id}/catalog/{catalogId}/controlAccess", dependsOnMethods = { "testGetOrg" })
|
@Test(description = "GET /org/{id}/catalog/{catalogId}/controlAccess", dependsOnMethods = { "testGetOrg" })
|
||||||
public void testGetControlAccess() {
|
public void testGetControlAccess() {
|
||||||
// Call the method being tested
|
// Call the method being tested
|
||||||
ControlAccessParams params = orgClient.getControlAccess(orgURI, catalogId);
|
ControlAccessParams params = orgClient.getControlAccess(orgURI, catalogId);
|
||||||
|
@ -154,7 +154,7 @@ public class OrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
checkControlAccessParams(params);
|
checkControlAccessParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /org/{id}/catalog/{catalogId}/action/controlAccess", dependsOnMethods = { "testGetControlAccess" })
|
@Test(description = "GET /org/{id}/catalog/{catalogId}/action/controlAccess", dependsOnMethods = { "testGetControlAccess" })
|
||||||
public void testModifyControlAccess() {
|
public void testModifyControlAccess() {
|
||||||
// Setup params
|
// Setup params
|
||||||
ControlAccessParams params = orgClient.getControlAccess(orgURI, catalogId);
|
ControlAccessParams params = orgClient.getControlAccess(orgURI, catalogId);
|
||||||
|
|
|
@ -89,7 +89,7 @@ public class QueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
vAppClient = context.getApi().getVAppClient();
|
vAppClient = context.getApi().getVAppClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /entity/{id}")
|
@Test(description = "GET /entity/{id}")
|
||||||
public void testEntity() {
|
public void testEntity() {
|
||||||
// Get a VAppTemplate to look up as an entity
|
// Get a VAppTemplate to look up as an entity
|
||||||
VAppTemplate vAppTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI);
|
VAppTemplate vAppTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI);
|
||||||
|
@ -107,7 +107,7 @@ public class QueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /query")
|
@Test(description = "GET /query")
|
||||||
public void testQuery() {
|
public void testQuery() {
|
||||||
VAppTemplate vAppTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI);
|
VAppTemplate vAppTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI);
|
||||||
QueryResultRecords queryResult = queryClient.query("vAppTemplate", String.format("name==%s", vAppTemplate.getName()));
|
QueryResultRecords queryResult = queryClient.query("vAppTemplate", String.format("name==%s", vAppTemplate.getName()));
|
||||||
|
@ -117,19 +117,19 @@ public class QueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
assertTrue(hrefs.contains(vAppTemplateURI), "VAppTemplates query result should include vAppTemplate "+vAppTemplateURI+"; but only has "+hrefs);
|
assertTrue(hrefs.contains(vAppTemplateURI), "VAppTemplates query result should include vAppTemplate "+vAppTemplateURI+"; but only has "+hrefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /catalogs/query")
|
@Test(description = "GET /catalogs/query")
|
||||||
public void testQueryAllCatalogs() {
|
public void testQueryAllCatalogs() {
|
||||||
QueryResultRecords catalogRecords = queryClient.catalogsQueryAll();
|
QueryResultRecords catalogRecords = queryClient.catalogsQueryAll();
|
||||||
assertFalse(catalogRecords.getRecords().isEmpty(), String.format(NOT_EMPTY_OBJECT_FMT, "CatalogRecord", "QueryResultRecords"));
|
assertFalse(catalogRecords.getRecords().isEmpty(), String.format(NOT_EMPTY_OBJECT_FMT, "CatalogRecord", "QueryResultRecords"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /catalogs/query?format=references", dependsOnMethods = { "testQueryAllCatalogs" })
|
@Test(description = "GET /catalogs/query?format=references", dependsOnMethods = { "testQueryAllCatalogs" })
|
||||||
public void testQueryAllCatalogReferences() {
|
public void testQueryAllCatalogReferences() {
|
||||||
CatalogReferences catalogReferences = queryClient.catalogReferencesQueryAll();
|
CatalogReferences catalogReferences = queryClient.catalogReferencesQueryAll();
|
||||||
assertFalse(catalogReferences.getReferences().isEmpty(), String.format(NOT_EMPTY_OBJECT_FMT, "CatalogReference", "CatalogReferences"));
|
assertFalse(catalogReferences.getReferences().isEmpty(), String.format(NOT_EMPTY_OBJECT_FMT, "CatalogReference", "CatalogReferences"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplates/query")
|
@Test(description = "GET /vAppTemplates/query")
|
||||||
public void testQueryAllVAppTemplates() {
|
public void testQueryAllVAppTemplates() {
|
||||||
QueryResultRecords queryResult = queryClient.vAppTemplatesQueryAll();
|
QueryResultRecords queryResult = queryClient.vAppTemplatesQueryAll();
|
||||||
Set<URI> hrefs = toHrefs(queryResult);
|
Set<URI> hrefs = toHrefs(queryResult);
|
||||||
|
@ -138,7 +138,7 @@ public class QueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
assertTrue(hrefs.contains(vAppTemplateURI), "VAppTemplates query result should include vAppTemplate "+vAppTemplateURI+"; but only has "+hrefs);
|
assertTrue(hrefs.contains(vAppTemplateURI), "VAppTemplates query result should include vAppTemplate "+vAppTemplateURI+"; but only has "+hrefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplates/query?filter)")
|
@Test(description = "GET /vAppTemplates/query?filter")
|
||||||
public void testQueryVAppTemplatesWithFilter() {
|
public void testQueryVAppTemplatesWithFilter() {
|
||||||
VAppTemplate vAppTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI);
|
VAppTemplate vAppTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI);
|
||||||
QueryResultRecords queryResult = queryClient.vAppTemplatesQuery(String.format("name==%s", vAppTemplate.getName()));
|
QueryResultRecords queryResult = queryClient.vAppTemplatesQuery(String.format("name==%s", vAppTemplate.getName()));
|
||||||
|
@ -148,7 +148,7 @@ public class QueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
assertTrue(hrefs.contains(vAppTemplateURI), "VAppTemplates query result should have found vAppTemplate "+vAppTemplateURI);
|
assertTrue(hrefs.contains(vAppTemplateURI), "VAppTemplates query result should have found vAppTemplate "+vAppTemplateURI);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApps/query")
|
@Test(description = "GET /vApps/query")
|
||||||
public void testQueryAllVApps() {
|
public void testQueryAllVApps() {
|
||||||
vApp = instantiateVApp();
|
vApp = instantiateVApp();
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ public class QueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
assertTrue(hrefs.contains(vApp.getHref()), "VApp query result should include vapp "+vApp.getHref()+"; but only has "+hrefs);
|
assertTrue(hrefs.contains(vApp.getHref()), "VApp query result should include vapp "+vApp.getHref()+"; but only has "+hrefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApps/query?filter", dependsOnMethods = { "testQueryAllVApps" } )
|
@Test(description = "GET /vApps/query?filter", dependsOnMethods = { "testQueryAllVApps" } )
|
||||||
public void testQueryVAppsWithFilter() {
|
public void testQueryVAppsWithFilter() {
|
||||||
QueryResultRecords queryResult = queryClient.vAppsQuery(String.format("name==%s", vApp.getName()));
|
QueryResultRecords queryResult = queryClient.vAppsQuery(String.format("name==%s", vApp.getName()));
|
||||||
Set<URI> hrefs = toHrefs(queryResult);
|
Set<URI> hrefs = toHrefs(queryResult);
|
||||||
|
@ -168,7 +168,7 @@ public class QueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
assertEquals(hrefs, Collections.singleton(vApp.getHref()), "VApps query result should have found vApp "+vApp.getHref());
|
assertEquals(hrefs, Collections.singleton(vApp.getHref()), "VApps query result should have found vApp "+vApp.getHref());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vms/query", dependsOnMethods = { "testQueryAllVApps" } )
|
@Test(description = "GET /vms/query", dependsOnMethods = { "testQueryAllVApps" } )
|
||||||
public void testQueryAllVms() {
|
public void testQueryAllVms() {
|
||||||
// Wait for vApp to have been entirely instantiated
|
// Wait for vApp to have been entirely instantiated
|
||||||
Task instantiateTask = Iterables.getFirst(vApp.getTasks(), null);
|
Task instantiateTask = Iterables.getFirst(vApp.getTasks(), null);
|
||||||
|
@ -192,7 +192,7 @@ public class QueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
assertTrue(hrefs.containsAll(vmHrefs), "VMs query result should include vms "+vmHrefs+"; but only has "+hrefs);
|
assertTrue(hrefs.containsAll(vmHrefs), "VMs query result should include vms "+vmHrefs+"; but only has "+hrefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vms/query?filter", dependsOnMethods = { "testQueryAllVms" } )
|
@Test(description = "GET /vms/query?filter", dependsOnMethods = { "testQueryAllVms" } )
|
||||||
public void testQueryAllVmsWithFilter() {
|
public void testQueryAllVmsWithFilter() {
|
||||||
List<Vm> vms = vApp.getChildren().getVms();
|
List<Vm> vms = vApp.getChildren().getVms();
|
||||||
Set<URI> vmHrefs = toHrefs(vms);
|
Set<URI> vmHrefs = toHrefs(vms);
|
||||||
|
@ -204,14 +204,14 @@ public class QueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
assertEquals(hrefs, vmHrefs, "VMs query result should equal vms of vApp "+vApp.getName()+" ("+vmHrefs+"); but only has "+hrefs);
|
assertEquals(hrefs, vmHrefs, "VMs query result should equal vms of vApp "+vApp.getName()+" ("+vmHrefs+"); but only has "+hrefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /mediaList/query")
|
@Test(description = "GET /mediaList/query")
|
||||||
public void testQueryAllMedia() {
|
public void testQueryAllMedia() {
|
||||||
QueryResultRecords queryResult = queryClient.mediaListQueryAll();
|
QueryResultRecords queryResult = queryClient.mediaListQueryAll();
|
||||||
|
|
||||||
assertRecordTypes(queryResult, Arrays.asList(VCloudDirectorMediaType.VAPP, null), QueryResultMediaRecord.class);
|
assertRecordTypes(queryResult, Arrays.asList(VCloudDirectorMediaType.VAPP, null), QueryResultMediaRecord.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /mediaList/query?filter")
|
@Test(description = "GET /mediaList/query?filter")
|
||||||
public void testQueryMediaWithFilter() {
|
public void testQueryMediaWithFilter() {
|
||||||
String mediaName = "abc";
|
String mediaName = "abc";
|
||||||
QueryResultRecords queryResult = queryClient.mediaListQuery(String.format("name==%s", mediaName));
|
QueryResultRecords queryResult = queryClient.mediaListQuery(String.format("name==%s", mediaName));
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class TaskClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
if (vApp != null) cleanUpVApp(vApp);
|
if (vApp != null) cleanUpVApp(vApp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /tasksList/{id}")
|
@Test(description = "GET /tasksList/{id}")
|
||||||
public void testGetTaskList() {
|
public void testGetTaskList() {
|
||||||
orgList = orgClient.getOrgList();
|
orgList = orgClient.getOrgList();
|
||||||
Reference orgRef = Iterables.getFirst(orgList.getOrgs(), null);
|
Reference orgRef = Iterables.getFirst(orgList.getOrgs(), null);
|
||||||
|
@ -97,7 +97,7 @@ public class TaskClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /task/{id}", dependsOnMethods = { "testGetTaskList" })
|
@Test(description = "GET /task/{id}", dependsOnMethods = { "testGetTaskList" })
|
||||||
public void testGetTask() {
|
public void testGetTask() {
|
||||||
//TODO: upload media or something so you can get a fresh cancellable task?
|
//TODO: upload media or something so you can get a fresh cancellable task?
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ public class TaskClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
|
|
||||||
// FIXME cancelTask complains "This task can not be canceled"
|
// FIXME cancelTask complains "This task can not be canceled"
|
||||||
// However, when I do this through the UI, I can cancel the task for instantiating a vApp.
|
// However, when I do this through the UI, I can cancel the task for instantiating a vApp.
|
||||||
@Test(testName = "POST /task/{id}/action/cancel", dependsOnMethods = { "testGetTask" })
|
@Test(description = "POST /task/{id}/action/cancel", dependsOnMethods = { "testGetTask" })
|
||||||
public void testCancelTask() {
|
public void testCancelTask() {
|
||||||
vApp = instantiateVApp();
|
vApp = instantiateVApp();
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class UploadClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
uploadClient = context.getApi().getUploadClient();
|
uploadClient = context.getApi().getUploadClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT ???", enabled = false)
|
@Test(description = "PUT ???", enabled = false)
|
||||||
public void testUpload() {
|
public void testUpload() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,14 +89,14 @@ public class UserClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /admin/org/{id}/users")
|
@Test(description = "POST /admin/org/{id}/users")
|
||||||
public void testCreateUser() {
|
public void testCreateUser() {
|
||||||
User newUser = randomTestUser("testCreateUser", context);
|
User newUser = randomTestUser("testCreateUser", context);
|
||||||
user = userClient.createUser(orgRef.getHref(), newUser);
|
user = userClient.createUser(orgRef.getHref(), newUser);
|
||||||
Checks.checkUser(newUser);
|
Checks.checkUser(newUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /admin/user/{id}",
|
@Test(description = "GET /admin/user/{id}",
|
||||||
dependsOnMethods = { "testCreateUser" })
|
dependsOnMethods = { "testCreateUser" })
|
||||||
public void testGetUser() {
|
public void testGetUser() {
|
||||||
user = userClient.getUser(user.getHref());
|
user = userClient.getUser(user.getHref());
|
||||||
|
@ -104,7 +104,7 @@ public class UserClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkUser(user);
|
Checks.checkUser(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /admin/user/{id}",
|
@Test(description = "PUT /admin/user/{id}",
|
||||||
dependsOnMethods = { "testGetUser" })
|
dependsOnMethods = { "testGetUser" })
|
||||||
public void testUpdateUser() {
|
public void testUpdateUser() {
|
||||||
User oldUser = user.toBuilder().build();
|
User oldUser = user.toBuilder().build();
|
||||||
|
@ -162,7 +162,7 @@ public class UserClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
sessionClient.logoutSessionWithToken(sessionWithToken.getSession().getHref(), sessionWithToken.getToken());
|
sessionClient.logoutSessionWithToken(sessionWithToken.getSession().getHref(), sessionWithToken.getToken());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /admin/user/{id}/action/unlock", dependsOnMethods = { "testUpdateUser" })
|
@Test(description = "POST /admin/user/{id}/action/unlock", dependsOnMethods = { "testUpdateUser" })
|
||||||
public void testUnlockUser() {
|
public void testUnlockUser() {
|
||||||
// Need to know how many times to fail login to lock account
|
// Need to know how many times to fail login to lock account
|
||||||
AdminOrgClient adminOrgClient = context.getApi().getAdminOrgClient();
|
AdminOrgClient adminOrgClient = context.getApi().getAdminOrgClient();
|
||||||
|
@ -216,7 +216,7 @@ public class UserClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "DELETE /admin/user/{id}",
|
@Test(description = "DELETE /admin/user/{id}",
|
||||||
dependsOnMethods = { "testCreateUser" } )
|
dependsOnMethods = { "testCreateUser" } )
|
||||||
public void testDeleteUser() {
|
public void testDeleteUser() {
|
||||||
// Create a user to be deleted (so we remove dependencies on test ordering)
|
// Create a user to be deleted (so we remove dependencies on test ordering)
|
||||||
|
|
|
@ -125,7 +125,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
/**
|
/**
|
||||||
* @see VAppClient#getVApp(URI)
|
* @see VAppClient#getVApp(URI)
|
||||||
*/
|
*/
|
||||||
@Test(testName = "GET /vApp/{id}")
|
@Test(description = "GET /vApp/{id}")
|
||||||
public void testGetVApp() {
|
public void testGetVApp() {
|
||||||
// The method under test
|
// The method under test
|
||||||
vApp = vAppClient.getVApp(vAppURI);
|
vApp = vAppClient.getVApp(vAppURI);
|
||||||
|
@ -148,7 +148,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
/**
|
/**
|
||||||
* @see VAppClient#modifyVApp(URI, VApp)
|
* @see VAppClient#modifyVApp(URI, VApp)
|
||||||
*/
|
*/
|
||||||
@Test(testName = "PUT /vApp/{id}", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "PUT /vApp/{id}", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testModifyVApp() {
|
public void testModifyVApp() {
|
||||||
VApp newVApp = VApp.builder()
|
VApp newVApp = VApp.builder()
|
||||||
.name(name("new-name-"))
|
.name(name("new-name-"))
|
||||||
|
@ -168,7 +168,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(vApp.getDescription(), newVApp.getDescription(), String.format(OBJ_FIELD_EQ, VAPP, "Description", newVApp.getDescription(), vApp.getDescription()));
|
assertEquals(vApp.getDescription(), newVApp.getDescription(), String.format(OBJ_FIELD_EQ, VAPP, "Description", newVApp.getDescription(), vApp.getDescription()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/action/deploy", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "POST /vApp/{id}/action/deploy", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testDeployVApp() {
|
public void testDeployVApp() {
|
||||||
DeployVAppParams params = DeployVAppParams.builder()
|
DeployVAppParams params = DeployVAppParams.builder()
|
||||||
.deploymentLeaseSeconds((int) TimeUnit.SECONDS.convert(1L, TimeUnit.HOURS))
|
.deploymentLeaseSeconds((int) TimeUnit.SECONDS.convert(1L, TimeUnit.HOURS))
|
||||||
|
@ -190,7 +190,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertVAppStatus(vAppURI, Status.POWERED_OFF);
|
assertVAppStatus(vAppURI, Status.POWERED_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/power/action/powerOn", dependsOnMethods = { "testDeployVApp" })
|
@Test(description = "POST /vApp/{id}/power/action/powerOn", dependsOnMethods = { "testDeployVApp" })
|
||||||
public void testPowerOnVApp() {
|
public void testPowerOnVApp() {
|
||||||
// Power off VApp
|
// Power off VApp
|
||||||
vApp = powerOff(vApp);
|
vApp = powerOff(vApp);
|
||||||
|
@ -206,7 +206,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertVAppStatus(vAppURI, Status.POWERED_ON);
|
assertVAppStatus(vAppURI, Status.POWERED_ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/power/action/reboot", dependsOnMethods = { "testDeployVApp" })
|
@Test(description = "POST /vApp/{id}/power/action/reboot", dependsOnMethods = { "testDeployVApp" })
|
||||||
public void testReboot() {
|
public void testReboot() {
|
||||||
// Power on VApp
|
// Power on VApp
|
||||||
vApp = powerOn(vApp);
|
vApp = powerOn(vApp);
|
||||||
|
@ -222,7 +222,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertVAppStatus(vAppURI, Status.POWERED_OFF);
|
assertVAppStatus(vAppURI, Status.POWERED_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/power/action/shutdown", dependsOnMethods = { "testDeployVApp" })
|
@Test(description = "POST /vApp/{id}/power/action/shutdown", dependsOnMethods = { "testDeployVApp" })
|
||||||
public void testShutdown() {
|
public void testShutdown() {
|
||||||
// Power on VApp
|
// Power on VApp
|
||||||
vApp = powerOn(vApp);
|
vApp = powerOn(vApp);
|
||||||
|
@ -241,7 +241,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
vApp = powerOn(vApp);
|
vApp = powerOn(vApp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/power/action/suspend", dependsOnMethods = { "testDeployVApp" })
|
@Test(description = "POST /vApp/{id}/power/action/suspend", dependsOnMethods = { "testDeployVApp" })
|
||||||
public void testSuspend() {
|
public void testSuspend() {
|
||||||
// Power on VApp
|
// Power on VApp
|
||||||
vApp = powerOn(vApp);
|
vApp = powerOn(vApp);
|
||||||
|
@ -260,7 +260,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
vApp = powerOn(vApp);
|
vApp = powerOn(vApp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/power/action/reset", dependsOnMethods = { "testDeployVApp" })
|
@Test(description = "POST /vApp/{id}/power/action/reset", dependsOnMethods = { "testDeployVApp" })
|
||||||
public void testReset() {
|
public void testReset() {
|
||||||
// Power on VApp
|
// Power on VApp
|
||||||
vApp = powerOn(vApp);
|
vApp = powerOn(vApp);
|
||||||
|
@ -276,7 +276,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertVAppStatus(vAppURI, Status.POWERED_ON);
|
assertVAppStatus(vAppURI, Status.POWERED_ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/action/undeploy", dependsOnMethods = { "testDeployVApp" })
|
@Test(description = "POST /vApp/{id}/action/undeploy", dependsOnMethods = { "testDeployVApp" })
|
||||||
public void testUndeployVApp() {
|
public void testUndeployVApp() {
|
||||||
// Power on VApp
|
// Power on VApp
|
||||||
vApp = powerOn(vApp);
|
vApp = powerOn(vApp);
|
||||||
|
@ -295,7 +295,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertVAppStatus(vAppURI, Status.POWERED_OFF);
|
assertVAppStatus(vAppURI, Status.POWERED_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/power/action/powerOff", dependsOnMethods = { "testUndeployVApp" })
|
@Test(description = "POST /vApp/{id}/power/action/powerOff", dependsOnMethods = { "testUndeployVApp" })
|
||||||
public void testPowerOffVApp() {
|
public void testPowerOffVApp() {
|
||||||
// Power on VApp
|
// Power on VApp
|
||||||
vApp = powerOn(vApp);
|
vApp = powerOn(vApp);
|
||||||
|
@ -311,7 +311,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertVAppStatus(vAppURI, Status.POWERED_OFF);
|
assertVAppStatus(vAppURI, Status.POWERED_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/action/consolidate", dependsOnMethods = { "testDeployVApp" })
|
@Test(description = "POST /vApp/{id}/action/consolidate", dependsOnMethods = { "testDeployVApp" })
|
||||||
public void testConsolidateVApp() {
|
public void testConsolidateVApp() {
|
||||||
// Power on VApp
|
// Power on VApp
|
||||||
vApp = powerOn(vApp);
|
vApp = powerOn(vApp);
|
||||||
|
@ -321,7 +321,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertTrue(retryTaskSuccess.apply(consolidateVApp), String.format(TASK_COMPLETE_TIMELY, "consolidateVApp"));
|
assertTrue(retryTaskSuccess.apply(consolidateVApp), String.format(TASK_COMPLETE_TIMELY, "consolidateVApp"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/action/controlAccess", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "POST /vApp/{id}/action/controlAccess", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testControlAccessUser() {
|
public void testControlAccessUser() {
|
||||||
ControlAccessParams params = ControlAccessParams.builder()
|
ControlAccessParams params = ControlAccessParams.builder()
|
||||||
.notSharedToEveryone()
|
.notSharedToEveryone()
|
||||||
|
@ -342,7 +342,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(modified, params, String.format(ENTITY_EQUAL, "ControlAccessParams"));
|
assertEquals(modified, params, String.format(ENTITY_EQUAL, "ControlAccessParams"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/action/controlAccess", dependsOnMethods = { "testControlAccessUser" })
|
@Test(description = "POST /vApp/{id}/action/controlAccess", dependsOnMethods = { "testControlAccessUser" })
|
||||||
public void testControlAccessEveryone() {
|
public void testControlAccessEveryone() {
|
||||||
ControlAccessParams params = ControlAccessParams.builder()
|
ControlAccessParams params = ControlAccessParams.builder()
|
||||||
.sharedToEveryone()
|
.sharedToEveryone()
|
||||||
|
@ -359,7 +359,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(modified, params, String.format(ENTITY_EQUAL, "ControlAccessParams"));
|
assertEquals(modified, params, String.format(ENTITY_EQUAL, "ControlAccessParams"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/action/discardSuspendedState", dependsOnMethods = { "testDeployVApp" })
|
@Test(description = "POST /vApp/{id}/action/discardSuspendedState", dependsOnMethods = { "testDeployVApp" })
|
||||||
public void testDiscardSuspendedState() {
|
public void testDiscardSuspendedState() {
|
||||||
// Suspend the VApp
|
// Suspend the VApp
|
||||||
vApp = suspend(vAppURI);
|
vApp = suspend(vAppURI);
|
||||||
|
@ -369,7 +369,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertTrue(retryTaskSuccess.apply(discardSuspendedState), String.format(TASK_COMPLETE_TIMELY, "discardSuspendedState"));
|
assertTrue(retryTaskSuccess.apply(discardSuspendedState), String.format(TASK_COMPLETE_TIMELY, "discardSuspendedState"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/action/enterMaintenanceMode")
|
@Test(description = "POST /vApp/{id}/action/enterMaintenanceMode")
|
||||||
public void testEnterMaintenanceMode() {
|
public void testEnterMaintenanceMode() {
|
||||||
// Do this to a new vApp, so don't mess up subsequent tests by making the vApp read-only
|
// Do this to a new vApp, so don't mess up subsequent tests by making the vApp read-only
|
||||||
VApp temp = instantiateVApp();
|
VApp temp = instantiateVApp();
|
||||||
|
@ -395,7 +395,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/action/exitMaintenanceMode", dependsOnMethods = { "testEnterMaintenanceMode" })
|
@Test(description = "POST /vApp/{id}/action/exitMaintenanceMode", dependsOnMethods = { "testEnterMaintenanceMode" })
|
||||||
public void testExitMaintenanceMode() {
|
public void testExitMaintenanceMode() {
|
||||||
// Do this to a new vApp, so don't mess up subsequent tests by making the vApp read-only
|
// Do this to a new vApp, so don't mess up subsequent tests by making the vApp read-only
|
||||||
VApp temp = instantiateVApp();
|
VApp temp = instantiateVApp();
|
||||||
|
@ -421,7 +421,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/action/installVMwareTools", dependsOnMethods = { "testDeployVApp" })
|
@Test(description = "POST /vApp/{id}/action/installVMwareTools", dependsOnMethods = { "testDeployVApp" })
|
||||||
public void testInstallVMwareTools() {
|
public void testInstallVMwareTools() {
|
||||||
// First ensure the vApp is powered n
|
// First ensure the vApp is powered n
|
||||||
vApp = powerOn(vApp);
|
vApp = powerOn(vApp);
|
||||||
|
@ -434,7 +434,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
// FIXME "Could not bind object to request[method=POST, endpoint=https://mycloud.greenhousedata.com/api/vApp/vapp-e124f3f0-adb9-4268-ad49-e54fb27e40af/action/recomposeVApp,
|
// FIXME "Could not bind object to request[method=POST, endpoint=https://mycloud.greenhousedata.com/api/vApp/vapp-e124f3f0-adb9-4268-ad49-e54fb27e40af/action/recomposeVApp,
|
||||||
// headers={Accept=[application/vnd.vmware.vcloud.task+xml]}, payload=[content=true, contentMetadata=[contentDisposition=null, contentEncoding=null, contentLanguage=null,
|
// headers={Accept=[application/vnd.vmware.vcloud.task+xml]}, payload=[content=true, contentMetadata=[contentDisposition=null, contentEncoding=null, contentLanguage=null,
|
||||||
// contentLength=0, contentMD5=null, contentType=application/vnd.vmware.vcloud.recomposeVAppParams+xml], written=false]]: Could not marshall object"
|
// contentLength=0, contentMD5=null, contentType=application/vnd.vmware.vcloud.recomposeVAppParams+xml], written=false]]: Could not marshall object"
|
||||||
@Test(testName = "POST /vApp/{id}/action/recomposeVApp", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "POST /vApp/{id}/action/recomposeVApp", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testRecomposeVApp() {
|
public void testRecomposeVApp() {
|
||||||
RecomposeVAppParams params = RecomposeVAppParams.builder().build();
|
RecomposeVAppParams params = RecomposeVAppParams.builder().build();
|
||||||
|
|
||||||
|
@ -444,7 +444,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE This test is disabled, as it is not possible to look up datastores using the User API
|
// NOTE This test is disabled, as it is not possible to look up datastores using the User API
|
||||||
@Test(testName = "POST /vApp/{id}/action/relocate", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "POST /vApp/{id}/action/relocate", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testRelocate() {
|
public void testRelocate() {
|
||||||
// Relocate to the last of the available datastores
|
// Relocate to the last of the available datastores
|
||||||
QueryResultRecords records = context.getApi().getQueryClient().queryAll("datastore");
|
QueryResultRecords records = context.getApi().getQueryClient().queryAll("datastore");
|
||||||
|
@ -456,7 +456,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertTrue(retryTaskSuccess.apply(relocate), String.format(TASK_COMPLETE_TIMELY, "relocate"));
|
assertTrue(retryTaskSuccess.apply(relocate), String.format(TASK_COMPLETE_TIMELY, "relocate"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/action/upgradeHardwareVersion", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "POST /vApp/{id}/action/upgradeHardwareVersion", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testUpgradeHardwareVersion() {
|
public void testUpgradeHardwareVersion() {
|
||||||
// Power off VApp
|
// Power off VApp
|
||||||
vApp = powerOff(vApp);
|
vApp = powerOff(vApp);
|
||||||
|
@ -466,7 +466,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertTrue(retryTaskSuccess.apply(upgradeHardwareVersion), String.format(TASK_COMPLETE_TIMELY, "upgradeHardwareVersion"));
|
assertTrue(retryTaskSuccess.apply(upgradeHardwareVersion), String.format(TASK_COMPLETE_TIMELY, "upgradeHardwareVersion"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/controlAccess", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "GET /vApp/{id}/controlAccess", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testGetControlAccess() {
|
public void testGetControlAccess() {
|
||||||
// The method under test
|
// The method under test
|
||||||
ControlAccessParams controlAccess = vAppClient.getControlAccess(vApp.getHref());
|
ControlAccessParams controlAccess = vAppClient.getControlAccess(vApp.getHref());
|
||||||
|
@ -475,7 +475,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkControlAccessParams(controlAccess);
|
checkControlAccessParams(controlAccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/guestCustomizationSection", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "GET /vApp/{id}/guestCustomizationSection", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testGetGuestCustomizationSection() {
|
public void testGetGuestCustomizationSection() {
|
||||||
getGuestCustomizationSection(new Function<URI, GuestCustomizationSection>() {
|
getGuestCustomizationSection(new Function<URI, GuestCustomizationSection>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -485,7 +485,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/guestCustomizationSection", dependsOnMethods = { "testGetGuestCustomizationSection" })
|
@Test(description = "PUT /vApp/{id}/guestCustomizationSection", dependsOnMethods = { "testGetGuestCustomizationSection" })
|
||||||
public void testModifyGuestCustomizationSection() {
|
public void testModifyGuestCustomizationSection() {
|
||||||
// Copy existing section and update fields
|
// Copy existing section and update fields
|
||||||
GuestCustomizationSection oldSection = vAppClient.getGuestCustomizationSection(vm.getHref());
|
GuestCustomizationSection oldSection = vAppClient.getGuestCustomizationSection(vm.getHref());
|
||||||
|
@ -516,7 +516,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(modified, newSection, String.format(ENTITY_EQUAL, "GuestCustomizationSection"));
|
assertEquals(modified, newSection, String.format(ENTITY_EQUAL, "GuestCustomizationSection"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/leaseSettingsSection", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "GET /vApp/{id}/leaseSettingsSection", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testGetLeaseSettingsSection() {
|
public void testGetLeaseSettingsSection() {
|
||||||
// The method under test
|
// The method under test
|
||||||
LeaseSettingsSection section = vAppClient.getLeaseSettingsSection(vApp.getHref());
|
LeaseSettingsSection section = vAppClient.getLeaseSettingsSection(vApp.getHref());
|
||||||
|
@ -525,7 +525,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkLeaseSettingsSection(section);
|
checkLeaseSettingsSection(section);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/leaseSettingsSection", dependsOnMethods = { "testGetLeaseSettingsSection" })
|
@Test(description = "PUT /vApp/{id}/leaseSettingsSection", dependsOnMethods = { "testGetLeaseSettingsSection" })
|
||||||
public void testModifyLeaseSettingsSection() {
|
public void testModifyLeaseSettingsSection() {
|
||||||
// Copy existing section
|
// Copy existing section
|
||||||
LeaseSettingsSection oldSection = vAppClient.getLeaseSettingsSection(vApp.getHref());
|
LeaseSettingsSection oldSection = vAppClient.getLeaseSettingsSection(vApp.getHref());
|
||||||
|
@ -575,7 +575,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME "Error: The requested operation on media "com.vmware.vcloud.entity.media:abfcb4b7-809f-4b50-a0aa-8c97bf09a5b0" is not supported in the current state."
|
// FIXME "Error: The requested operation on media "com.vmware.vcloud.entity.media:abfcb4b7-809f-4b50-a0aa-8c97bf09a5b0" is not supported in the current state."
|
||||||
@Test(testName = "PUT /vApp/{id}/media/action/insertMedia", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "PUT /vApp/{id}/media/action/insertMedia", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testInsertMedia() {
|
public void testInsertMedia() {
|
||||||
// Setup media params from configured media id
|
// Setup media params from configured media id
|
||||||
MediaInsertOrEjectParams params = MediaInsertOrEjectParams.builder()
|
MediaInsertOrEjectParams params = MediaInsertOrEjectParams.builder()
|
||||||
|
@ -587,7 +587,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertTrue(retryTaskSuccess.apply(insertMedia), String.format(TASK_COMPLETE_TIMELY, "insertMedia"));
|
assertTrue(retryTaskSuccess.apply(insertMedia), String.format(TASK_COMPLETE_TIMELY, "insertMedia"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/media/action/ejectMedia", dependsOnMethods = { "testInsertMedia" })
|
@Test(description = "PUT /vApp/{id}/media/action/ejectMedia", dependsOnMethods = { "testInsertMedia" })
|
||||||
public void testEjectMedia() {
|
public void testEjectMedia() {
|
||||||
// Setup media params from configured media id
|
// Setup media params from configured media id
|
||||||
MediaInsertOrEjectParams params = MediaInsertOrEjectParams.builder()
|
MediaInsertOrEjectParams params = MediaInsertOrEjectParams.builder()
|
||||||
|
@ -599,7 +599,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertTrue(retryTaskSuccess.apply(ejectMedia), String.format(TASK_COMPLETE_TIMELY, "ejectMedia"));
|
assertTrue(retryTaskSuccess.apply(ejectMedia), String.format(TASK_COMPLETE_TIMELY, "ejectMedia"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/networkConfigSection", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "GET /vApp/{id}/networkConfigSection", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testGetNetworkConfigSection() {
|
public void testGetNetworkConfigSection() {
|
||||||
// The method under test
|
// The method under test
|
||||||
NetworkConfigSection section = vAppClient.getNetworkConfigSection(vApp.getHref());
|
NetworkConfigSection section = vAppClient.getNetworkConfigSection(vApp.getHref());
|
||||||
|
@ -608,7 +608,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkNetworkConfigSection(section);
|
checkNetworkConfigSection(section);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/networkConfigSection", dependsOnMethods = { "testGetNetworkConfigSection" })
|
@Test(description = "PUT /vApp/{id}/networkConfigSection", dependsOnMethods = { "testGetNetworkConfigSection" })
|
||||||
public void testModifyNetworkConfigSection() {
|
public void testModifyNetworkConfigSection() {
|
||||||
// Copy existing section and update fields
|
// Copy existing section and update fields
|
||||||
NetworkConfigSection oldSection = vAppClient.getNetworkConfigSection(vApp.getHref());
|
NetworkConfigSection oldSection = vAppClient.getNetworkConfigSection(vApp.getHref());
|
||||||
|
@ -632,7 +632,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(modified, newSection, String.format(ENTITY_EQUAL, "NetworkConfigSection"));
|
assertEquals(modified, newSection, String.format(ENTITY_EQUAL, "NetworkConfigSection"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/networkConnectionSection", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "GET /vApp/{id}/networkConnectionSection", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testGetNetworkConnectionSection() {
|
public void testGetNetworkConnectionSection() {
|
||||||
getNetworkConnectionSection(new Function<URI, NetworkConnectionSection>() {
|
getNetworkConnectionSection(new Function<URI, NetworkConnectionSection>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -643,7 +643,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME "Task error: Unable to perform this action. Contact your cloud administrator."
|
// FIXME "Task error: Unable to perform this action. Contact your cloud administrator."
|
||||||
@Test(testName = "PUT /vApp/{id}/networkConnectionSection", dependsOnMethods = { "testGetNetworkConnectionSection" })
|
@Test(description = "PUT /vApp/{id}/networkConnectionSection", dependsOnMethods = { "testGetNetworkConnectionSection" })
|
||||||
public void testModifyNetworkConnectionSection() {
|
public void testModifyNetworkConnectionSection() {
|
||||||
// Look up a network in the Vdc
|
// Look up a network in the Vdc
|
||||||
Set<Reference> networks = vdc.getAvailableNetworks();
|
Set<Reference> networks = vdc.getAvailableNetworks();
|
||||||
|
@ -675,7 +675,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(modified, newSection, String.format(ENTITY_EQUAL, "NetworkConnectionSection"));
|
assertEquals(modified, newSection, String.format(ENTITY_EQUAL, "NetworkConnectionSection"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/networkSection", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "GET /vApp/{id}/networkSection", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testGetNetworkSection() {
|
public void testGetNetworkSection() {
|
||||||
// The method under test
|
// The method under test
|
||||||
NetworkSection section = vAppClient.getNetworkSection(vApp.getHref());
|
NetworkSection section = vAppClient.getNetworkSection(vApp.getHref());
|
||||||
|
@ -684,7 +684,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkNetworkSection(section);
|
checkNetworkSection(section);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/operatingSystemSection", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "GET /vApp/{id}/operatingSystemSection", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testGetOperatingSystemSection() {
|
public void testGetOperatingSystemSection() {
|
||||||
// The method under test
|
// The method under test
|
||||||
OperatingSystemSection section = vAppClient.getOperatingSystemSection(vm.getHref());
|
OperatingSystemSection section = vAppClient.getOperatingSystemSection(vm.getHref());
|
||||||
|
@ -693,7 +693,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkOperatingSystemSection(section);
|
checkOperatingSystemSection(section);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/operatingSystemSection", dependsOnMethods = { "testGetOperatingSystemSection", "testModifyVirtualHardwareSection" })
|
@Test(description = "PUT /vApp/{id}/operatingSystemSection", dependsOnMethods = { "testGetOperatingSystemSection", "testModifyVirtualHardwareSection" })
|
||||||
public void testModifyOperatingSystemSection() {
|
public void testModifyOperatingSystemSection() {
|
||||||
// Create new OperatingSystemSection
|
// Create new OperatingSystemSection
|
||||||
OperatingSystemSection newSection = OperatingSystemSection.builder()
|
OperatingSystemSection newSection = OperatingSystemSection.builder()
|
||||||
|
@ -716,7 +716,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(modified.getId(), newSection.getId());
|
assertEquals(modified.getId(), newSection.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/owner", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "GET /vApp/{id}/owner", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testGetOwner() {
|
public void testGetOwner() {
|
||||||
// The method under test
|
// The method under test
|
||||||
Owner owner = vAppClient.getOwner(vApp.getHref());
|
Owner owner = vAppClient.getOwner(vApp.getHref());
|
||||||
|
@ -725,7 +725,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkOwner(owner);
|
checkOwner(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/owner", dependsOnMethods = { "testGetOwner" })
|
@Test(description = "PUT /vApp/{id}/owner", dependsOnMethods = { "testGetOwner" })
|
||||||
public void testModifyOwner() {
|
public void testModifyOwner() {
|
||||||
Owner newOwner = Owner.builder().user(Reference.builder().href(userURI).type(ADMIN_USER).build()).build();
|
Owner newOwner = Owner.builder().user(Reference.builder().href(userURI).type(ADMIN_USER).build()).build();
|
||||||
|
|
||||||
|
@ -742,7 +742,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(modified.getUser().getHref(), newOwner.getUser().getHref());
|
assertEquals(modified.getUser().getHref(), newOwner.getUser().getHref());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/productSections", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "GET /vApp/{id}/productSections", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testGetProductSections() {
|
public void testGetProductSections() {
|
||||||
// The method under test
|
// The method under test
|
||||||
ProductSectionList sectionList = vAppClient.getProductSections(vApp.getHref());
|
ProductSectionList sectionList = vAppClient.getProductSections(vApp.getHref());
|
||||||
|
@ -751,7 +751,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkProductSectionList(sectionList);
|
checkProductSectionList(sectionList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/productSections", dependsOnMethods = { "testGetProductSections" })
|
@Test(description = "PUT /vApp/{id}/productSections", dependsOnMethods = { "testGetProductSections" })
|
||||||
public void testModifyProductSections() {
|
public void testModifyProductSections() {
|
||||||
// Copy existing section and update fields
|
// Copy existing section and update fields
|
||||||
ProductSectionList oldSections = vAppClient.getProductSections(vApp.getHref());
|
ProductSectionList oldSections = vAppClient.getProductSections(vApp.getHref());
|
||||||
|
@ -783,7 +783,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME How do we force it to ask a question?
|
// FIXME How do we force it to ask a question?
|
||||||
@Test(testName = "GET /vApp/{id}/question", dependsOnMethods = { "testDeployVApp" })
|
@Test(description = "GET /vApp/{id}/question", dependsOnMethods = { "testDeployVApp" })
|
||||||
public void testGetPendingQuestion() {
|
public void testGetPendingQuestion() {
|
||||||
// Power on VApp
|
// Power on VApp
|
||||||
vApp = powerOn(vAppURI);
|
vApp = powerOn(vAppURI);
|
||||||
|
@ -797,7 +797,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkVmPendingQuestion(question);
|
checkVmPendingQuestion(question);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/question/action/answer", dependsOnMethods = { "testGetPendingQuestion" })
|
@Test(description = "POST /vApp/{id}/question/action/answer", dependsOnMethods = { "testGetPendingQuestion" })
|
||||||
public void testAnswerQuestion() {
|
public void testAnswerQuestion() {
|
||||||
// TODO check that the question has been answered (e.g. asking for getPendingQuestion does not
|
// TODO check that the question has been answered (e.g. asking for getPendingQuestion does not
|
||||||
// include our answered question).
|
// include our answered question).
|
||||||
|
@ -815,7 +815,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
vAppClient.answerQuestion(vm.getHref(), answer);
|
vAppClient.answerQuestion(vm.getHref(), answer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/runtimeInfoSection", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "GET /vApp/{id}/runtimeInfoSection", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testGetRuntimeInfoSection() {
|
public void testGetRuntimeInfoSection() {
|
||||||
// The method under test
|
// The method under test
|
||||||
RuntimeInfoSection section = vAppClient.getRuntimeInfoSection(vm.getHref());
|
RuntimeInfoSection section = vAppClient.getRuntimeInfoSection(vm.getHref());
|
||||||
|
@ -825,7 +825,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME If still failing, consider escalating?
|
// FIXME If still failing, consider escalating?
|
||||||
@Test(testName = "GET /vApp/{id}/screen", dependsOnMethods = { "testDeployVApp" })
|
@Test(description = "GET /vApp/{id}/screen", dependsOnMethods = { "testDeployVApp" })
|
||||||
public void testGetScreenImage() {
|
public void testGetScreenImage() {
|
||||||
// Power on VApp
|
// Power on VApp
|
||||||
vApp = powerOn(vApp);
|
vApp = powerOn(vApp);
|
||||||
|
@ -842,7 +842,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/screen/action/acquireTicket", dependsOnMethods = { "testDeployVApp" })
|
@Test(description = "GET /vApp/{id}/screen/action/acquireTicket", dependsOnMethods = { "testDeployVApp" })
|
||||||
public void testGetScreenTicket() {
|
public void testGetScreenTicket() {
|
||||||
// Power on VApp
|
// Power on VApp
|
||||||
vApp = powerOn(vApp);
|
vApp = powerOn(vApp);
|
||||||
|
@ -854,7 +854,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkScreenTicket(ticket);
|
checkScreenTicket(ticket);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/startupSection", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "GET /vApp/{id}/startupSection", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testGetStartupSection() {
|
public void testGetStartupSection() {
|
||||||
// The method under test
|
// The method under test
|
||||||
StartupSection section = vAppClient.getStartupSection(vApp.getHref());
|
StartupSection section = vAppClient.getStartupSection(vApp.getHref());
|
||||||
|
@ -863,7 +863,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkStartupSection(section);
|
checkStartupSection(section);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/startupSection", dependsOnMethods = { "testGetStartupSection" })
|
@Test(description = "PUT /vApp/{id}/startupSection", dependsOnMethods = { "testGetStartupSection" })
|
||||||
public void testModifyStartupSection() {
|
public void testModifyStartupSection() {
|
||||||
// Copy existing section and update fields
|
// Copy existing section and update fields
|
||||||
StartupSection oldSection = vAppClient.getStartupSection(vApp.getHref());
|
StartupSection oldSection = vAppClient.getStartupSection(vApp.getHref());
|
||||||
|
@ -884,7 +884,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(modified, newSection);
|
assertEquals(modified, newSection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/virtualHardwareSection", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "GET /vApp/{id}/virtualHardwareSection", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testGetVirtualHardwareSection() {
|
public void testGetVirtualHardwareSection() {
|
||||||
// Method under test
|
// Method under test
|
||||||
VirtualHardwareSection hardware = vAppClient.getVirtualHardwareSection(vm.getHref());
|
VirtualHardwareSection hardware = vAppClient.getVirtualHardwareSection(vm.getHref());
|
||||||
|
@ -893,7 +893,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkVirtualHardwareSection(hardware);
|
checkVirtualHardwareSection(hardware);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/virtualHardwareSection", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
@Test(description = "PUT /vApp/{id}/virtualHardwareSection", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
||||||
public void testModifyVirtualHardwareSection() {
|
public void testModifyVirtualHardwareSection() {
|
||||||
// Power off VApp
|
// Power off VApp
|
||||||
vApp = powerOff(vApp);
|
vApp = powerOff(vApp);
|
||||||
|
@ -941,7 +941,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(modifiedSection, newSection);
|
assertEquals(modifiedSection, newSection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
@Test(description = "GET /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
||||||
public void testGetVirtualHardwareSectionCpu() {
|
public void testGetVirtualHardwareSectionCpu() {
|
||||||
// Method under test
|
// Method under test
|
||||||
ResourceAllocationSettingData rasd = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
|
ResourceAllocationSettingData rasd = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
|
||||||
|
@ -950,7 +950,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkResourceAllocationSettingData(rasd);
|
checkResourceAllocationSettingData(rasd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSectionCpu" })
|
@Test(description = "PUT /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSectionCpu" })
|
||||||
public void testModifyVirtualHardwareSectionCpu() {
|
public void testModifyVirtualHardwareSectionCpu() {
|
||||||
// Copy existing section and update fields
|
// Copy existing section and update fields
|
||||||
ResourceAllocationSettingData oldItem = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
|
ResourceAllocationSettingData oldItem = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
|
||||||
|
@ -975,7 +975,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(modified, newItem);
|
assertEquals(modified, newItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/virtualHardwareSection/disks", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
@Test(description = "GET /vApp/{id}/virtualHardwareSection/disks", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
||||||
public void testGetVirtualHardwareSectionDisks() {
|
public void testGetVirtualHardwareSectionDisks() {
|
||||||
// Method under test
|
// Method under test
|
||||||
RasdItemsList rasdItems = vAppClient.getVirtualHardwareSectionDisks(vm.getHref());
|
RasdItemsList rasdItems = vAppClient.getVirtualHardwareSectionDisks(vm.getHref());
|
||||||
|
@ -984,7 +984,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkRasdItemsList(rasdItems);
|
checkRasdItemsList(rasdItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/virtualHardwareSection/disks", dependsOnMethods = { "testGetVirtualHardwareSectionDisks" })
|
@Test(description = "PUT /vApp/{id}/virtualHardwareSection/disks", dependsOnMethods = { "testGetVirtualHardwareSectionDisks" })
|
||||||
public void testModifyVirtualHardwareSectionDisks() {
|
public void testModifyVirtualHardwareSectionDisks() {
|
||||||
// Copy the existing items list and modify the name of an item
|
// Copy the existing items list and modify the name of an item
|
||||||
RasdItemsList oldSection = vAppClient.getVirtualHardwareSectionDisks(vm.getHref());
|
RasdItemsList oldSection = vAppClient.getVirtualHardwareSectionDisks(vm.getHref());
|
||||||
|
@ -1020,7 +1020,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
// checkHasMatchingItem("virtualHardwareSection/disk", modified, item0InstanceId, item0ElementName);
|
// checkHasMatchingItem("virtualHardwareSection/disk", modified, item0InstanceId, item0ElementName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/virtualHardwareSection/media", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
@Test(description = "GET /vApp/{id}/virtualHardwareSection/media", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
||||||
public void testGetVirtualHardwareSectionMedia() {
|
public void testGetVirtualHardwareSectionMedia() {
|
||||||
// Method under test
|
// Method under test
|
||||||
RasdItemsList rasdItems = vAppClient.getVirtualHardwareSectionMedia(vm.getHref());
|
RasdItemsList rasdItems = vAppClient.getVirtualHardwareSectionMedia(vm.getHref());
|
||||||
|
@ -1029,7 +1029,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkRasdItemsList(rasdItems);
|
checkRasdItemsList(rasdItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/virtualHardwareSection/memory", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
@Test(description = "GET /vApp/{id}/virtualHardwareSection/memory", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
||||||
public void testGetVirtualHardwareSectionMemory() {
|
public void testGetVirtualHardwareSectionMemory() {
|
||||||
// Method under test
|
// Method under test
|
||||||
ResourceAllocationSettingData rasd = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
|
ResourceAllocationSettingData rasd = vAppClient.getVirtualHardwareSectionCpu(vm.getHref());
|
||||||
|
@ -1038,7 +1038,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkResourceAllocationSettingData(rasd);
|
checkResourceAllocationSettingData(rasd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/virtualHardwareSection/memory", dependsOnMethods = { "testGetVirtualHardwareSectionMemory" })
|
@Test(description = "PUT /vApp/{id}/virtualHardwareSection/memory", dependsOnMethods = { "testGetVirtualHardwareSectionMemory" })
|
||||||
public void testModifyVirtualHardwareSectionMemory() {
|
public void testModifyVirtualHardwareSectionMemory() {
|
||||||
ResourceAllocationSettingData origItem = vAppClient.getVirtualHardwareSectionMemory(vm.getHref());
|
ResourceAllocationSettingData origItem = vAppClient.getVirtualHardwareSectionMemory(vm.getHref());
|
||||||
ResourceAllocationSettingData newItem = origItem.toBuilder()
|
ResourceAllocationSettingData newItem = origItem.toBuilder()
|
||||||
|
@ -1062,7 +1062,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(modified, newItem);
|
assertEquals(modified, newItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/virtualHardwareSection/networkCards", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
@Test(description = "GET /vApp/{id}/virtualHardwareSection/networkCards", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
||||||
public void testGetVirtualHardwareSectionNetworkCards() {
|
public void testGetVirtualHardwareSectionNetworkCards() {
|
||||||
// Method under test
|
// Method under test
|
||||||
RasdItemsList rasdItems = vAppClient.getVirtualHardwareSectionNetworkCards(vm.getHref());
|
RasdItemsList rasdItems = vAppClient.getVirtualHardwareSectionNetworkCards(vm.getHref());
|
||||||
|
@ -1071,7 +1071,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkRasdItemsList(rasdItems);
|
checkRasdItemsList(rasdItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/virtualHardwareSection/networkCards", dependsOnMethods = { "testGetVirtualHardwareSectionNetworkCards" })
|
@Test(description = "PUT /vApp/{id}/virtualHardwareSection/networkCards", dependsOnMethods = { "testGetVirtualHardwareSectionNetworkCards" })
|
||||||
public void testModifyVirtualHardwareSectionNetworkCards() {
|
public void testModifyVirtualHardwareSectionNetworkCards() {
|
||||||
RasdItemsList oldSection = vAppClient.getVirtualHardwareSectionNetworkCards(vm.getHref());
|
RasdItemsList oldSection = vAppClient.getVirtualHardwareSectionNetworkCards(vm.getHref());
|
||||||
RasdItemsList newSection = oldSection.toBuilder().build();
|
RasdItemsList newSection = oldSection.toBuilder().build();
|
||||||
|
@ -1091,7 +1091,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
// See the description in testModifyVirtualHardwareSectionDisks
|
// See the description in testModifyVirtualHardwareSectionDisks
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/virtualHardwareSection/serialPorts", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
@Test(description = "GET /vApp/{id}/virtualHardwareSection/serialPorts", dependsOnMethods = { "testGetVirtualHardwareSection" })
|
||||||
public void testGetVirtualHardwareSectionSerialPorts() {
|
public void testGetVirtualHardwareSectionSerialPorts() {
|
||||||
// Method under test
|
// Method under test
|
||||||
RasdItemsList rasdItems = vAppClient.getVirtualHardwareSectionSerialPorts(vm.getHref());
|
RasdItemsList rasdItems = vAppClient.getVirtualHardwareSectionSerialPorts(vm.getHref());
|
||||||
|
@ -1100,7 +1100,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkRasdItemsList(rasdItems);
|
checkRasdItemsList(rasdItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/virtualHardwareSection/serialPorts", dependsOnMethods = { "testGetVirtualHardwareSectionSerialPorts" })
|
@Test(description = "PUT /vApp/{id}/virtualHardwareSection/serialPorts", dependsOnMethods = { "testGetVirtualHardwareSectionSerialPorts" })
|
||||||
public void testModifyVirtualHardwareSectionSerialPorts() {
|
public void testModifyVirtualHardwareSectionSerialPorts() {
|
||||||
RasdItemsList oldSection = vAppClient.getVirtualHardwareSectionSerialPorts(vm.getHref());
|
RasdItemsList oldSection = vAppClient.getVirtualHardwareSectionSerialPorts(vm.getHref());
|
||||||
RasdItemsList newSection = oldSection.toBuilder().build();
|
RasdItemsList newSection = oldSection.toBuilder().build();
|
||||||
|
@ -1120,7 +1120,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
// See the description in testModifyVirtualHardwareSectionDisks
|
// See the description in testModifyVirtualHardwareSectionDisks
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vApp/{id}/metadata", dependsOnMethods = { "testGetVApp" })
|
@Test(description = "PUT /vApp/{id}/metadata", dependsOnMethods = { "testGetVApp" })
|
||||||
public void testSetMetadataValue() {
|
public void testSetMetadataValue() {
|
||||||
key = name("key-");
|
key = name("key-");
|
||||||
String value = name("value-");
|
String value = name("value-");
|
||||||
|
@ -1134,7 +1134,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkMetadataValueFor(VAPP, newMetadataValue, value);
|
checkMetadataValueFor(VAPP, newMetadataValue, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/metadata", dependsOnMethods = { "testSetMetadataValue" })
|
@Test(description = "GET /vApp/{id}/metadata", dependsOnMethods = { "testSetMetadataValue" })
|
||||||
public void testGetMetadata() {
|
public void testGetMetadata() {
|
||||||
// Call the method being tested
|
// Call the method being tested
|
||||||
Metadata metadata = vAppClient.getMetadataClient().getMetadata(vApp.getHref());
|
Metadata metadata = vAppClient.getMetadataClient().getMetadata(vApp.getHref());
|
||||||
|
@ -1145,7 +1145,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertFalse(Iterables.isEmpty(metadata.getMetadataEntries()), String.format(NOT_EMPTY_OBJECT_FMT, "MetadataEntry", "vApp"));
|
assertFalse(Iterables.isEmpty(metadata.getMetadataEntries()), String.format(NOT_EMPTY_OBJECT_FMT, "MetadataEntry", "vApp"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vApp/{id}/metadata/{key}", dependsOnMethods = { "testGetMetadata" })
|
@Test(description = "GET /vApp/{id}/metadata/{key}", dependsOnMethods = { "testGetMetadata" })
|
||||||
public void testGetOrgMetadataValue() {
|
public void testGetOrgMetadataValue() {
|
||||||
// Call the method being tested
|
// Call the method being tested
|
||||||
MetadataValue value = vAppClient.getMetadataClient().getMetadataValue(vApp.getHref(), key);
|
MetadataValue value = vAppClient.getMetadataClient().getMetadataValue(vApp.getHref(), key);
|
||||||
|
@ -1156,7 +1156,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(value.getValue(), expected, String.format(CORRECT_VALUE_OBJECT_FMT, "Value", "MetadataValue", expected, value.getValue()));
|
assertEquals(value.getValue(), expected, String.format(CORRECT_VALUE_OBJECT_FMT, "Value", "MetadataValue", expected, value.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "DELETE /vApp/{id}/metadata/{key}", dependsOnMethods = { "testSetMetadataValue" })
|
@Test(description = "DELETE /vApp/{id}/metadata/{key}", dependsOnMethods = { "testSetMetadataValue" })
|
||||||
public void testDeleteMetadataEntry() {
|
public void testDeleteMetadataEntry() {
|
||||||
// Delete the entry
|
// Delete the entry
|
||||||
Task task = vAppClient.getMetadataClient().deleteMetadataEntry(vApp.getHref(), key);
|
Task task = vAppClient.getMetadataClient().deleteMetadataEntry(vApp.getHref(), key);
|
||||||
|
@ -1169,7 +1169,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkMetadataKeyAbsentFor(VAPP, newMetadata, key);
|
checkMetadataKeyAbsentFor(VAPP, newMetadata, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vApp/{id}/metadata", dependsOnMethods = { "testGetMetadata" })
|
@Test(description = "POST /vApp/{id}/metadata", dependsOnMethods = { "testGetMetadata" })
|
||||||
public void testMergeMetadata() {
|
public void testMergeMetadata() {
|
||||||
Metadata oldMetadata = vAppClient.getMetadataClient().getMetadata(vApp.getHref());
|
Metadata oldMetadata = vAppClient.getMetadataClient().getMetadata(vApp.getHref());
|
||||||
Map<String, String> oldMetadataMap = Checks.metadataToMap(oldMetadata);
|
Map<String, String> oldMetadataMap = Checks.metadataToMap(oldMetadata);
|
||||||
|
@ -1197,7 +1197,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
/**
|
/**
|
||||||
* @see VAppClient#deleteVApp(URI)
|
* @see VAppClient#deleteVApp(URI)
|
||||||
*/
|
*/
|
||||||
@Test(testName = "DELETE /vApp/{id}")
|
@Test(description = "DELETE /vApp/{id}")
|
||||||
public void testDeleteVApp() {
|
public void testDeleteVApp() {
|
||||||
// Create a temporary VApp to delete
|
// Create a temporary VApp to delete
|
||||||
VApp temp = instantiateVApp();
|
VApp temp = instantiateVApp();
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
return clonedVappTemplate;
|
return clonedVappTemplate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplate/{id}")
|
@Test(description = "GET /vAppTemplate/{id}")
|
||||||
public void testGetVAppTemplate() {
|
public void testGetVAppTemplate() {
|
||||||
vAppTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI);
|
vAppTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI);
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(vAppTemplate.getHref(), vAppTemplateURI);
|
assertEquals(vAppTemplate.getHref(), vAppTemplateURI);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplate/{id}/owner")
|
@Test(description = "GET /vAppTemplate/{id}/owner")
|
||||||
public void testGetVAppTemplateOwner() {
|
public void testGetVAppTemplateOwner() {
|
||||||
Owner owner = vAppTemplateClient.getOwnerOfVAppTemplate(vAppTemplateURI);
|
Owner owner = vAppTemplateClient.getOwnerOfVAppTemplate(vAppTemplateURI);
|
||||||
|
|
||||||
|
@ -112,21 +112,21 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(owner.getUser(), vAppTemplateClient.getVAppTemplate(vAppTemplateURI).getOwner().getUser());
|
assertEquals(owner.getUser(), vAppTemplateClient.getVAppTemplate(vAppTemplateURI).getOwner().getUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplate/{id}/customizationSection")
|
@Test(description = "GET /vAppTemplate/{id}/customizationSection")
|
||||||
public void testGetCustomizationSection() {
|
public void testGetCustomizationSection() {
|
||||||
CustomizationSection customizationSection = vAppTemplateClient.getVAppTemplateCustomizationSection(vAppTemplateURI);
|
CustomizationSection customizationSection = vAppTemplateClient.getVAppTemplateCustomizationSection(vAppTemplateURI);
|
||||||
|
|
||||||
checkCustomizationSection(customizationSection);
|
checkCustomizationSection(customizationSection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplate/{id}/productSections")
|
@Test(description = "GET /vAppTemplate/{id}/productSections")
|
||||||
public void testGetProductSections() {
|
public void testGetProductSections() {
|
||||||
ProductSectionList productSectionList = vAppTemplateClient.getProductSectionsForVAppTemplate(vAppTemplateURI);
|
ProductSectionList productSectionList = vAppTemplateClient.getProductSectionsForVAppTemplate(vAppTemplateURI);
|
||||||
|
|
||||||
checkProductSectionList(productSectionList);
|
checkProductSectionList(productSectionList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vAppTemplate/{id}/productSections")
|
@Test(description = "PUT /vAppTemplate/{id}/productSections")
|
||||||
public void testEditProductSections() {
|
public void testEditProductSections() {
|
||||||
// TODO make a real modification
|
// TODO make a real modification
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkProductSectionList(modified);
|
checkProductSectionList(modified);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplate/{id}/guestCustomizationSection")
|
@Test(description = "GET /vAppTemplate/{id}/guestCustomizationSection")
|
||||||
public void testGetGuestCustomizationSection() {
|
public void testGetGuestCustomizationSection() {
|
||||||
getGuestCustomizationSection(new Function<URI, GuestCustomizationSection>() {
|
getGuestCustomizationSection(new Function<URI, GuestCustomizationSection>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -150,7 +150,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplate/{id}/leaseSettingsSection")
|
@Test(description = "GET /vAppTemplate/{id}/leaseSettingsSection")
|
||||||
public void testGetLeaseSettingsSection() {
|
public void testGetLeaseSettingsSection() {
|
||||||
// FIXME Wrong case for Vapp
|
// FIXME Wrong case for Vapp
|
||||||
LeaseSettingsSection leaseSettingsSection = vAppTemplateClient.getVappTemplateLeaseSettingsSection(vAppTemplateURI);
|
LeaseSettingsSection leaseSettingsSection = vAppTemplateClient.getVappTemplateLeaseSettingsSection(vAppTemplateURI);
|
||||||
|
@ -158,7 +158,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkLeaseSettingsSection(leaseSettingsSection);
|
checkLeaseSettingsSection(leaseSettingsSection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplate/{id}/metadata", dependsOnMethods = { "testEditMetadataValue" })
|
@Test(description = "GET /vAppTemplate/{id}/metadata", dependsOnMethods = { "testEditMetadataValue" })
|
||||||
public void testGetVAppTemplateMetadata() {
|
public void testGetVAppTemplateMetadata() {
|
||||||
Metadata metadata = vAppTemplateClient.getMetadataClient().getMetadata(vAppTemplateURI);
|
Metadata metadata = vAppTemplateClient.getMetadataClient().getMetadata(vAppTemplateURI);
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// implicitly tested by testEditVAppTemplateMetadataValue, which first creates the metadata entry; otherwise no entry may exist
|
// implicitly tested by testEditVAppTemplateMetadataValue, which first creates the metadata entry; otherwise no entry may exist
|
||||||
@Test(testName = "GET /vAppTemplate/{id}/metadata/{key}", dependsOnMethods = { "testGetVAppTemplateMetadata" })
|
@Test(description = "GET /vAppTemplate/{id}/metadata/{key}", dependsOnMethods = { "testGetVAppTemplateMetadata" })
|
||||||
public void testGetMetadataValue() {
|
public void testGetMetadataValue() {
|
||||||
Metadata metadata = vAppTemplateClient.getMetadataClient().getMetadata(vAppTemplateURI);
|
Metadata metadata = vAppTemplateClient.getMetadataClient().getMetadata(vAppTemplateURI);
|
||||||
MetadataEntry entry = Iterables.get(metadata.getMetadataEntries(), 0);
|
MetadataEntry entry = Iterables.get(metadata.getMetadataEntries(), 0);
|
||||||
|
@ -177,14 +177,14 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(val.getValue(), entry.getValue());
|
assertEquals(val.getValue(), entry.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplate/{id}/networkConfigSection")
|
@Test(description = "GET /vAppTemplate/{id}/networkConfigSection")
|
||||||
public void testGetVAppTemplateNetworkConfigSection() {
|
public void testGetVAppTemplateNetworkConfigSection() {
|
||||||
NetworkConfigSection networkConfigSection = vAppTemplateClient.getVAppTemplateNetworkConfigSection(vAppTemplateURI);
|
NetworkConfigSection networkConfigSection = vAppTemplateClient.getVAppTemplateNetworkConfigSection(vAppTemplateURI);
|
||||||
|
|
||||||
checkNetworkConfigSection(networkConfigSection);
|
checkNetworkConfigSection(networkConfigSection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplate/{id}/networkConnectionSection")
|
@Test(description = "GET /vAppTemplate/{id}/networkConnectionSection")
|
||||||
public void testGetNetworkConnectionSection() {
|
public void testGetNetworkConnectionSection() {
|
||||||
getNetworkConnectionSection(new Function<URI, NetworkConnectionSection>() {
|
getNetworkConnectionSection(new Function<URI, NetworkConnectionSection>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -194,21 +194,21 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplate/{id}/networkSection")
|
@Test(description = "GET /vAppTemplate/{id}/networkSection")
|
||||||
public void testGetVAppTemplateNetworkSection() {
|
public void testGetVAppTemplateNetworkSection() {
|
||||||
NetworkSection networkSection = vAppTemplateClient.getVAppTemplateNetworkSection(vAppTemplateURI);
|
NetworkSection networkSection = vAppTemplateClient.getVAppTemplateNetworkSection(vAppTemplateURI);
|
||||||
|
|
||||||
checkOvfNetworkSection(networkSection);
|
checkOvfNetworkSection(networkSection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplate/{id}/ovf")
|
@Test(description = "GET /vAppTemplate/{id}/ovf")
|
||||||
public void testGetVAppTemplateOvf() {
|
public void testGetVAppTemplateOvf() {
|
||||||
Envelope envelope = vAppTemplateClient.getVAppTemplateOvf(vAppTemplateURI);
|
Envelope envelope = vAppTemplateClient.getVAppTemplateOvf(vAppTemplateURI);
|
||||||
|
|
||||||
checkOvfEnvelope(envelope);
|
checkOvfEnvelope(envelope);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vAppTemplate/{id}")
|
@Test(description = "PUT /vAppTemplate/{id}")
|
||||||
public void testEditVAppTemplate() {
|
public void testEditVAppTemplate() {
|
||||||
String name = name("myname-");
|
String name = name("myname-");
|
||||||
String description = name("Description ");
|
String description = name("Description ");
|
||||||
|
@ -225,7 +225,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(newTemplate.getDescription(), description);
|
assertEquals(newTemplate.getDescription(), description);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vAppTemplate/{id}/metadata", dependsOnMethods = { "testGetVAppTemplate" })
|
@Test(description = "POST /vAppTemplate/{id}/metadata", dependsOnMethods = { "testGetVAppTemplate" })
|
||||||
public void testEditMetadata() {
|
public void testEditMetadata() {
|
||||||
// TODO Cleanup after ourselves..
|
// TODO Cleanup after ourselves..
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkMetadataFor("vAppTemplate", newMetadata, expectedMetadataMap);
|
checkMetadataFor("vAppTemplate", newMetadata, expectedMetadataMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vAppTemplate/{id}/metadata/{key}", dependsOnMethods = { "testEditMetadata" })
|
@Test(description = "PUT /vAppTemplate/{id}/metadata/{key}", dependsOnMethods = { "testEditMetadata" })
|
||||||
public void testEditMetadataValue() {
|
public void testEditMetadataValue() {
|
||||||
// TODO Cleanup after ourselves..
|
// TODO Cleanup after ourselves..
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(newMetadataValue.getValue(), metadataValue.getValue());
|
assertEquals(newMetadataValue.getValue(), metadataValue.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "DELETE /vAppTemplate/{id}/metadata/{key}", dependsOnMethods = { "testGetMetadataValue" })
|
@Test(description = "DELETE /vAppTemplate/{id}/metadata/{key}", dependsOnMethods = { "testGetMetadataValue" })
|
||||||
public void testDeleteVAppTemplateMetadataValue() {
|
public void testDeleteVAppTemplateMetadataValue() {
|
||||||
// First store a value
|
// First store a value
|
||||||
String key = name("key-");
|
String key = name("key-");
|
||||||
|
@ -280,7 +280,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
checkMetadataKeyAbsentFor("vAppTemplate", newMetadata, key);
|
checkMetadataKeyAbsentFor("vAppTemplate", newMetadata, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vAppTemplate/{id}/guestCustomizationSection")
|
@Test(description = "PUT /vAppTemplate/{id}/guestCustomizationSection")
|
||||||
public void testEditGuestCustomizationSection() {
|
public void testEditGuestCustomizationSection() {
|
||||||
String computerName = name("n");
|
String computerName = name("n");
|
||||||
GuestCustomizationSection newSection = GuestCustomizationSection.builder()
|
GuestCustomizationSection newSection = GuestCustomizationSection.builder()
|
||||||
|
@ -297,7 +297,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(modified.getComputerName(), computerName);
|
assertEquals(modified.getComputerName(), computerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vAppTemplate/{id}/customizationSection")
|
@Test(description = "PUT /vAppTemplate/{id}/customizationSection")
|
||||||
public void testEditCustomizationSection() {
|
public void testEditCustomizationSection() {
|
||||||
boolean oldVal = vAppTemplateClient.getVAppTemplateCustomizationSection(vAppTemplateURI).isCustomizeOnInstantiate();
|
boolean oldVal = vAppTemplateClient.getVAppTemplateCustomizationSection(vAppTemplateURI).isCustomizeOnInstantiate();
|
||||||
boolean newVal = !oldVal;
|
boolean newVal = !oldVal;
|
||||||
|
@ -315,7 +315,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME deploymentLeaseInSeconds returned is null
|
// FIXME deploymentLeaseInSeconds returned is null
|
||||||
@Test(testName = "PUT /vAppTemplate/{id}/leaseSettingsSection")
|
@Test(description = "PUT /vAppTemplate/{id}/leaseSettingsSection")
|
||||||
public void testEditLeaseSettingsSection() throws Exception {
|
public void testEditLeaseSettingsSection() throws Exception {
|
||||||
int deploymentLeaseInSeconds = random.nextInt(10000)+1;
|
int deploymentLeaseInSeconds = random.nextInt(10000)+1;
|
||||||
// NOTE use smallish number for storageLeaseInSeconds; it seems to be capped at 5184000?
|
// NOTE use smallish number for storageLeaseInSeconds; it seems to be capped at 5184000?
|
||||||
|
@ -335,7 +335,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertEquals(newLeaseSettingsSection.getDeploymentLeaseInSeconds(), (Integer) deploymentLeaseInSeconds);
|
assertEquals(newLeaseSettingsSection.getDeploymentLeaseInSeconds(), (Integer) deploymentLeaseInSeconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vAppTemplate/{id}/networkConfigSection")
|
@Test(description = "PUT /vAppTemplate/{id}/networkConfigSection")
|
||||||
public void testEditNetworkConfigSection() {
|
public void testEditNetworkConfigSection() {
|
||||||
// TODO What to modify?
|
// TODO What to modify?
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
// assertEquals(newVAppNetworkConfig.getNetworkName(), networkName);
|
// assertEquals(newVAppNetworkConfig.getNetworkName(), networkName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "PUT /vAppTemplate/{id}/networkConnectionSection")
|
@Test(description = "PUT /vAppTemplate/{id}/networkConnectionSection")
|
||||||
public void testEditNetworkConnectionSection() {
|
public void testEditNetworkConnectionSection() {
|
||||||
// Look up a network in the Vdc
|
// Look up a network in the Vdc
|
||||||
Set<Reference> networks = vdc.getAvailableNetworks();
|
Set<Reference> networks = vdc.getAvailableNetworks();
|
||||||
|
@ -391,7 +391,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME cloneVAppTemplate is giving back 500 error
|
// FIXME cloneVAppTemplate is giving back 500 error
|
||||||
@Test(testName = "DELETE /vAppTemplate/{id}", dependsOnMethods = { "testGetVAppTemplate" })
|
@Test(description = "DELETE /vAppTemplate/{id}", dependsOnMethods = { "testGetVAppTemplate" })
|
||||||
public void testDeleteVAppTemplate() throws Exception {
|
public void testDeleteVAppTemplate() throws Exception {
|
||||||
VAppTemplate clonedVappTemplate = cloneVAppTemplate(true);
|
VAppTemplate clonedVappTemplate = cloneVAppTemplate(true);
|
||||||
|
|
||||||
|
@ -411,7 +411,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vAppTemplate/{id}/action/disableDownload")
|
@Test(description = "POST /vAppTemplate/{id}/action/disableDownload")
|
||||||
public void testDisableVAppTemplateDownload() throws Exception {
|
public void testDisableVAppTemplateDownload() throws Exception {
|
||||||
vAppTemplateClient.disableDownloadVappTemplate(vAppTemplateURI);
|
vAppTemplateClient.disableDownloadVappTemplate(vAppTemplateURI);
|
||||||
|
|
||||||
|
@ -425,7 +425,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
// assertFalse(hasLinkMatchingRel(links, "download.*"), "Should not offer download link after disabling download: "+vAppTemplate);
|
// assertFalse(hasLinkMatchingRel(links, "download.*"), "Should not offer download link after disabling download: "+vAppTemplate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vAppTemplate/{id}/action/enableDownload")
|
@Test(description = "POST /vAppTemplate/{id}/action/enableDownload")
|
||||||
public void testEnableVAppTemplateDownload() throws Exception {
|
public void testEnableVAppTemplateDownload() throws Exception {
|
||||||
// First disable so that enable really has some work to do...
|
// First disable so that enable really has some work to do...
|
||||||
vAppTemplateClient.disableDownloadVappTemplate(vAppTemplateURI);
|
vAppTemplateClient.disableDownloadVappTemplate(vAppTemplateURI);
|
||||||
|
@ -452,7 +452,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vAppTemplate/{id}/action/consolidate")
|
@Test(description = "POST /vAppTemplate/{id}/action/consolidate")
|
||||||
public void testConsolidateVAppTemplate() throws Exception {
|
public void testConsolidateVAppTemplate() throws Exception {
|
||||||
final Task task = vAppTemplateClient.consolidateVappTemplate(vm.getHref());
|
final Task task = vAppTemplateClient.consolidateVappTemplate(vm.getHref());
|
||||||
assertTaskSucceedsLong(task);
|
assertTaskSucceedsLong(task);
|
||||||
|
@ -460,7 +460,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
// TODO Need assertion that command had effect
|
// TODO Need assertion that command had effect
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vAppTemplate/{id}/action/relocate") // FIXME Need a datastore reference
|
@Test(description = "POST /vAppTemplate/{id}/action/relocate") // FIXME Need a datastore reference
|
||||||
public void testRelocateVAppTemplate() throws Exception {
|
public void testRelocateVAppTemplate() throws Exception {
|
||||||
// TODO Need assertion that command had effect
|
// TODO Need assertion that command had effect
|
||||||
Reference dataStore = null; // FIXME
|
Reference dataStore = null; // FIXME
|
||||||
|
@ -472,7 +472,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
assertTaskSucceedsLong(task);
|
assertTaskSucceedsLong(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vAppTemplate/{id}/shadowVms")
|
@Test(description = "GET /vAppTemplate/{id}/shadowVms")
|
||||||
public void testGetShadowVms() {
|
public void testGetShadowVms() {
|
||||||
References references = vAppTemplateClient.getShadowVms(vAppTemplateURI);
|
References references = vAppTemplateClient.getShadowVms(vAppTemplateURI);
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest {
|
||||||
|
|
||||||
// This failed previously, but is passing now.
|
// This failed previously, but is passing now.
|
||||||
// However, it's not part of the official API so not necessary to assert it.
|
// However, it's not part of the official API so not necessary to assert it.
|
||||||
@Test(testName = "test completed task not included in vAppTemplate")
|
@Test(description = "test completed task not included in vAppTemplate")
|
||||||
public void testCompletedTaskNotIncludedInVAppTemplate() throws Exception {
|
public void testCompletedTaskNotIncludedInVAppTemplate() throws Exception {
|
||||||
// Kick off a task, and wait for it to complete
|
// Kick off a task, and wait for it to complete
|
||||||
vAppTemplateClient.disableDownloadVappTemplate(vAppTemplateURI);
|
vAppTemplateClient.disableDownloadVappTemplate(vAppTemplateURI);
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
assertNotNull(vdcURI, String.format(REF_REQ_LIVE, VDC));
|
assertNotNull(vdcURI, String.format(REF_REQ_LIVE, VDC));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vdc/{id}")
|
@Test(description = "GET /vdc/{id}")
|
||||||
public void testGetVdc() {
|
public void testGetVdc() {
|
||||||
Vdc vdc = vdcClient.getVdc(vdcURI);
|
Vdc vdc = vdcClient.getVdc(vdcURI);
|
||||||
assertNotNull(vdc, String.format(OBJ_REQ_LIVE, VDC));
|
assertNotNull(vdc, String.format(OBJ_REQ_LIVE, VDC));
|
||||||
|
@ -128,7 +128,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkVdc(vdc);
|
Checks.checkVdc(vdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vdc/{id}/action/captureVApp", dependsOnMethods = { "testInstantiateVAppTemplate" } )
|
@Test(description = "POST /vdc/{id}/action/captureVApp", dependsOnMethods = { "testInstantiateVAppTemplate" } )
|
||||||
public void testCaptureVApp() {
|
public void testCaptureVApp() {
|
||||||
String name = name("captured-");
|
String name = name("captured-");
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
String.format(OBJ_FIELD_EQ, "VAppTemplate", "name", name, capturedVAppTemplate.getName()));
|
String.format(OBJ_FIELD_EQ, "VAppTemplate", "name", name, capturedVAppTemplate.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vdc/{id}/action/cloneVApp", dependsOnMethods = { "testInstantiateVAppTemplate" } )
|
@Test(description = "POST /vdc/{id}/action/cloneVApp", dependsOnMethods = { "testInstantiateVAppTemplate" } )
|
||||||
public void testCloneVApp() {
|
public void testCloneVApp() {
|
||||||
CloneVAppParams cloneVappParams = CloneVAppParams.builder()
|
CloneVAppParams cloneVappParams = CloneVAppParams.builder()
|
||||||
.source(instantiatedVApp.getHref())
|
.source(instantiatedVApp.getHref())
|
||||||
|
@ -179,7 +179,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkVApp(clonedVApp);
|
Checks.checkVApp(clonedVApp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vdc/{id}/action/cloneVAppTemplate")
|
@Test(description = "POST /vdc/{id}/action/cloneVAppTemplate")
|
||||||
public void testCloneVAppTemplate() {
|
public void testCloneVAppTemplate() {
|
||||||
clonedVAppTemplate = vdcClient.cloneVAppTemplate(vdcURI, CloneVAppTemplateParams.builder()
|
clonedVAppTemplate = vdcClient.cloneVAppTemplate(vdcURI, CloneVAppTemplateParams.builder()
|
||||||
.source(vAppTemplateURI)
|
.source(vAppTemplateURI)
|
||||||
|
@ -192,7 +192,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkVAppTemplate(clonedVAppTemplate);
|
Checks.checkVAppTemplate(clonedVAppTemplate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vdc/{id}/action/composeVApp")
|
@Test(description = "POST /vdc/{id}/action/composeVApp")
|
||||||
public void testComposeVApp() {
|
public void testComposeVApp() {
|
||||||
String name = name("composed-");
|
String name = name("composed-");
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Duplicates code in VAppClientLiveTest
|
// TODO Duplicates code in VAppClientLiveTest
|
||||||
@Test(testName = "POST /vdc/{id}/action/instantiateVAppTemplate")
|
@Test(description = "POST /vdc/{id}/action/instantiateVAppTemplate")
|
||||||
public void testInstantiateVAppTemplate() {
|
public void testInstantiateVAppTemplate() {
|
||||||
Vdc vdc = vdcClient.getVdc(vdcURI);
|
Vdc vdc = vdcClient.getVdc(vdcURI);
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkVApp(instantiatedVApp);
|
Checks.checkVApp(instantiatedVApp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vdc/{id}/action/uploadVAppTemplate")
|
@Test(description = "POST /vdc/{id}/action/uploadVAppTemplate")
|
||||||
public void testUploadVAppTemplate() {
|
public void testUploadVAppTemplate() {
|
||||||
// TODO Should test all 4 stages of upload; currently doing only stage 1 here.
|
// TODO Should test all 4 stages of upload; currently doing only stage 1 here.
|
||||||
// 1. creating empty vApp template entity
|
// 1. creating empty vApp template entity
|
||||||
|
@ -307,13 +307,13 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "vdcClient admin metadata configuration", dependsOnMethods = { "testGetVdc" } )
|
@Test(description = "vdcClient admin metadata configuration", dependsOnMethods = { "testGetVdc" } )
|
||||||
public void testSetupMetadata() {
|
public void testSetupMetadata() {
|
||||||
context.getApi().getAdminVdcClient().getMetadataClient().setMetadata(toAdminUri(vdcURI),
|
context.getApi().getAdminVdcClient().getMetadataClient().setMetadata(toAdminUri(vdcURI),
|
||||||
"key", MetadataValue.builder().value("value").build());
|
"key", MetadataValue.builder().value("value").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vdc/{id}/metadata", dependsOnMethods = { "testSetupMetadata" } )
|
@Test(description = "GET /vdc/{id}/metadata", dependsOnMethods = { "testSetupMetadata" } )
|
||||||
public void testGetMetadata() {
|
public void testGetMetadata() {
|
||||||
Metadata metadata = vdcClient.getMetadataClient().getMetadata(vdcURI);
|
Metadata metadata = vdcClient.getMetadataClient().getMetadata(vdcURI);
|
||||||
|
|
||||||
|
@ -324,7 +324,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkMetadataFor(VDC, metadata);
|
Checks.checkMetadataFor(VDC, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /vdc/{id}/metadata/{key}", dependsOnMethods = { "testGetMetadata" } )
|
@Test(description = "GET /vdc/{id}/metadata/{key}", dependsOnMethods = { "testGetMetadata" } )
|
||||||
public void testGetMetadataValue() {
|
public void testGetMetadataValue() {
|
||||||
// First find a key
|
// First find a key
|
||||||
Metadata metadata = vdcClient.getMetadataClient().getMetadata(vdcURI);
|
Metadata metadata = vdcClient.getMetadataClient().getMetadata(vdcURI);
|
||||||
|
|
Loading…
Reference in New Issue