Issue 830: Tidy up test annotations

This commit is contained in:
Andrew Donald Kennedy 2012-03-20 22:14:10 +00:00
parent c51143c12b
commit a8c1228f7b
13 changed files with 13 additions and 12 deletions

View File

@ -41,7 +41,7 @@ import com.google.common.collect.ImmutableSet;
* *
* @author grkvlt@apache.org * @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 { public class AdminCatalogClientExpectTest extends BaseVCloudDirectorRestClientExpectTest {
private Reference orgRef = Reference.builder() private Reference orgRef = Reference.builder()

View File

@ -38,7 +38,7 @@ import com.google.common.collect.ImmutableSet;
* *
* @author danikov * @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 { public class AdminNetworkClientExpectTest extends BaseVCloudDirectorRestClientExpectTest {
Reference networkRef = Reference.builder() Reference networkRef = Reference.builder()

View File

@ -64,6 +64,7 @@ public class AdminNetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest
Reference networkRef; Reference networkRef;
Network network; Network network;
@Override
@BeforeClass(inheritGroups = true) @BeforeClass(inheritGroups = true)
protected void setupRequiredClients() { protected void setupRequiredClients() {
networkClient = context.getApi().getAdminNetworkClient(); networkClient = context.getApi().getAdminNetworkClient();

View File

@ -40,7 +40,7 @@ import com.google.common.collect.ImmutableMultimap;
* *
* @author Aled Sage * @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 { public class AdminQueryClientExpectTest extends BaseVCloudDirectorRestClientExpectTest {
// TODO Write expect tests for all other admin-query operations // TODO Write expect tests for all other admin-query operations

View File

@ -39,7 +39,7 @@ import org.testng.annotations.Test;
* *
* @author Aled Sage * @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 { public class AdminQueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
/* /*

View File

@ -68,7 +68,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
adminVdcUri = toAdminUri(vdcURI); adminVdcUri = toAdminUri(vdcURI);
} }
@AfterClass(groups = { "live" }) @AfterClass(alwaysRun = true)
public void cleanUp() throws Exception { public void cleanUp() throws Exception {
if (metadataKey != null) { if (metadataKey != null) {
try { try {

View File

@ -34,7 +34,7 @@ import org.testng.annotations.Test;
* *
* @author danikov * @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 { public class GroupClientExpectTest extends BaseVCloudDirectorRestClientExpectTest {
private Reference groupRef = Reference.builder() private Reference groupRef = Reference.builder()

View File

@ -47,7 +47,7 @@ import com.google.common.collect.ImmutableSet;
* *
* @author danikov * @author danikov
*/ */
@Test(groups = { "unit", "media" }, singleThreaded = true, testName = "MediaClientExpectTest") @Test(groups = { "unit", "user", "media" }, singleThreaded = true, testName = "MediaClientExpectTest")
public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTest { public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTest {
@Test @Test

View File

@ -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); 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<String> validTypes, Class validClazz) { private static void assertRecordTypes(QueryResultRecords queryResult, Collection<String> validTypes, Class<?> validClazz) {
for (QueryResultRecordType record : queryResult.getRecords()) { for (QueryResultRecordType record : queryResult.getRecords()) {
assertTrue(validTypes.contains(record.getType()), "invalid type for query result record, "+record.getType()+"; valid types are "+validTypes); 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); assertEquals(record.getClass(), validClazz, "invalid type for query result record, "+record.getClass()+"; expected "+validClazz);

View File

@ -72,7 +72,7 @@ public class TaskClientLiveTest extends BaseVCloudDirectorClientLiveTest {
taskClient = context.getApi().getTaskClient(); taskClient = context.getApi().getTaskClient();
} }
@AfterClass(groups = { "live" }) @AfterClass(alwaysRun = true)
public void cleanUp() throws Exception { public void cleanUp() throws Exception {
if (vApp != null) cleanUpVApp(vApp); if (vApp != null) cleanUpVApp(vApp);
} }

View File

@ -81,7 +81,7 @@ public class UserClientLiveTest extends BaseVCloudDirectorClientLiveTest {
orgRef = Iterables.getFirst(context.getApi().getOrgClient().getOrgList().getOrgs(), null).toAdminReference(endpoint); orgRef = Iterables.getFirst(context.getApi().getOrgClient().getOrgList().getOrgs(), null).toAdminReference(endpoint);
} }
@AfterClass(groups = { "live" }) @AfterClass(alwaysRun = true)
public void cleanUp() throws Exception { public void cleanUp() throws Exception {
if (user != null) { if (user != null) {
try { try {

View File

@ -74,7 +74,7 @@ import com.google.common.collect.ImmutableSet;
* *
* @author Adam Lowe * @author Adam Lowe
*/ */
@Test(groups = {"unit", "user"}, testName = "VAppTemplateClientExpectTest") @Test(groups = { "unit", "user", "vapptemplate" }, testName = "VAppTemplateClientExpectTest")
public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientExpectTest { public class VAppTemplateClientExpectTest extends BaseVCloudDirectorRestClientExpectTest {
public VAppTemplateClientExpectTest() { public VAppTemplateClientExpectTest() {

View File

@ -84,7 +84,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
private VAppTemplate capturedVAppTemplate; private VAppTemplate capturedVAppTemplate;
private VAppTemplate uploadedVAppTemplate; private VAppTemplate uploadedVAppTemplate;
@AfterClass(groups = { "live" }) @AfterClass(alwaysRun = true)
public void cleanUp() throws Exception { public void cleanUp() throws Exception {
if (clonedVAppTemplate != null) { if (clonedVAppTemplate != null) {
cleanUpVAppTemplate(clonedVAppTemplate); cleanUpVAppTemplate(clonedVAppTemplate);