org.dasein.cloud.test
Class DaseinTestManager
java.lang.Object
org.dasein.cloud.test.DaseinTestManager
public class DaseinTestManager
- extends Object
Consolidates and manages cloud resources shared across many different tests.
Created by George Reese: 2/17/13 3:23 PM
- Since:
- 2013.04
- Version:
- 2013.04 initial version, 2013.07 Added MQ cloud services support (issue #6)
- Author:
- George Reese
|
Method Summary |
void |
begin(String name)
|
static void |
cleanUp()
|
void |
close()
|
static org.dasein.cloud.CloudProvider |
constructProvider()
|
static org.dasein.cloud.CloudProvider |
constructProvider(String overrideAccount,
String overrideShared,
String overrideSecret)
|
void |
end()
|
static ComputeResources |
getComputeResources()
|
org.dasein.cloud.ProviderContext |
getContext()
|
static String |
getDefaultDataCenterId(boolean stateless)
|
static IdentityResources |
getIdentityResources()
|
String |
getName()
|
static NetworkResources |
getNetworkResources()
|
static PlatformResources |
getPlatformResources()
|
org.dasein.cloud.CloudProvider |
getProvider()
|
static StorageResources |
getStorageResources()
|
String |
getTestAnyFirewallId(String label,
boolean provisionIfNull)
|
org.dasein.cloud.storage.Blob |
getTestBucket(String label,
boolean root,
boolean provisionIfNull)
|
String |
getTestDistributionId(String label,
boolean provisionIfNull,
String origin)
|
String |
getTestGeneralFirewallId(String label,
boolean provisionIfNull)
|
String |
getTestGroupId(String label,
boolean provisionIfNull)
|
String |
getTestImageId(String label,
boolean provisionIfNull)
|
String |
getTestInternetGatewayId(String label,
boolean provisionIfNull,
String vlanId,
String preferredDataCenterId)
|
String |
getTestKeypairId(String label,
boolean provisionIfNull)
|
String |
getTestLoadBalancerId(String label,
String lbNamePrefix,
boolean provisionIfNull)
|
String |
getTestLoadBalancerId(String label,
String lbNamePrefix,
boolean provisionIfNull,
boolean withHealthCheck)
|
String |
getTestNetworkFirewallId(String label,
boolean provisionIfNull,
String inVlanId)
|
org.dasein.cloud.storage.Blob |
getTestObject(String label,
boolean root,
boolean provisionIfNull)
|
String |
getTestQueueId(String label,
boolean provisionIfNull)
|
String |
getTestRDBMSId(String label,
boolean provisionIfNull,
org.dasein.cloud.platform.DatabaseEngine engine)
|
String |
getTestRoutingTableId(String label,
boolean provisionIfNull,
String vlanId,
String preferredDataCenterId)
|
String |
getTestSnapshotId(String label,
boolean provisionIfNull)
|
String |
getTestSSLCertificateName(String label,
boolean provisionIfNull)
|
String |
getTestStaticIpId(String label,
boolean provisionIfNull,
org.dasein.cloud.network.IPVersion version,
boolean forVLAN,
String vlanId)
|
String |
getTestSubnetId(String label,
boolean provisionIfNull,
String vlanId,
String preferredDataCenterId)
|
String |
getTestTopicId(String label,
boolean provisionIfNull)
|
String |
getTestTopologyId(String label,
boolean provisionIfNull)
|
String |
getTestUserId(String label,
boolean provisionIfNull,
String preferredGroupId)
|
String |
getTestVLANFirewallId(String label,
boolean provisionIfNull,
String inVlanId)
|
String |
getTestVLANId(String label,
boolean provisionIfNull,
String preferredDataCenterId)
|
String |
getTestVLANVMId(String label,
org.dasein.cloud.compute.VmState desiredState,
String vlanId,
boolean provisionIfNull,
String preferredDataCenterId)
|
String |
getTestVMId(String label,
String vmName,
org.dasein.cloud.compute.VmState desiredState,
boolean provisionIfNull,
String preferredDataCenterId)
|
String |
getTestVMId(String label,
org.dasein.cloud.compute.VmState desiredState,
boolean provisionIfNull,
String preferredDataCenterId)
|
String |
getTestVMProductId()
|
String |
getTestVolumeId(String label,
boolean provisionIfNull,
org.dasein.cloud.compute.VolumeFormat preferredFormat,
String preferredDataCenterId)
|
String |
getTestVolumeProductId()
|
String |
getTestZoneId(String label,
boolean provisionIfNull)
|
String |
getUserName()
|
static void |
init()
|
boolean |
isTestSkipped()
Checks to see if the test currently being executed is supposed to be skipped. |
void |
ok(String message)
|
static void |
out(org.apache.log4j.Logger logger,
String prefix,
String key,
String value)
|
void |
out(String message)
|
void |
out(String key,
boolean value)
|
void |
out(String key,
double value)
|
void |
out(String key,
float value)
|
void |
out(String key,
int value)
|
void |
out(String key,
long value)
|
void |
out(String key,
Object value)
|
void |
out(String key,
String value)
|
void |
skip()
|
void |
warn(String message)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STATEFUL
public static final String STATEFUL
- See Also:
- Constant Field Values
STATELESS
public static final String STATELESS
- See Also:
- Constant Field Values
REMOVED
public static final String REMOVED
- See Also:
- Constant Field Values
DaseinTestManager
public DaseinTestManager(@Nonnull
Class<?> testClass)
constructProvider
@Nonnull
public static org.dasein.cloud.CloudProvider constructProvider()
constructProvider
@Nonnull
public static org.dasein.cloud.CloudProvider constructProvider(@Nullable
String overrideAccount,
@Nullable
String overrideShared,
@Nullable
String overrideSecret)
getComputeResources
@Nullable
public static ComputeResources getComputeResources()
getDefaultDataCenterId
@Nullable
public static String getDefaultDataCenterId(boolean stateless)
getIdentityResources
@Nullable
public static IdentityResources getIdentityResources()
getNetworkResources
@Nullable
public static NetworkResources getNetworkResources()
getPlatformResources
@Nullable
public static PlatformResources getPlatformResources()
getStorageResources
@Nullable
public static StorageResources getStorageResources()
init
public static void init()
cleanUp
public static void cleanUp()
out
public static void out(@Nonnull
org.apache.log4j.Logger logger,
@Nullable
String prefix,
@Nonnull
String key,
@Nullable
String value)
begin
public void begin(@Nonnull
String name)
close
public void close()
end
public void end()
getContext
@Nonnull
public org.dasein.cloud.ProviderContext getContext()
getName
@Nullable
public String getName()
getTestAnyFirewallId
@Nullable
public String getTestAnyFirewallId(@Nonnull
String label,
boolean provisionIfNull)
getTestBucket
@Nullable
public org.dasein.cloud.storage.Blob getTestBucket(@Nonnull
String label,
boolean root,
boolean provisionIfNull)
getTestDistributionId
@Nullable
public String getTestDistributionId(@Nonnull
String label,
boolean provisionIfNull,
@Nullable
String origin)
getTestGeneralFirewallId
@Nullable
public String getTestGeneralFirewallId(@Nonnull
String label,
boolean provisionIfNull)
getTestGroupId
@Nullable
public String getTestGroupId(@Nonnull
String label,
boolean provisionIfNull)
getTestImageId
@Nullable
public String getTestImageId(@Nonnull
String label,
boolean provisionIfNull)
getTestKeypairId
@Nullable
public String getTestKeypairId(@Nonnull
String label,
boolean provisionIfNull)
getTestLoadBalancerId
@Nullable
public String getTestLoadBalancerId(@Nonnull
String label,
@Nonnull
String lbNamePrefix,
boolean provisionIfNull,
boolean withHealthCheck)
getTestLoadBalancerId
@Nullable
public String getTestLoadBalancerId(@Nonnull
String label,
@Nonnull
String lbNamePrefix,
boolean provisionIfNull)
getTestSSLCertificateName
@Nullable
public String getTestSSLCertificateName(@Nonnull
String label,
boolean provisionIfNull)
getTestNetworkFirewallId
@Nullable
public String getTestNetworkFirewallId(@Nonnull
String label,
boolean provisionIfNull,
@Nullable
String inVlanId)
getTestObject
@Nullable
public org.dasein.cloud.storage.Blob getTestObject(@Nonnull
String label,
boolean root,
boolean provisionIfNull)
getTestQueueId
@Nullable
public String getTestQueueId(@Nonnull
String label,
boolean provisionIfNull)
getTestRDBMSId
@Nullable
public String getTestRDBMSId(@Nonnull
String label,
boolean provisionIfNull,
@Nullable
org.dasein.cloud.platform.DatabaseEngine engine)
getTestSnapshotId
@Nullable
public String getTestSnapshotId(@Nonnull
String label,
boolean provisionIfNull)
getTestStaticIpId
@Nullable
public String getTestStaticIpId(@Nonnull
String label,
boolean provisionIfNull,
@Nullable
org.dasein.cloud.network.IPVersion version,
boolean forVLAN,
@Nullable
String vlanId)
getTestSubnetId
@Nullable
public String getTestSubnetId(@Nonnull
String label,
boolean provisionIfNull,
@Nullable
String vlanId,
@Nullable
String preferredDataCenterId)
getTestInternetGatewayId
@Nullable
public String getTestInternetGatewayId(@Nonnull
String label,
boolean provisionIfNull,
@Nullable
String vlanId,
@Nullable
String preferredDataCenterId)
getTestTopicId
@Nullable
public String getTestTopicId(@Nonnull
String label,
boolean provisionIfNull)
getTestTopologyId
@Nullable
public String getTestTopologyId(@Nonnull
String label,
boolean provisionIfNull)
getTestUserId
@Nullable
public String getTestUserId(@Nonnull
String label,
boolean provisionIfNull,
@Nullable
String preferredGroupId)
getTestVLANFirewallId
@Nullable
public String getTestVLANFirewallId(@Nonnull
String label,
boolean provisionIfNull,
@Nullable
String inVlanId)
getTestVLANId
@Nullable
public String getTestVLANId(@Nonnull
String label,
boolean provisionIfNull,
@Nullable
String preferredDataCenterId)
getTestRoutingTableId
@Nullable
public String getTestRoutingTableId(@Nonnull
String label,
boolean provisionIfNull,
@Nullable
String vlanId,
@Nullable
String preferredDataCenterId)
getTestVMId
@Nullable
public String getTestVMId(@Nonnull
String label,
@Nullable
org.dasein.cloud.compute.VmState desiredState,
boolean provisionIfNull,
@Nullable
String preferredDataCenterId)
getTestVMId
@Nullable
public String getTestVMId(@Nonnull
String label,
@Nonnull
String vmName,
@Nullable
org.dasein.cloud.compute.VmState desiredState,
boolean provisionIfNull,
@Nullable
String preferredDataCenterId)
getTestVLANVMId
@Nullable
public String getTestVLANVMId(@Nonnull
String label,
@Nullable
org.dasein.cloud.compute.VmState desiredState,
@Nullable
String vlanId,
boolean provisionIfNull,
@Nullable
String preferredDataCenterId)
getTestVMProductId
@Nullable
public String getTestVMProductId()
getTestVolumeId
@Nullable
public String getTestVolumeId(@Nonnull
String label,
boolean provisionIfNull,
@Nullable
org.dasein.cloud.compute.VolumeFormat preferredFormat,
@Nullable
String preferredDataCenterId)
getTestVolumeProductId
@Nullable
public String getTestVolumeProductId()
getTestZoneId
@Nullable
public String getTestZoneId(@Nonnull
String label,
boolean provisionIfNull)
getProvider
@Nonnull
public org.dasein.cloud.CloudProvider getProvider()
isTestSkipped
public boolean isTestSkipped()
- Checks to see if the test currently being executed is supposed to be skipped.
A test is assumed to be run unless there are a list of inclusions and the test is not
in the list or there is a list of exclusions and the test is in the list. If there are
inclusions and exclusions, any conflict is resolved in favor of executing the test.
Exclusions and inclusions are set as the
System properties dasein.inclusions and
dasein.exclusions. You may specify an entire suite (e.g. "StatelessVMTests") or a specific
test (e.g. "StatelessVMTests.listVirtualMachines"). You may also specify multiple tests:
-Ddasein.inclusions=StatelessVMTests.listVirtualMachines,StatelessDCTests
This will execute only the listVirtualMachines test from StatelessVMTests and all StatelessDCTests. All other
tests will be skipped.
- Returns:
- true if the current test is to be skipped
ok
public void ok(@Nonnull
String message)
out
public void out(@Nonnull
String message)
out
public void out(@Nonnull
String key,
boolean value)
out
public void out(@Nonnull
String key,
int value)
out
public void out(@Nonnull
String key,
long value)
out
public void out(@Nonnull
String key,
double value)
out
public void out(@Nonnull
String key,
float value)
out
public void out(@Nonnull
String key,
Object value)
out
public void out(@Nonnull
String key,
@Nullable
String value)
skip
public void skip()
warn
public void warn(@Nonnull
String message)
getUserName
public String getUserName()
Copyright © 2009-2014 Dell, Inc.. All Rights Reserved.