From a8c1228f7b077db4dc6f17751f72c06f35c41d80 Mon Sep 17 00:00:00 2001 From: Andrew Donald Kennedy Date: Tue, 20 Mar 2012 22:14:10 +0000 Subject: [PATCH] Issue 830: Tidy up test annotations --- .../director/v1_5/features/AdminCatalogClientExpectTest.java | 2 +- .../director/v1_5/features/AdminNetworkClientExpectTest.java | 2 +- .../director/v1_5/features/AdminNetworkClientLiveTest.java | 1 + .../director/v1_5/features/AdminQueryClientExpectTest.java | 2 +- .../vcloud/director/v1_5/features/AdminQueryClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/AdminVdcClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/GroupClientExpectTest.java | 2 +- .../vcloud/director/v1_5/features/MediaClientExpectTest.java | 2 +- .../vcloud/director/v1_5/features/QueryClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/TaskClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/UserClientLiveTest.java | 2 +- .../director/v1_5/features/VAppTemplateClientExpectTest.java | 2 +- .../vcloud/director/v1_5/features/VdcClientLiveTest.java | 2 +- 13 files changed, 13 insertions(+), 12 deletions(-) diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientExpectTest.java index ef05c37b5f..9921d41933 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientExpectTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientExpectTest.java @@ -41,7 +41,7 @@ import com.google.common.collect.ImmutableSet; * * @author grkvlt@apache.org */ -@Test(groups = { "unit", "user" }, singleThreaded = true, testName = "CatalogClientExpectTest") +@Test(groups = { "unit", "admin", "catalog" }, singleThreaded = true, testName = "CatalogClientExpectTest") public class AdminCatalogClientExpectTest extends BaseVCloudDirectorRestClientExpectTest { private Reference orgRef = Reference.builder() diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminNetworkClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminNetworkClientExpectTest.java index d30dc879b3..5d7d8bb3a4 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminNetworkClientExpectTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminNetworkClientExpectTest.java @@ -38,7 +38,7 @@ import com.google.common.collect.ImmutableSet; * * @author danikov */ -@Test(groups = { "unit", "admin", "adminNetwork"}, singleThreaded = true, testName = "AdminNetworkClientExpectTest") +@Test(groups = { "unit", "admin", "network"}, singleThreaded = true, testName = "AdminNetworkClientExpectTest") public class AdminNetworkClientExpectTest extends BaseVCloudDirectorRestClientExpectTest { Reference networkRef = Reference.builder() 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 1fd638fd15..51c93d34dd 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 @@ -64,6 +64,7 @@ public class AdminNetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest Reference networkRef; Network network; + @Override @BeforeClass(inheritGroups = true) protected void setupRequiredClients() { networkClient = context.getApi().getAdminNetworkClient(); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminQueryClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminQueryClientExpectTest.java index f0a1907ab2..89c007bf35 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminQueryClientExpectTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminQueryClientExpectTest.java @@ -40,7 +40,7 @@ import com.google.common.collect.ImmutableMultimap; * * @author Aled Sage */ -@Test(groups = { "unit", "user", "query" }, singleThreaded = true, testName = "AdminQueryClientExpectTest") +@Test(groups = { "unit", "admin", "query" }, singleThreaded = true, testName = "AdminQueryClientExpectTest") public class AdminQueryClientExpectTest extends BaseVCloudDirectorRestClientExpectTest { // TODO Write expect tests for all other admin-query operations 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 55f0e05126..dbe5ba7f08 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 @@ -39,7 +39,7 @@ import org.testng.annotations.Test; * * @author Aled Sage */ -@Test(groups = { "live", "user", "query" }, singleThreaded = true, testName = "AdminQueryClientLiveTest") +@Test(groups = { "live", "admin", "query" }, singleThreaded = true, testName = "AdminQueryClientLiveTest") public class AdminQueryClientLiveTest extends BaseVCloudDirectorClientLiveTest { /* 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 5bb123e8fb..eada7bf22f 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 @@ -68,7 +68,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { adminVdcUri = toAdminUri(vdcURI); } - @AfterClass(groups = { "live" }) + @AfterClass(alwaysRun = true) public void cleanUp() throws Exception { if (metadataKey != null) { try { diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/GroupClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/GroupClientExpectTest.java index b61708eace..3db50f235d 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/GroupClientExpectTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/GroupClientExpectTest.java @@ -34,7 +34,7 @@ import org.testng.annotations.Test; * * @author danikov */ -@Test(groups = { "unit", "user", "group"}, singleThreaded = true, testName = "GroupClientExpectTest") +@Test(groups = { "unit", "admin", "group"}, singleThreaded = true, testName = "GroupClientExpectTest") public class GroupClientExpectTest extends BaseVCloudDirectorRestClientExpectTest { private Reference groupRef = Reference.builder() diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientExpectTest.java index 2ee4148306..c9f1324876 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientExpectTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientExpectTest.java @@ -47,7 +47,7 @@ import com.google.common.collect.ImmutableSet; * * @author danikov */ -@Test(groups = { "unit", "media" }, singleThreaded = true, testName = "MediaClientExpectTest") +@Test(groups = { "unit", "user", "media" }, singleThreaded = true, testName = "MediaClientExpectTest") public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTest { @Test 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 f9fa7d713d..cbcada3448 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 @@ -172,7 +172,7 @@ public class QueryClientLiveTest extends BaseVCloudDirectorClientLiveTest { assertEquals(hrefs, vmHrefs, "VMs query result should equal vms of vApp "+vApp.getName()+" ("+vmHrefs+"); but only has "+hrefs); } - private static void assertRecordTypes(QueryResultRecords queryResult, Collection validTypes, Class validClazz) { + private static void assertRecordTypes(QueryResultRecords queryResult, Collection validTypes, Class validClazz) { for (QueryResultRecordType record : queryResult.getRecords()) { assertTrue(validTypes.contains(record.getType()), "invalid type for query result record, "+record.getType()+"; valid types are "+validTypes); assertEquals(record.getClass(), validClazz, "invalid type for query result record, "+record.getClass()+"; expected "+validClazz); 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 a0de3a5dff..4ae3c61881 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 @@ -72,7 +72,7 @@ public class TaskClientLiveTest extends BaseVCloudDirectorClientLiveTest { taskClient = context.getApi().getTaskClient(); } - @AfterClass(groups = { "live" }) + @AfterClass(alwaysRun = true) public void cleanUp() throws Exception { if (vApp != null) cleanUpVApp(vApp); } 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 8bc53f0e0a..3b3e4bc063 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 @@ -81,7 +81,7 @@ public class UserClientLiveTest extends BaseVCloudDirectorClientLiveTest { orgRef = Iterables.getFirst(context.getApi().getOrgClient().getOrgList().getOrgs(), null).toAdminReference(endpoint); } - @AfterClass(groups = { "live" }) + @AfterClass(alwaysRun = true) public void cleanUp() throws Exception { if (user != null) { try { diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientExpectTest.java index 2e29e7475f..8c826f18a1 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientExpectTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VAppTemplateClientExpectTest.java @@ -74,7 +74,7 @@ import com.google.common.collect.ImmutableSet; * * @author Adam Lowe */ -@Test(groups = {"unit", "user"}, testName = "VAppTemplateClientExpectTest") +@Test(groups = { "unit", "user", "vapptemplate" }, testName = "VAppTemplateClientExpectTest") public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientExpectTest { public VAppTemplateClientExpectTest() { 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 b5971b4605..afe586a2c5 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 @@ -84,7 +84,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { private VAppTemplate capturedVAppTemplate; private VAppTemplate uploadedVAppTemplate; - @AfterClass(groups = { "live" }) + @AfterClass(alwaysRun = true) public void cleanUp() throws Exception { if (clonedVAppTemplate != null) { cleanUpVAppTemplate(clonedVAppTemplate);