mirror of https://github.com/apache/jclouds.git
Issue 830: Make live test before methods always run
This commit is contained in:
parent
6918d1c448
commit
1d886305ba
|
@ -43,7 +43,7 @@ public class VCloudDirectorClientExperimentLiveTest extends BaseVCloudDirectorCl
|
|||
* @see BaseVCloudDirectorClientLiveTest#setupRequiredClients()
|
||||
*/
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupRequiredClients() { }
|
||||
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ public abstract class AbstractVAppClientLiveTest extends BaseVCloudDirectorClien
|
|||
*
|
||||
* @see BaseVCloudDirectorClientLiveTest#setupRequiredClients()
|
||||
*/
|
||||
@BeforeClass(inheritGroups = true, description = "Retrieves the required clients from the REST API context")
|
||||
@BeforeClass(alwaysRun = true, description = "Retrieves the required clients from the REST API context")
|
||||
@Override
|
||||
protected void setupRequiredClients() {
|
||||
assertNotNull(context.getApi());
|
||||
|
@ -119,7 +119,7 @@ public abstract class AbstractVAppClientLiveTest extends BaseVCloudDirectorClien
|
|||
* Retrieves the test {@link Vdc} and {@link VAppTemplate} from their configured {@link URI}s.
|
||||
* Instantiates a new test VApp.
|
||||
*/
|
||||
@BeforeClass(alwaysRun = true, description = "Sets up the environment")
|
||||
@BeforeClass(alwaysRun = true, description = "Sets up the environment", dependsOnMethods = { "setupRequiredClients" })
|
||||
protected void setupEnvironment() {
|
||||
// Get the configured Vdc for the tests
|
||||
vdc = vdcClient.getVdc(vdcURI);
|
||||
|
|
|
@ -71,7 +71,7 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest
|
|||
private Owner owner;
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
protected void setupRequiredClients() {
|
||||
catalogClient = context.getApi().getAdminCatalogClient();
|
||||
orgRef = Iterables.getFirst(context.getApi().getOrgClient().getOrgList().getOrgs(), null).toAdminReference(endpoint);
|
||||
|
|
|
@ -65,7 +65,7 @@ public class AdminNetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest
|
|||
Network network;
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
protected void setupRequiredClients() {
|
||||
networkClient = context.getApi().getAdminNetworkClient();
|
||||
networkRef = Reference.builder().href(networkURI).build().toAdminReference(endpoint);
|
||||
|
|
|
@ -70,7 +70,7 @@ public class AdminOrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
private OrgVAppTemplateLeaseSettings vAppTemplateLeaseSettings;
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupRequiredClients() {
|
||||
orgClient = context.getApi().getAdminOrgClient();
|
||||
orgRef = Iterables.getFirst(orgClient.getOrgList().getOrgs(), null).toAdminReference(endpoint);
|
||||
|
|
|
@ -49,7 +49,7 @@ public class AdminQueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
private AdminQueryClient queryClient;
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupRequiredClients() {
|
||||
queryClient = context.getApi().getAdminQueryClient();
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
private String metadataValue;
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupRequiredClients() {
|
||||
vdcClient = context.getApi().getAdminVdcClient();
|
||||
metadataClient = vdcClient.getMetadataClient();
|
||||
|
|
|
@ -54,7 +54,7 @@ public class GroupClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
private Group group;
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupRequiredClients() {
|
||||
groupClient = context.getApi().getGroupClient();
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
protected MediaClient mediaClient;
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupRequiredClients() {
|
||||
vdcClient = context.getApi().getVdcClient();
|
||||
mediaClient = context.getApi().getMediaClient();
|
||||
|
|
|
@ -59,7 +59,7 @@ public class NetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
protected NetworkClient networkClient;
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupRequiredClients() {
|
||||
networkClient = context.getApi().getNetworkClient();
|
||||
context.getApi().getAdminNetworkClient().getMetadataClient().setMetadata(toAdminUri(networkURI),
|
||||
|
|
|
@ -61,7 +61,7 @@ public class OrgClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
private OrgClient orgClient;
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupRequiredClients() {
|
||||
orgClient = context.getApi().getOrgClient();
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class QueryClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
}
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupRequiredClients() {
|
||||
queryClient = context.getApi().getQueryClient();
|
||||
vAppTemplateClient = context.getApi().getVAppTemplateClient();
|
||||
|
|
|
@ -66,7 +66,7 @@ public class TaskClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
private VApp vApp;
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupRequiredClients() {
|
||||
orgClient = context.getApi().getOrgClient();
|
||||
taskClient = context.getApi().getTaskClient();
|
||||
|
|
|
@ -38,7 +38,7 @@ public class UploadClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
protected UploadClient uploadClient;
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupRequiredClients() {
|
||||
uploadClient = context.getApi().getUploadClient();
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public class UserClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
private static Random random = new Random();
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupRequiredClients() {
|
||||
userClient = context.getApi().getUserClient();
|
||||
orgRef = Iterables.getFirst(context.getApi().getOrgClient().getOrgList().getOrgs(), null).toAdminReference(endpoint);
|
||||
|
|
|
@ -110,7 +110,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
}
|
||||
|
||||
@Override
|
||||
@BeforeClass(inheritGroups = true)
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void setupRequiredClients() {
|
||||
vdcClient = context.getApi().getVdcClient();
|
||||
vappTemplateClient = context.getApi().getVAppTemplateClient();
|
||||
|
|
|
@ -130,7 +130,7 @@ public abstract class BaseVCloudDirectorClientLiveTest extends BaseVersionedServ
|
|||
|
||||
protected static DateService dateService;
|
||||
|
||||
@BeforeGroups("live")
|
||||
@BeforeGroups(alwaysRun = true)
|
||||
protected static void setupDateService() {
|
||||
dateService = Guice.createInjector().getInstance(DateService.class);
|
||||
assertNotNull(dateService);
|
||||
|
@ -149,7 +149,7 @@ public abstract class BaseVCloudDirectorClientLiveTest extends BaseVersionedServ
|
|||
retryTaskSuccessLong = new RetryablePredicate<Task>(taskSuccess, LONG_TASK_TIMEOUT_SECONDS * 1000L);
|
||||
}
|
||||
|
||||
@BeforeClass(groups = { "live" })
|
||||
@BeforeClass(alwaysRun = true)
|
||||
protected void setupContext() throws Exception {
|
||||
setupCredentials();
|
||||
Properties overrides = setupProperties();
|
||||
|
|
Loading…
Reference in New Issue