diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/testng/FormatApiResultsListener.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/testng/FormatApiResultsListener.java index 6abbb96dce..a628c67c57 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/testng/FormatApiResultsListener.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/testng/FormatApiResultsListener.java @@ -18,17 +18,14 @@ */ package org.jclouds.vcloud.director.testng; -import java.lang.annotation.Annotation; -import java.lang.reflect.Method; +import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Set; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.testng.ITestContext; -import org.testng.ITestListener; import org.testng.ITestResult; -import org.testng.annotations.Test; +import org.testng.TestListenerAdapter; import com.google.common.base.Joiner; import com.google.common.base.Predicates; @@ -42,20 +39,12 @@ import com.google.common.collect.Iterables; * * @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 Set apis = ImmutableSet.of("admin", "user"); - - private ThreadLocal threadTestStart = new ThreadLocal(); - - @Override - public void onTestStart(ITestResult res) { - if (methodInApiGroup(res)) { - threadTestStart.set(System.currentTimeMillis()); - } - } + private static final SimpleDateFormat timestamp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + private static final Set apis = ImmutableSet.of("admin", "user"); @Override 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) { return Iterables.any(Arrays.asList(res.getMethod().getGroups()), Predicates.in(apis)); } 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) { @@ -106,13 +83,18 @@ public class FormatApiResultsListener implements ITestListener { } private String getOperation(ITestResult res) { - Method method = res.getMethod().getConstructorOrMethod().getMethod(); - Test test = method.getAnnotation(Test.class); - return test != null ? test.testName() : method.getName(); + return res.getMethod().getDescription(); } - private String getDuration() { - Long start = threadTestStart.get(); - return (start == null) ? "" : Long.toString(System.currentTimeMillis() - start); + private String getTest(ITestResult res) { + return res.getName(); + } + + private String getStart(ITestResult res) { + return timestamp.format(res.getStartMillis()); + } + + private String getDuration(ITestResult res) { + return Long.toString(res.getEndMillis() - res.getStartMillis()); } } diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientLiveTest.java index add04a608b..f281480c43 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientLiveTest.java @@ -78,7 +78,7 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest 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() { AdminCatalog newCatalog = AdminCatalog.builder() .name(name("Test Catalog ")) @@ -91,7 +91,7 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest // FIXME: documentation suggests we should wait for a task here } - @Test(testName = "GET /admin/catalog/{id}", + @Test(description = "GET /admin/catalog/{id}", dependsOnMethods = { "testCreateCatalog" }) public void testGetCatalog() { catalog = catalogClient.getCatalog(catalog.getHref()); @@ -99,14 +99,14 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest Checks.checkAdminCatalog(catalog); } - @Test(testName = "GET /admin/catalog/{id}/owner", + @Test(description = "GET /admin/catalog/{id}/owner", dependsOnMethods = { "testGetCatalog" }) public void testGetCatalogOwner() { owner = catalogClient.getOwner(catalog.getHref()); Checks.checkOwner(owner); } - @Test(testName = "PUT /admin/catalog/{id}/owner", + @Test(description = "PUT /admin/catalog/{id}/owner", dependsOnMethods = { "testGetCatalog" }) public void updateCatalogOwner() { 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() { String oldName = catalog.getName(); 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 public void testPublishCatalog() { assertNotNull(catalog, String.format(NOT_NULL_OBJ_FMT, "Catalog")); @@ -189,7 +189,7 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest CATALOG, "isPublished", true, catalog.isPublished())); } - @Test(testName = "DELETE /admin/catalog/{id}", + @Test(description = "DELETE /admin/catalog/{id}", dependsOnMethods = { "testCreateCatalog" } ) public void testDeleteCatalog() { // assertEquals(catalog.getCatalogItems().getCatalogItems().size(), 0, diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminNetworkClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminNetworkClientLiveTest.java index b51db728c1..3d0532f359 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminNetworkClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminNetworkClientLiveTest.java @@ -71,7 +71,7 @@ public class AdminNetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest networkRef = Reference.builder().href(networkURI).build().toAdminReference(endpoint); } - @Test(testName = "GET /admin/network/{id}") + @Test(description = "GET /admin/network/{id}") public void testGetNetwork() { //TODO: test both org and external networks assertNotNull(networkRef, String.format(OBJ_REQ_LIVE, NETWORK)); @@ -88,7 +88,7 @@ public class AdminNetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest } // TODO: this test is far from exhaustive - @Test(testName = "PUT /admin/network/{id}" ) + @Test(description = "PUT /admin/network/{id}" ) public void testUpdateNetwork() { //TODO: ensure network instanceof OrgNetwork, may require queries 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() { // TODO assert that network is deployed somehow Task resetNetworkTask = networkClient.resetNetwork(networkRef.getHref()); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminOrgClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminOrgClientLiveTest.java index def0438b7f..adcdce11d1 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminOrgClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminOrgClientLiveTest.java @@ -77,21 +77,21 @@ public class AdminOrgClientLiveTest extends BaseVCloudDirectorClientLiveTest { assertNotNull(orgRef, String.format(REF_REQ_LIVE, "admin org")); } - @Test(testName = "GET /admin/org/{id}") + @Test(description = "GET /admin/org/{id}") public void testGetAdminOrg() { AdminOrg adminOrg = orgClient.getOrg(orgRef.getHref()); Checks.checkAdminOrg(adminOrg); } - @Test(testName = "GET /admin/org/{id}/settings/email") + @Test(description = "GET /admin/org/{id}/settings/email") public void testGetEmailSettings() { emailSettings = orgClient.getEmailSettings(orgRef.getHref()); Checks.checkEmailSettings(emailSettings); } - @Test(testName = "PUT /admin/org/{id}/settings/email", + @Test(description = "PUT /admin/org/{id}/settings/email", dependsOnMethods = { "testGetEmailSettings" }) public void testUpdateEmailSettings() { 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() { generalSettings = orgClient.getGeneralSettings(orgRef.getHref()); Checks.checkGeneralSettings(generalSettings); } - @Test(testName = "PUT /admin/org/{id}/settings/general", + @Test(description = "PUT /admin/org/{id}/settings/general", dependsOnMethods = { "testGetGeneralSettings" } ) public void testUpdateGeneralSettings() { // 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() { ldapSettings = orgClient.getLdapSettings(orgRef.getHref()); Checks.checkLdapSettings(ldapSettings); } - @Test(testName = "GET /admin/org/{id}/settings/passwordPolicy") + @Test(description = "GET /admin/org/{id}/settings/passwordPolicy") public void testGetPasswordPolicy() { passwordPolicy = orgClient.getPasswordPolicy(orgRef.getHref()); Checks.checkPasswordPolicySettings(passwordPolicy); } - @Test(testName = "PUT /admin/org/{id}/settings/passwordPolicy", + @Test(description = "PUT /admin/org/{id}/settings/passwordPolicy", dependsOnMethods = { "testGetPasswordPolicy" }) public void testUpdatePasswordPolicy() { 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() { vAppLeaseSettings = orgClient.getVAppLeaseSettings(orgRef.getHref()); 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 public void testUpdateVAppLeaseSettings() { 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() { vAppTemplateLeaseSettings = orgClient.getVAppTemplateLeaseSettings(orgRef.getHref()); 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 public void testUpdateVAppTemplateLeaseSettings() { 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() { settings = orgClient.getSettings(orgRef.getHref()); Checks.checkOrgSettings(settings); } - @Test(testName = "PUT /admin/org/{id}/settings", + @Test(description = "PUT /admin/org/{id}/settings", dependsOnMethods = { "testGetEmailSettings" } ) public void testUpdateSettings() throws Exception { String newFromEmailAddress = "test"+random.nextInt(Integer.MAX_VALUE)+"@test.com"; diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminQueryClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminQueryClientLiveTest.java index cf49f5ede7..5496157109 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminQueryClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminQueryClientLiveTest.java @@ -54,7 +54,7 @@ public class AdminQueryClientLiveTest extends BaseVCloudDirectorClientLiveTest { queryClient = context.getApi().getAdminQueryClient(); } - @Test(testName = "GET /admin/groups/query") + @Test(description = "GET /admin/groups/query") public void testQueryAllGroups() { // TODO Ensure there will be at least one record, for asserting result 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() { // TODO Ensure there will be at least one record, for asserting result 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() { // TODO Ensure there will be at least one record, for asserting result 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() { // TODO Ensure there will be at least one record, for asserting result 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() { // TODO Ensure there will be at least one record, for asserting result 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() { // TODO Ensure there will be at least one record, for asserting result 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() { // TODO Ensure there will be at least one record, for asserting result QueryResultRecords resultRecords = queryClient.vdcsQueryAll(); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminVdcClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminVdcClientLiveTest.java index 7eb335c44c..9daa1f653e 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminVdcClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminVdcClientLiveTest.java @@ -80,7 +80,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { } } - @Test(testName = "GET /admin/vdc/{id}") + @Test(description = "GET /admin/vdc/{id}") public void testGetVdc() { AdminVdc vdc = vdcClient.getVdc(adminVdcUri); assertNotNull(vdc, String.format(OBJ_REQ_LIVE, VDC)); @@ -90,7 +90,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { } // 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 { String origName = vdcClient.getVdc(adminVdcUri).getName(); String newName = name("a"); @@ -128,7 +128,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { } // 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 { // TODO Need to have a VDC that we're happy to delete! Task task = vdcClient.deleteVdc(adminVdcUri); @@ -142,7 +142,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { } // 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 { // TODO Need to have a VDC that we're happy to delete! 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 { Metadata metadata = metadataClient.getMetadata(adminVdcUri); @@ -173,7 +173,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { } // 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 { metadataKey = name("key-"); metadataValue = name("value-"); @@ -190,7 +190,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { } // 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 { MetadataValue retrievedMetadataValue = metadataClient.getMetadataValue(adminVdcUri, metadataKey); @@ -198,7 +198,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { } // 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 { metadataValue = name("value-"); MetadataValue newV = MetadataValue.builder().value(metadataValue).build(); @@ -211,7 +211,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { } // 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 { // TODO Remove dependency on other tests; make cleanUp delete a list of metadata entries? diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientLiveTest.java index c07b6627e8..868835c668 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientLiveTest.java @@ -110,7 +110,7 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest { } } - @Test(testName = "GET /catalog/{id}") + @Test(description = "GET /catalog/{id}") public void testGetCatalog() { CatalogType catalog = catalogClient.getCatalog(catalogRef.getHref()); assertNotNull(catalog); @@ -118,14 +118,14 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest { assertEquals(catalog.getHref(), catalogRef.getHref()); } - @Test(testName = "GET /catalogItem/{id}", dependsOnMethods = "testAddCatalogItem") + @Test(description = "GET /catalogItem/{id}", dependsOnMethods = "testAddCatalogItem") public void testGetCatalogItem() { CatalogItem catalogItem = catalogClient.getCatalogItem(this.catalogItem.getHref()); checkCatalogItem(catalogItem); assertEquals(catalogItem.getEntity().getHref(), this.catalogItem.getEntity().getHref()); } - @Test(testName = "POST /catalog/{id}/catalogItems") + @Test(description = "POST /catalog/{id}/catalogItems") public void testAddCatalogItem() { assertNotNull(vdcURI, String.format(REF_REQ_LIVE, VDC)); @@ -157,7 +157,7 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest { assertEquals(catalogItem.getDescription(), "New Item"); } - @Test(testName = "PUT /catalogItem/{id}", dependsOnMethods = "testAddCatalogItem") + @Test(description = "PUT /catalogItem/{id}", dependsOnMethods = "testAddCatalogItem") public void testUpdateCatalogItem() { CatalogItem updatedCatalogItem = CatalogItem.builder().fromCatalogItem(catalogItem).name("UPDATEDNAME").build(); catalogItem = catalogClient.updateCatalogItem(catalogItem.getHref(), updatedCatalogItem); @@ -166,7 +166,7 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest { } // 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() { catalogClient.deleteCatalogItem(catalogItem.getHref()); 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() { Metadata catalogMetadata = catalogClient.getMetadataClient().getMetadata(catalogRef.getHref()); checkMetadata(catalogMetadata); } - @Test(testName = "GET /catalog/{id}/metadata/{key}") + @Test(description = "GET /catalog/{id}/metadata/{key}") public void testGetCatalogMetadataValue() { Metadata catalogMetadata = catalogClient.getMetadataClient().getMetadata(catalogRef.getHref()); MetadataEntry existingMetadataEntry = Iterables.find(catalogMetadata.getMetadataEntries(), new Predicate() { @@ -202,13 +202,13 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest { checkMetadataValue(metadataValue); } - @Test(testName = "GET /catalogItem/{id}/metadata", dependsOnMethods = "testAddCatalogItem") + @Test(description = "GET /catalogItem/{id}/metadata", dependsOnMethods = "testAddCatalogItem") public void testGetCatalogItemMetadata() { Metadata catalogItemMetadata = catalogClient.getCatalogItemMetadataClient().getMetadata(catalogItem.getHref()); checkMetadata(catalogItemMetadata); } - @Test(testName = "POST /catalogItem/{id}/metadata", dependsOnMethods = "testAddCatalogItem") + @Test(description = "POST /catalogItem/{id}/metadata", dependsOnMethods = "testAddCatalogItem") public void testMergeCatalogItemMetadata() { Metadata newMetadata = Metadata.builder() .entry(MetadataEntry.builder().entry("KEY", "MARMALADE").build()) @@ -236,13 +236,13 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest { checkMetadataValue(newKeyMetadataValue); } - @Test(testName = "GET /catalogItem/{id}/metadata/{key}", dependsOnMethods = "testSetCatalogItemMetadataValue") + @Test(description = "GET /catalogItem/{id}/metadata/{key}", dependsOnMethods = "testSetCatalogItemMetadataValue") public void testGetCatalogItemMetadataValue() { MetadataValue metadataValue = catalogClient.getCatalogItemMetadataClient().getMetadataValue(catalogItem.getHref(), "KEY"); checkMetadataValue(metadataValue); } - @Test(testName = "PUT /catalogItem/{id}/metadata/{key}", dependsOnMethods = "testMergeCatalogItemMetadata") + @Test(description = "PUT /catalogItem/{id}/metadata/{key}", dependsOnMethods = "testMergeCatalogItemMetadata") public void testSetCatalogItemMetadataValue() { MetadataValue newMetadataValue = MetadataValue.builder().value("NEW").build(); @@ -257,7 +257,7 @@ public class CatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest { checkMetadataValue(updatedMetadataValue); } - @Test(testName = "DELETE /catalogItem/{id}/metadata/{key}", dependsOnMethods = "testGetCatalogItemMetadataValue") + @Test(description = "DELETE /catalogItem/{id}/metadata/{key}", dependsOnMethods = "testGetCatalogItemMetadataValue") public void testDeleteCatalogItemMetadataValue() { Task deleteCatalogItemMetadataValue = catalogClient.getCatalogItemMetadataClient().deleteMetadataEntry(catalogItem.getHref(), "KEY"); checkTask(deleteCatalogItemMetadataValue); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/GroupClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/GroupClientLiveTest.java index f0aa95b01e..929ed82d80 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/GroupClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/GroupClientLiveTest.java @@ -69,7 +69,7 @@ public class GroupClientLiveTest extends BaseVCloudDirectorClientLiveTest { // context.getApi().getAdminOrgClient().updateLdapSettings(newLdapSettings); } - @Test(testName = "POST /admin/org/{id}/groups") + @Test(description = "POST /admin/org/{id}/groups") public void testCreateGroup() { fail("LDAP not configured, group client isn't currently testable."); // group = groupClient.createGroup(orgUri, Group.builder() @@ -78,14 +78,14 @@ public class GroupClientLiveTest extends BaseVCloudDirectorClientLiveTest { Checks.checkGroup(group); } - @Test(testName = "GET /admin/group/{id}", dependsOnMethods = { "testCreateGroup" }) + @Test(description = "GET /admin/group/{id}", dependsOnMethods = { "testCreateGroup" }) public void testGetGroup() { group = groupClient.getGroup(groupRef.getHref()); Checks.checkGroup(group); } - @Test(testName = "PUT /admin/group/{id}", dependsOnMethods = { "testGetGroup" } ) + @Test(description = "PUT /admin/group/{id}", dependsOnMethods = { "testGetGroup" } ) public void testUpdateGroup() { String oldName = group.getName(); 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() { groupClient.deleteGroup(groupRef.getHref()); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientLiveTest.java index 5c276b3837..5cd6d27157 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientLiveTest.java @@ -104,7 +104,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest { private MetadataValue metadataValue; private String metadataEntryValue = "value"; - @Test(testName = "POST /vdc/{id}/media") + @Test(description = "POST /vdc/{id}/media") public void testCreateMedia() throws URISyntaxException { assertNotNull(vdcURI, String.format(REF_REQ_LIVE, VDC)); 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() { media = mediaClient.getMedia(media.getHref()); assertNotNull(media, String.format(OBJ_REQ_LIVE, MEDIA)); @@ -166,7 +166,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest { Checks.checkMediaFor(MEDIA, media); } - @Test(testName = "GET /media/{id}/owner", + @Test(description = "GET /media/{id}/owner", dependsOnMethods = { "testGetMedia" }) public void testGetMediaOwner() { Owner directOwner = mediaClient.getOwner(media.getHref()); @@ -185,7 +185,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest { Checks.checkReferenceType(directOwner.getUser()); } - @Test(testName = "POST /vdc/{id}/action/cloneMedia", + @Test(description = "POST /vdc/{id}/action/cloneMedia", dependsOnMethods = { "testGetMediaOwner" }) public void testCloneMedia() { oldMedia = media; @@ -235,7 +235,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest { media.toString(), oldMedia.toString())); } - @Test(testName = "PUT /media/{id}", + @Test(description = "PUT /media/{id}", dependsOnMethods = { "testCloneMedia" }) public void testSetMedia() { String oldName = media.getName(); @@ -265,7 +265,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest { media = mediaClient.getMedia(media.getHref()); } - @Test(testName = "GET /media/{id}/metadata", + @Test(description = "GET /media/{id}/metadata", dependsOnMethods = { "testSetMetadataValue" }) public void testGetMetadata() { metadata = mediaClient.getMetadataClient().getMetadata(media.getHref()); @@ -276,7 +276,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest { Checks.checkMetadataFor(MEDIA, metadata); } - @Test(testName = "POST /media/{id}/metadata", + @Test(description = "POST /media/{id}/metadata", dependsOnMethods = { "testGetMedia" }) public void testMergeMetadata() { // 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" }) public void testGetMetadataValue() { metadataValue = mediaClient.getMetadataClient().getMetadataValue(media.getHref(), "key"); Checks.checkMetadataValueFor(MEDIA, metadataValue); } - @Test(testName = "PUT /media/{id}/metadata/{key}", + @Test(description = "PUT /media/{id}/metadata/{key}", dependsOnMethods = { "testMergeMetadata" }) public void testSetMetadataValue() { metadataEntryValue = "value"; @@ -350,7 +350,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest { Checks.checkMetadataValueFor(MEDIA, metadataValue); } - @Test(testName = "DELETE /media/{id}/metadata/{key}", + @Test(description = "DELETE /media/{id}/metadata/{key}", dependsOnMethods = { "testGetMetadata", "testGetMetadataValue" } ) public void testDeleteMetadata() { Task deleteMetadataEntry = mediaClient.getMetadataClient().deleteMetadataEntry(media.getHref(), "testKey"); @@ -387,7 +387,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest { Checks.checkMediaFor(MEDIA, media); } - @Test(testName = "DELETE /media/{id}", + @Test(description = "DELETE /media/{id}", dependsOnMethods = { "testDeleteMetadata" } ) public void testDeleteMedia() { Task deleteMedia = mediaClient.deleteMedia(media.getHref()); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/NetworkClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/NetworkClientLiveTest.java index 21100a6410..88b23a1565 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/NetworkClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/NetworkClientLiveTest.java @@ -2,14 +2,14 @@ * Licensed to jclouds, Inc. (jclouds) under one or more * contributor license agreements. See the NOTICE file * 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 * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * 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 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the @@ -72,7 +72,7 @@ public class NetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest { .deleteMetadataEntry(toAdminUri(networkURI), "key"); } - @Test(testName = "GET /network/{id}") + @Test(description = "GET /network/{id}") public void testGetNetwork() { // required for testing assertNotNull(networkURI, String.format(REF_REQ_LIVE, NETWORK)); @@ -87,7 +87,7 @@ public class NetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest { Checks.checkOrgNetwork(network); } - @Test(testName = "GET /network/{id}/metadata") + @Test(description = "GET /network/{id}/metadata") public void testGetMetadata() { Metadata metadata = networkClient.getMetadataClient().getMetadata(networkURI); // 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() { MetadataValue metadataValue = networkClient.getMetadataClient().getMetadataValue(networkURI, "key"); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/OrgClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/OrgClientLiveTest.java index b53b9e71db..bc8f918a09 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/OrgClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/OrgClientLiveTest.java @@ -66,7 +66,7 @@ public class OrgClientLiveTest extends BaseVCloudDirectorClientLiveTest { orgClient = context.getApi().getOrgClient(); } - @AfterClass(groups = { "live" }) + @AfterClass(alwaysRun = true) public void cleanUp() throws Exception { if (metadataSet) { context.getApi().getAdminOrgClient().getMetadataClient() @@ -83,7 +83,7 @@ public class OrgClientLiveTest extends BaseVCloudDirectorClientLiveTest { private Org org; private boolean metadataSet = false; - @Test(testName = "GET /org") + @Test(description = "GET /org") public void testGetOrgList() { // Call the method being tested 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() { Reference orgRef = Iterables.getFirst(orgList.getOrgs(), null); assertNotNull(orgRef); @@ -112,14 +112,14 @@ public class OrgClientLiveTest extends BaseVCloudDirectorClientLiveTest { checkOrg(org); } - @Test(testName = "orgClient admin metadata setup", dependsOnMethods = { "testGetOrg" }) + @Test(description = "orgClient admin metadata setup", dependsOnMethods = { "testGetOrg" }) public void testSetupMetadata() { context.getApi().getAdminOrgClient().getMetadataClient().setMetadata(toAdminUri(orgURI), "KEY", MetadataValue.builder().value("VALUE").build()); metadataSet = true; } - @Test(testName = "GET /org/{id}/metadata", dependsOnMethods = { "testSetupMetadata" }) + @Test(description = "GET /org/{id}/metadata", dependsOnMethods = { "testSetupMetadata" }) public void testGetOrgMetadata() { // Call the method being tested 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")); } - @Test(testName = "GET /org/{id}/metadata/{key}", dependsOnMethods = { "testGetOrgMetadata" }) + @Test(description = "GET /org/{id}/metadata/{key}", dependsOnMethods = { "testGetOrgMetadata" }) public void testGetOrgMetadataValue() { // Call the method being tested 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())); } - @Test(testName = "GET /org/{id}/catalog/{catalogId}/controlAccess", dependsOnMethods = { "testGetOrg" }) + @Test(description = "GET /org/{id}/catalog/{catalogId}/controlAccess", dependsOnMethods = { "testGetOrg" }) public void testGetControlAccess() { // Call the method being tested ControlAccessParams params = orgClient.getControlAccess(orgURI, catalogId); @@ -154,7 +154,7 @@ public class OrgClientLiveTest extends BaseVCloudDirectorClientLiveTest { 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() { // Setup params ControlAccessParams params = orgClient.getControlAccess(orgURI, catalogId); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/QueryClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/QueryClientLiveTest.java index fb29ae7fd1..fb8b0c7894 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/QueryClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/QueryClientLiveTest.java @@ -89,7 +89,7 @@ public class QueryClientLiveTest extends BaseVCloudDirectorClientLiveTest { vAppClient = context.getApi().getVAppClient(); } - @Test(testName = "GET /entity/{id}") + @Test(description = "GET /entity/{id}") public void testEntity() { // Get a VAppTemplate to look up as an entity 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() { VAppTemplate vAppTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI); 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); } - @Test(testName = "GET /catalogs/query") + @Test(description = "GET /catalogs/query") public void testQueryAllCatalogs() { QueryResultRecords catalogRecords = queryClient.catalogsQueryAll(); 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() { CatalogReferences catalogReferences = queryClient.catalogReferencesQueryAll(); 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() { QueryResultRecords queryResult = queryClient.vAppTemplatesQueryAll(); Set 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); } - @Test(testName = "GET /vAppTemplates/query?filter)") + @Test(description = "GET /vAppTemplates/query?filter") public void testQueryVAppTemplatesWithFilter() { VAppTemplate vAppTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI); 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); } - @Test(testName = "GET /vApps/query") + @Test(description = "GET /vApps/query") public void testQueryAllVApps() { 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); } - @Test(testName = "GET /vApps/query?filter", dependsOnMethods = { "testQueryAllVApps" } ) + @Test(description = "GET /vApps/query?filter", dependsOnMethods = { "testQueryAllVApps" } ) public void testQueryVAppsWithFilter() { QueryResultRecords queryResult = queryClient.vAppsQuery(String.format("name==%s", vApp.getName())); Set 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()); } - @Test(testName = "GET /vms/query", dependsOnMethods = { "testQueryAllVApps" } ) + @Test(description = "GET /vms/query", dependsOnMethods = { "testQueryAllVApps" } ) public void testQueryAllVms() { // Wait for vApp to have been entirely instantiated 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); } - @Test(testName = "GET /vms/query?filter", dependsOnMethods = { "testQueryAllVms" } ) + @Test(description = "GET /vms/query?filter", dependsOnMethods = { "testQueryAllVms" } ) public void testQueryAllVmsWithFilter() { List vms = vApp.getChildren().getVms(); Set 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); } - @Test(testName = "GET /mediaList/query") + @Test(description = "GET /mediaList/query") public void testQueryAllMedia() { QueryResultRecords queryResult = queryClient.mediaListQueryAll(); assertRecordTypes(queryResult, Arrays.asList(VCloudDirectorMediaType.VAPP, null), QueryResultMediaRecord.class); } - @Test(testName = "GET /mediaList/query?filter") + @Test(description = "GET /mediaList/query?filter") public void testQueryMediaWithFilter() { String mediaName = "abc"; QueryResultRecords queryResult = queryClient.mediaListQuery(String.format("name==%s", mediaName)); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/TaskClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/TaskClientLiveTest.java index 7a21f2d0c6..9b1bac8b03 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/TaskClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/TaskClientLiveTest.java @@ -77,7 +77,7 @@ public class TaskClientLiveTest extends BaseVCloudDirectorClientLiveTest { if (vApp != null) cleanUpVApp(vApp); } - @Test(testName = "GET /tasksList/{id}") + @Test(description = "GET /tasksList/{id}") public void testGetTaskList() { orgList = orgClient.getOrgList(); 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() { //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" // 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() { vApp = instantiateVApp(); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UploadClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UploadClientLiveTest.java index 307c75d662..0d9e8b9050 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UploadClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UploadClientLiveTest.java @@ -43,7 +43,7 @@ public class UploadClientLiveTest extends BaseVCloudDirectorClientLiveTest { uploadClient = context.getApi().getUploadClient(); } - @Test(testName = "PUT ???", enabled = false) + @Test(description = "PUT ???", enabled = false) public void testUpload() { } } diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UserClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UserClientLiveTest.java index 442c9b8167..1d3c35ee55 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UserClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UserClientLiveTest.java @@ -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() { User newUser = randomTestUser("testCreateUser", context); user = userClient.createUser(orgRef.getHref(), newUser); Checks.checkUser(newUser); } - @Test(testName = "GET /admin/user/{id}", + @Test(description = "GET /admin/user/{id}", dependsOnMethods = { "testCreateUser" }) public void testGetUser() { user = userClient.getUser(user.getHref()); @@ -104,7 +104,7 @@ public class UserClientLiveTest extends BaseVCloudDirectorClientLiveTest { Checks.checkUser(user); } - @Test(testName = "PUT /admin/user/{id}", + @Test(description = "PUT /admin/user/{id}", dependsOnMethods = { "testGetUser" }) public void testUpdateUser() { User oldUser = user.toBuilder().build(); @@ -162,7 +162,7 @@ public class UserClientLiveTest extends BaseVCloudDirectorClientLiveTest { 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() { // Need to know how many times to fail login to lock account 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" } ) public void testDeleteUser() { // Create a user to be deleted (so we remove dependencies on test ordering) diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientLiveTest.java index 86f0f38541..f076865a66 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppClientLiveTest.java @@ -125,7 +125,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { /** * @see VAppClient#getVApp(URI) */ - @Test(testName = "GET /vApp/{id}") + @Test(description = "GET /vApp/{id}") public void testGetVApp() { // The method under test vApp = vAppClient.getVApp(vAppURI); @@ -148,7 +148,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { /** * @see VAppClient#modifyVApp(URI, VApp) */ - @Test(testName = "PUT /vApp/{id}", dependsOnMethods = { "testGetVApp" }) + @Test(description = "PUT /vApp/{id}", dependsOnMethods = { "testGetVApp" }) public void testModifyVApp() { VApp newVApp = VApp.builder() .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())); } - @Test(testName = "POST /vApp/{id}/action/deploy", dependsOnMethods = { "testGetVApp" }) + @Test(description = "POST /vApp/{id}/action/deploy", dependsOnMethods = { "testGetVApp" }) public void testDeployVApp() { DeployVAppParams params = DeployVAppParams.builder() .deploymentLeaseSeconds((int) TimeUnit.SECONDS.convert(1L, TimeUnit.HOURS)) @@ -190,7 +190,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // Power off VApp vApp = powerOff(vApp); @@ -206,7 +206,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // Power on VApp vApp = powerOn(vApp); @@ -222,7 +222,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // Power on VApp vApp = powerOn(vApp); @@ -241,7 +241,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // Power on VApp vApp = powerOn(vApp); @@ -260,7 +260,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // Power on VApp vApp = powerOn(vApp); @@ -276,7 +276,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // Power on VApp vApp = powerOn(vApp); @@ -295,7 +295,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // Power on VApp vApp = powerOn(vApp); @@ -311,7 +311,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // Power on VApp vApp = powerOn(vApp); @@ -321,7 +321,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { ControlAccessParams params = ControlAccessParams.builder() .notSharedToEveryone() @@ -342,7 +342,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { ControlAccessParams params = ControlAccessParams.builder() .sharedToEveryone() @@ -359,7 +359,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // Suspend the VApp vApp = suspend(vAppURI); @@ -369,7 +369,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // Do this to a new vApp, so don't mess up subsequent tests by making the vApp read-only 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() { // Do this to a new vApp, so don't mess up subsequent tests by making the vApp read-only 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() { // First ensure the vApp is powered n 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, // 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" - @Test(testName = "POST /vApp/{id}/action/recomposeVApp", dependsOnMethods = { "testGetVApp" }) + @Test(description = "POST /vApp/{id}/action/recomposeVApp", dependsOnMethods = { "testGetVApp" }) public void testRecomposeVApp() { 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 - @Test(testName = "POST /vApp/{id}/action/relocate", dependsOnMethods = { "testGetVApp" }) + @Test(description = "POST /vApp/{id}/action/relocate", dependsOnMethods = { "testGetVApp" }) public void testRelocate() { // Relocate to the last of the available datastores 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")); } - @Test(testName = "POST /vApp/{id}/action/upgradeHardwareVersion", dependsOnMethods = { "testGetVApp" }) + @Test(description = "POST /vApp/{id}/action/upgradeHardwareVersion", dependsOnMethods = { "testGetVApp" }) public void testUpgradeHardwareVersion() { // Power off VApp vApp = powerOff(vApp); @@ -466,7 +466,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // The method under test ControlAccessParams controlAccess = vAppClient.getControlAccess(vApp.getHref()); @@ -475,7 +475,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkControlAccessParams(controlAccess); } - @Test(testName = "GET /vApp/{id}/guestCustomizationSection", dependsOnMethods = { "testGetVApp" }) + @Test(description = "GET /vApp/{id}/guestCustomizationSection", dependsOnMethods = { "testGetVApp" }) public void testGetGuestCustomizationSection() { getGuestCustomizationSection(new Function() { @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() { // Copy existing section and update fields GuestCustomizationSection oldSection = vAppClient.getGuestCustomizationSection(vm.getHref()); @@ -516,7 +516,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // The method under test LeaseSettingsSection section = vAppClient.getLeaseSettingsSection(vApp.getHref()); @@ -525,7 +525,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkLeaseSettingsSection(section); } - @Test(testName = "PUT /vApp/{id}/leaseSettingsSection", dependsOnMethods = { "testGetLeaseSettingsSection" }) + @Test(description = "PUT /vApp/{id}/leaseSettingsSection", dependsOnMethods = { "testGetLeaseSettingsSection" }) public void testModifyLeaseSettingsSection() { // Copy existing section 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." - @Test(testName = "PUT /vApp/{id}/media/action/insertMedia", dependsOnMethods = { "testGetVApp" }) + @Test(description = "PUT /vApp/{id}/media/action/insertMedia", dependsOnMethods = { "testGetVApp" }) public void testInsertMedia() { // Setup media params from configured media id MediaInsertOrEjectParams params = MediaInsertOrEjectParams.builder() @@ -587,7 +587,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // Setup media params from configured media id MediaInsertOrEjectParams params = MediaInsertOrEjectParams.builder() @@ -599,7 +599,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // The method under test NetworkConfigSection section = vAppClient.getNetworkConfigSection(vApp.getHref()); @@ -608,7 +608,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkNetworkConfigSection(section); } - @Test(testName = "PUT /vApp/{id}/networkConfigSection", dependsOnMethods = { "testGetNetworkConfigSection" }) + @Test(description = "PUT /vApp/{id}/networkConfigSection", dependsOnMethods = { "testGetNetworkConfigSection" }) public void testModifyNetworkConfigSection() { // Copy existing section and update fields NetworkConfigSection oldSection = vAppClient.getNetworkConfigSection(vApp.getHref()); @@ -632,7 +632,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { getNetworkConnectionSection(new Function() { @Override @@ -643,7 +643,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { } // 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() { // Look up a network in the Vdc Set networks = vdc.getAvailableNetworks(); @@ -675,7 +675,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // The method under test NetworkSection section = vAppClient.getNetworkSection(vApp.getHref()); @@ -684,7 +684,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkNetworkSection(section); } - @Test(testName = "GET /vApp/{id}/operatingSystemSection", dependsOnMethods = { "testGetVApp" }) + @Test(description = "GET /vApp/{id}/operatingSystemSection", dependsOnMethods = { "testGetVApp" }) public void testGetOperatingSystemSection() { // The method under test OperatingSystemSection section = vAppClient.getOperatingSystemSection(vm.getHref()); @@ -693,7 +693,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkOperatingSystemSection(section); } - @Test(testName = "PUT /vApp/{id}/operatingSystemSection", dependsOnMethods = { "testGetOperatingSystemSection", "testModifyVirtualHardwareSection" }) + @Test(description = "PUT /vApp/{id}/operatingSystemSection", dependsOnMethods = { "testGetOperatingSystemSection", "testModifyVirtualHardwareSection" }) public void testModifyOperatingSystemSection() { // Create new OperatingSystemSection OperatingSystemSection newSection = OperatingSystemSection.builder() @@ -716,7 +716,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { assertEquals(modified.getId(), newSection.getId()); } - @Test(testName = "GET /vApp/{id}/owner", dependsOnMethods = { "testGetVApp" }) + @Test(description = "GET /vApp/{id}/owner", dependsOnMethods = { "testGetVApp" }) public void testGetOwner() { // The method under test Owner owner = vAppClient.getOwner(vApp.getHref()); @@ -725,7 +725,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkOwner(owner); } - @Test(testName = "PUT /vApp/{id}/owner", dependsOnMethods = { "testGetOwner" }) + @Test(description = "PUT /vApp/{id}/owner", dependsOnMethods = { "testGetOwner" }) public void testModifyOwner() { 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()); } - @Test(testName = "GET /vApp/{id}/productSections", dependsOnMethods = { "testGetVApp" }) + @Test(description = "GET /vApp/{id}/productSections", dependsOnMethods = { "testGetVApp" }) public void testGetProductSections() { // The method under test ProductSectionList sectionList = vAppClient.getProductSections(vApp.getHref()); @@ -751,7 +751,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkProductSectionList(sectionList); } - @Test(testName = "PUT /vApp/{id}/productSections", dependsOnMethods = { "testGetProductSections" }) + @Test(description = "PUT /vApp/{id}/productSections", dependsOnMethods = { "testGetProductSections" }) public void testModifyProductSections() { // Copy existing section and update fields 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? - @Test(testName = "GET /vApp/{id}/question", dependsOnMethods = { "testDeployVApp" }) + @Test(description = "GET /vApp/{id}/question", dependsOnMethods = { "testDeployVApp" }) public void testGetPendingQuestion() { // Power on VApp vApp = powerOn(vAppURI); @@ -797,7 +797,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { 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() { // TODO check that the question has been answered (e.g. asking for getPendingQuestion does not // include our answered question). @@ -815,7 +815,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { vAppClient.answerQuestion(vm.getHref(), answer); } - @Test(testName = "GET /vApp/{id}/runtimeInfoSection", dependsOnMethods = { "testGetVApp" }) + @Test(description = "GET /vApp/{id}/runtimeInfoSection", dependsOnMethods = { "testGetVApp" }) public void testGetRuntimeInfoSection() { // The method under test RuntimeInfoSection section = vAppClient.getRuntimeInfoSection(vm.getHref()); @@ -825,7 +825,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { } // 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() { // Power on 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() { // Power on VApp vApp = powerOn(vApp); @@ -854,7 +854,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkScreenTicket(ticket); } - @Test(testName = "GET /vApp/{id}/startupSection", dependsOnMethods = { "testGetVApp" }) + @Test(description = "GET /vApp/{id}/startupSection", dependsOnMethods = { "testGetVApp" }) public void testGetStartupSection() { // The method under test StartupSection section = vAppClient.getStartupSection(vApp.getHref()); @@ -863,7 +863,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkStartupSection(section); } - @Test(testName = "PUT /vApp/{id}/startupSection", dependsOnMethods = { "testGetStartupSection" }) + @Test(description = "PUT /vApp/{id}/startupSection", dependsOnMethods = { "testGetStartupSection" }) public void testModifyStartupSection() { // Copy existing section and update fields StartupSection oldSection = vAppClient.getStartupSection(vApp.getHref()); @@ -884,7 +884,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { assertEquals(modified, newSection); } - @Test(testName = "GET /vApp/{id}/virtualHardwareSection", dependsOnMethods = { "testGetVApp" }) + @Test(description = "GET /vApp/{id}/virtualHardwareSection", dependsOnMethods = { "testGetVApp" }) public void testGetVirtualHardwareSection() { // Method under test VirtualHardwareSection hardware = vAppClient.getVirtualHardwareSection(vm.getHref()); @@ -893,7 +893,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkVirtualHardwareSection(hardware); } - @Test(testName = "PUT /vApp/{id}/virtualHardwareSection", dependsOnMethods = { "testGetVirtualHardwareSection" }) + @Test(description = "PUT /vApp/{id}/virtualHardwareSection", dependsOnMethods = { "testGetVirtualHardwareSection" }) public void testModifyVirtualHardwareSection() { // Power off VApp vApp = powerOff(vApp); @@ -941,7 +941,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { assertEquals(modifiedSection, newSection); } - @Test(testName = "GET /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSection" }) + @Test(description = "GET /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSection" }) public void testGetVirtualHardwareSectionCpu() { // Method under test ResourceAllocationSettingData rasd = vAppClient.getVirtualHardwareSectionCpu(vm.getHref()); @@ -950,7 +950,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkResourceAllocationSettingData(rasd); } - @Test(testName = "PUT /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSectionCpu" }) + @Test(description = "PUT /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSectionCpu" }) public void testModifyVirtualHardwareSectionCpu() { // Copy existing section and update fields ResourceAllocationSettingData oldItem = vAppClient.getVirtualHardwareSectionCpu(vm.getHref()); @@ -975,7 +975,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { assertEquals(modified, newItem); } - @Test(testName = "GET /vApp/{id}/virtualHardwareSection/disks", dependsOnMethods = { "testGetVirtualHardwareSection" }) + @Test(description = "GET /vApp/{id}/virtualHardwareSection/disks", dependsOnMethods = { "testGetVirtualHardwareSection" }) public void testGetVirtualHardwareSectionDisks() { // Method under test RasdItemsList rasdItems = vAppClient.getVirtualHardwareSectionDisks(vm.getHref()); @@ -984,7 +984,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkRasdItemsList(rasdItems); } - @Test(testName = "PUT /vApp/{id}/virtualHardwareSection/disks", dependsOnMethods = { "testGetVirtualHardwareSectionDisks" }) + @Test(description = "PUT /vApp/{id}/virtualHardwareSection/disks", dependsOnMethods = { "testGetVirtualHardwareSectionDisks" }) public void testModifyVirtualHardwareSectionDisks() { // Copy the existing items list and modify the name of an item RasdItemsList oldSection = vAppClient.getVirtualHardwareSectionDisks(vm.getHref()); @@ -1020,7 +1020,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { // 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() { // Method under test RasdItemsList rasdItems = vAppClient.getVirtualHardwareSectionMedia(vm.getHref()); @@ -1029,7 +1029,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkRasdItemsList(rasdItems); } - @Test(testName = "GET /vApp/{id}/virtualHardwareSection/memory", dependsOnMethods = { "testGetVirtualHardwareSection" }) + @Test(description = "GET /vApp/{id}/virtualHardwareSection/memory", dependsOnMethods = { "testGetVirtualHardwareSection" }) public void testGetVirtualHardwareSectionMemory() { // Method under test ResourceAllocationSettingData rasd = vAppClient.getVirtualHardwareSectionCpu(vm.getHref()); @@ -1038,7 +1038,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkResourceAllocationSettingData(rasd); } - @Test(testName = "PUT /vApp/{id}/virtualHardwareSection/memory", dependsOnMethods = { "testGetVirtualHardwareSectionMemory" }) + @Test(description = "PUT /vApp/{id}/virtualHardwareSection/memory", dependsOnMethods = { "testGetVirtualHardwareSectionMemory" }) public void testModifyVirtualHardwareSectionMemory() { ResourceAllocationSettingData origItem = vAppClient.getVirtualHardwareSectionMemory(vm.getHref()); ResourceAllocationSettingData newItem = origItem.toBuilder() @@ -1062,7 +1062,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { assertEquals(modified, newItem); } - @Test(testName = "GET /vApp/{id}/virtualHardwareSection/networkCards", dependsOnMethods = { "testGetVirtualHardwareSection" }) + @Test(description = "GET /vApp/{id}/virtualHardwareSection/networkCards", dependsOnMethods = { "testGetVirtualHardwareSection" }) public void testGetVirtualHardwareSectionNetworkCards() { // Method under test RasdItemsList rasdItems = vAppClient.getVirtualHardwareSectionNetworkCards(vm.getHref()); @@ -1071,7 +1071,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkRasdItemsList(rasdItems); } - @Test(testName = "PUT /vApp/{id}/virtualHardwareSection/networkCards", dependsOnMethods = { "testGetVirtualHardwareSectionNetworkCards" }) + @Test(description = "PUT /vApp/{id}/virtualHardwareSection/networkCards", dependsOnMethods = { "testGetVirtualHardwareSectionNetworkCards" }) public void testModifyVirtualHardwareSectionNetworkCards() { RasdItemsList oldSection = vAppClient.getVirtualHardwareSectionNetworkCards(vm.getHref()); RasdItemsList newSection = oldSection.toBuilder().build(); @@ -1091,7 +1091,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { // 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() { // Method under test RasdItemsList rasdItems = vAppClient.getVirtualHardwareSectionSerialPorts(vm.getHref()); @@ -1100,7 +1100,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkRasdItemsList(rasdItems); } - @Test(testName = "PUT /vApp/{id}/virtualHardwareSection/serialPorts", dependsOnMethods = { "testGetVirtualHardwareSectionSerialPorts" }) + @Test(description = "PUT /vApp/{id}/virtualHardwareSection/serialPorts", dependsOnMethods = { "testGetVirtualHardwareSectionSerialPorts" }) public void testModifyVirtualHardwareSectionSerialPorts() { RasdItemsList oldSection = vAppClient.getVirtualHardwareSectionSerialPorts(vm.getHref()); RasdItemsList newSection = oldSection.toBuilder().build(); @@ -1120,7 +1120,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { // See the description in testModifyVirtualHardwareSectionDisks } - @Test(testName = "PUT /vApp/{id}/metadata", dependsOnMethods = { "testGetVApp" }) + @Test(description = "PUT /vApp/{id}/metadata", dependsOnMethods = { "testGetVApp" }) public void testSetMetadataValue() { key = name("key-"); String value = name("value-"); @@ -1134,7 +1134,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkMetadataValueFor(VAPP, newMetadataValue, value); } - @Test(testName = "GET /vApp/{id}/metadata", dependsOnMethods = { "testSetMetadataValue" }) + @Test(description = "GET /vApp/{id}/metadata", dependsOnMethods = { "testSetMetadataValue" }) public void testGetMetadata() { // Call the method being tested 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")); } - @Test(testName = "GET /vApp/{id}/metadata/{key}", dependsOnMethods = { "testGetMetadata" }) + @Test(description = "GET /vApp/{id}/metadata/{key}", dependsOnMethods = { "testGetMetadata" }) public void testGetOrgMetadataValue() { // Call the method being tested 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())); } - @Test(testName = "DELETE /vApp/{id}/metadata/{key}", dependsOnMethods = { "testSetMetadataValue" }) + @Test(description = "DELETE /vApp/{id}/metadata/{key}", dependsOnMethods = { "testSetMetadataValue" }) public void testDeleteMetadataEntry() { // Delete the entry Task task = vAppClient.getMetadataClient().deleteMetadataEntry(vApp.getHref(), key); @@ -1169,7 +1169,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { checkMetadataKeyAbsentFor(VAPP, newMetadata, key); } - @Test(testName = "POST /vApp/{id}/metadata", dependsOnMethods = { "testGetMetadata" }) + @Test(description = "POST /vApp/{id}/metadata", dependsOnMethods = { "testGetMetadata" }) public void testMergeMetadata() { Metadata oldMetadata = vAppClient.getMetadataClient().getMetadata(vApp.getHref()); Map oldMetadataMap = Checks.metadataToMap(oldMetadata); @@ -1197,7 +1197,7 @@ public class VAppClientLiveTest extends AbstractVAppClientLiveTest { /** * @see VAppClient#deleteVApp(URI) */ - @Test(testName = "DELETE /vApp/{id}") + @Test(description = "DELETE /vApp/{id}") public void testDeleteVApp() { // Create a temporary VApp to delete VApp temp = instantiateVApp(); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientLiveTest.java index a8f0e58433..4e30f4bd91 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientLiveTest.java @@ -96,7 +96,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { return clonedVappTemplate; } - @Test(testName = "GET /vAppTemplate/{id}") + @Test(description = "GET /vAppTemplate/{id}") public void testGetVAppTemplate() { vAppTemplate = vAppTemplateClient.getVAppTemplate(vAppTemplateURI); @@ -104,7 +104,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { assertEquals(vAppTemplate.getHref(), vAppTemplateURI); } - @Test(testName = "GET /vAppTemplate/{id}/owner") + @Test(description = "GET /vAppTemplate/{id}/owner") public void testGetVAppTemplateOwner() { Owner owner = vAppTemplateClient.getOwnerOfVAppTemplate(vAppTemplateURI); @@ -112,21 +112,21 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { assertEquals(owner.getUser(), vAppTemplateClient.getVAppTemplate(vAppTemplateURI).getOwner().getUser()); } - @Test(testName = "GET /vAppTemplate/{id}/customizationSection") + @Test(description = "GET /vAppTemplate/{id}/customizationSection") public void testGetCustomizationSection() { CustomizationSection customizationSection = vAppTemplateClient.getVAppTemplateCustomizationSection(vAppTemplateURI); checkCustomizationSection(customizationSection); } - @Test(testName = "GET /vAppTemplate/{id}/productSections") + @Test(description = "GET /vAppTemplate/{id}/productSections") public void testGetProductSections() { ProductSectionList productSectionList = vAppTemplateClient.getProductSectionsForVAppTemplate(vAppTemplateURI); checkProductSectionList(productSectionList); } - @Test(testName = "PUT /vAppTemplate/{id}/productSections") + @Test(description = "PUT /vAppTemplate/{id}/productSections") public void testEditProductSections() { // TODO make a real modification @@ -140,7 +140,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { checkProductSectionList(modified); } - @Test(testName = "GET /vAppTemplate/{id}/guestCustomizationSection") + @Test(description = "GET /vAppTemplate/{id}/guestCustomizationSection") public void testGetGuestCustomizationSection() { getGuestCustomizationSection(new Function() { @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() { // FIXME Wrong case for Vapp LeaseSettingsSection leaseSettingsSection = vAppTemplateClient.getVappTemplateLeaseSettingsSection(vAppTemplateURI); @@ -158,7 +158,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { checkLeaseSettingsSection(leaseSettingsSection); } - @Test(testName = "GET /vAppTemplate/{id}/metadata", dependsOnMethods = { "testEditMetadataValue" }) + @Test(description = "GET /vAppTemplate/{id}/metadata", dependsOnMethods = { "testEditMetadataValue" }) public void testGetVAppTemplateMetadata() { 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 - @Test(testName = "GET /vAppTemplate/{id}/metadata/{key}", dependsOnMethods = { "testGetVAppTemplateMetadata" }) + @Test(description = "GET /vAppTemplate/{id}/metadata/{key}", dependsOnMethods = { "testGetVAppTemplateMetadata" }) public void testGetMetadataValue() { Metadata metadata = vAppTemplateClient.getMetadataClient().getMetadata(vAppTemplateURI); MetadataEntry entry = Iterables.get(metadata.getMetadataEntries(), 0); @@ -177,14 +177,14 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { assertEquals(val.getValue(), entry.getValue()); } - @Test(testName = "GET /vAppTemplate/{id}/networkConfigSection") + @Test(description = "GET /vAppTemplate/{id}/networkConfigSection") public void testGetVAppTemplateNetworkConfigSection() { NetworkConfigSection networkConfigSection = vAppTemplateClient.getVAppTemplateNetworkConfigSection(vAppTemplateURI); checkNetworkConfigSection(networkConfigSection); } - @Test(testName = "GET /vAppTemplate/{id}/networkConnectionSection") + @Test(description = "GET /vAppTemplate/{id}/networkConnectionSection") public void testGetNetworkConnectionSection() { getNetworkConnectionSection(new Function() { @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() { NetworkSection networkSection = vAppTemplateClient.getVAppTemplateNetworkSection(vAppTemplateURI); checkOvfNetworkSection(networkSection); } - @Test(testName = "GET /vAppTemplate/{id}/ovf") + @Test(description = "GET /vAppTemplate/{id}/ovf") public void testGetVAppTemplateOvf() { Envelope envelope = vAppTemplateClient.getVAppTemplateOvf(vAppTemplateURI); checkOvfEnvelope(envelope); } - @Test(testName = "PUT /vAppTemplate/{id}") + @Test(description = "PUT /vAppTemplate/{id}") public void testEditVAppTemplate() { String name = name("myname-"); String description = name("Description "); @@ -225,7 +225,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { assertEquals(newTemplate.getDescription(), description); } - @Test(testName = "POST /vAppTemplate/{id}/metadata", dependsOnMethods = { "testGetVAppTemplate" }) + @Test(description = "POST /vAppTemplate/{id}/metadata", dependsOnMethods = { "testGetVAppTemplate" }) public void testEditMetadata() { // TODO Cleanup after ourselves.. @@ -248,7 +248,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { 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() { // TODO Cleanup after ourselves.. @@ -263,7 +263,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { 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() { // First store a value String key = name("key-"); @@ -280,7 +280,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { checkMetadataKeyAbsentFor("vAppTemplate", newMetadata, key); } - @Test(testName = "PUT /vAppTemplate/{id}/guestCustomizationSection") + @Test(description = "PUT /vAppTemplate/{id}/guestCustomizationSection") public void testEditGuestCustomizationSection() { String computerName = name("n"); GuestCustomizationSection newSection = GuestCustomizationSection.builder() @@ -297,7 +297,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { assertEquals(modified.getComputerName(), computerName); } - @Test(testName = "PUT /vAppTemplate/{id}/customizationSection") + @Test(description = "PUT /vAppTemplate/{id}/customizationSection") public void testEditCustomizationSection() { boolean oldVal = vAppTemplateClient.getVAppTemplateCustomizationSection(vAppTemplateURI).isCustomizeOnInstantiate(); boolean newVal = !oldVal; @@ -315,7 +315,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { } // FIXME deploymentLeaseInSeconds returned is null - @Test(testName = "PUT /vAppTemplate/{id}/leaseSettingsSection") + @Test(description = "PUT /vAppTemplate/{id}/leaseSettingsSection") public void testEditLeaseSettingsSection() throws Exception { int deploymentLeaseInSeconds = random.nextInt(10000)+1; // 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); } - @Test(testName = "PUT /vAppTemplate/{id}/networkConfigSection") + @Test(description = "PUT /vAppTemplate/{id}/networkConfigSection") public void testEditNetworkConfigSection() { // TODO What to modify? @@ -368,7 +368,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { // assertEquals(newVAppNetworkConfig.getNetworkName(), networkName); } - @Test(testName = "PUT /vAppTemplate/{id}/networkConnectionSection") + @Test(description = "PUT /vAppTemplate/{id}/networkConnectionSection") public void testEditNetworkConnectionSection() { // Look up a network in the Vdc Set networks = vdc.getAvailableNetworks(); @@ -391,7 +391,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { } // 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 { 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 { 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); } - @Test(testName = "POST /vAppTemplate/{id}/action/enableDownload") + @Test(description = "POST /vAppTemplate/{id}/action/enableDownload") public void testEnableVAppTemplateDownload() throws Exception { // First disable so that enable really has some work to do... vAppTemplateClient.disableDownloadVappTemplate(vAppTemplateURI); @@ -452,7 +452,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { return false; } - @Test(testName = "POST /vAppTemplate/{id}/action/consolidate") + @Test(description = "POST /vAppTemplate/{id}/action/consolidate") public void testConsolidateVAppTemplate() throws Exception { final Task task = vAppTemplateClient.consolidateVappTemplate(vm.getHref()); assertTaskSucceedsLong(task); @@ -460,7 +460,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { // 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 { // TODO Need assertion that command had effect Reference dataStore = null; // FIXME @@ -472,7 +472,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { assertTaskSucceedsLong(task); } - @Test(testName = "GET /vAppTemplate/{id}/shadowVms") + @Test(description = "GET /vAppTemplate/{id}/shadowVms") public void testGetShadowVms() { References references = vAppTemplateClient.getShadowVms(vAppTemplateURI); @@ -481,7 +481,7 @@ public class VAppTemplateClientLiveTest extends AbstractVAppClientLiveTest { // This failed previously, but is passing now. // 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 { // Kick off a task, and wait for it to complete vAppTemplateClient.disableDownloadVappTemplate(vAppTemplateURI); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VdcClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VdcClientLiveTest.java index 4214aae07e..0b628da2fc 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VdcClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VdcClientLiveTest.java @@ -119,7 +119,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { assertNotNull(vdcURI, String.format(REF_REQ_LIVE, VDC)); } - @Test(testName = "GET /vdc/{id}") + @Test(description = "GET /vdc/{id}") public void testGetVdc() { Vdc vdc = vdcClient.getVdc(vdcURI); assertNotNull(vdc, String.format(OBJ_REQ_LIVE, VDC)); @@ -128,7 +128,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { Checks.checkVdc(vdc); } - @Test(testName = "POST /vdc/{id}/action/captureVApp", dependsOnMethods = { "testInstantiateVAppTemplate" } ) + @Test(description = "POST /vdc/{id}/action/captureVApp", dependsOnMethods = { "testInstantiateVAppTemplate" } ) public void testCaptureVApp() { String name = name("captured-"); @@ -151,7 +151,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { 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() { CloneVAppParams cloneVappParams = CloneVAppParams.builder() .source(instantiatedVApp.getHref()) @@ -179,7 +179,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { Checks.checkVApp(clonedVApp); } - @Test(testName = "POST /vdc/{id}/action/cloneVAppTemplate") + @Test(description = "POST /vdc/{id}/action/cloneVAppTemplate") public void testCloneVAppTemplate() { clonedVAppTemplate = vdcClient.cloneVAppTemplate(vdcURI, CloneVAppTemplateParams.builder() .source(vAppTemplateURI) @@ -192,7 +192,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { Checks.checkVAppTemplate(clonedVAppTemplate); } - @Test(testName = "POST /vdc/{id}/action/composeVApp") + @Test(description = "POST /vdc/{id}/action/composeVApp") public void testComposeVApp() { String name = name("composed-"); @@ -224,7 +224,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { } // TODO Duplicates code in VAppClientLiveTest - @Test(testName = "POST /vdc/{id}/action/instantiateVAppTemplate") + @Test(description = "POST /vdc/{id}/action/instantiateVAppTemplate") public void testInstantiateVAppTemplate() { Vdc vdc = vdcClient.getVdc(vdcURI); @@ -275,7 +275,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { Checks.checkVApp(instantiatedVApp); } - @Test(testName = "POST /vdc/{id}/action/uploadVAppTemplate") + @Test(description = "POST /vdc/{id}/action/uploadVAppTemplate") public void testUploadVAppTemplate() { // TODO Should test all 4 stages of upload; currently doing only stage 1 here. // 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() { context.getApi().getAdminVdcClient().getMetadataClient().setMetadata(toAdminUri(vdcURI), "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() { Metadata metadata = vdcClient.getMetadataClient().getMetadata(vdcURI); @@ -324,7 +324,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { 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() { // First find a key Metadata metadata = vdcClient.getMetadataClient().getMetadata(vdcURI);