Search in sources :

Example 16 with SimulatorProperties

use of com.hazelcast.simulator.common.SimulatorProperties in project hazelcast-simulator by hazelcast.

the class ProvisionerUtilsTest method testEnsureIsCloudProviderSetup_withEC2.

@Test
public void testEnsureIsCloudProviderSetup_withEC2() {
    SimulatorProperties properties = mock(SimulatorProperties.class);
    when(properties.getCloudProvider()).thenReturn(CloudProviderUtils.PROVIDER_EC2);
    ensureIsCloudProviderSetup(properties, "terminate");
}
Also used : SimulatorProperties(com.hazelcast.simulator.common.SimulatorProperties) Test(org.junit.Test)

Example 17 with SimulatorProperties

use of com.hazelcast.simulator.common.SimulatorProperties in project hazelcast-simulator by hazelcast.

the class ProvisionerUtilsTest method testEnsureIsRemoteSetup_withEC2.

@Test
public void testEnsureIsRemoteSetup_withEC2() {
    SimulatorProperties properties = mock(SimulatorProperties.class);
    when(properties.getCloudProvider()).thenReturn(CloudProviderUtils.PROVIDER_EC2);
    ensureIsRemoteSetup(properties, "terminate");
}
Also used : SimulatorProperties(com.hazelcast.simulator.common.SimulatorProperties) Test(org.junit.Test)

Example 18 with SimulatorProperties

use of com.hazelcast.simulator.common.SimulatorProperties in project hazelcast-simulator by hazelcast.

the class ProvisionerUtilsTest method testEnsureIsCloudProviderSetup_withStatic.

@Test(expected = CommandLineExitException.class)
public void testEnsureIsCloudProviderSetup_withStatic() {
    SimulatorProperties properties = mock(SimulatorProperties.class);
    when(properties.getCloudProvider()).thenReturn(CloudProviderUtils.PROVIDER_STATIC);
    ensureIsCloudProviderSetup(properties, "terminate");
}
Also used : SimulatorProperties(com.hazelcast.simulator.common.SimulatorProperties) Test(org.junit.Test)

Example 19 with SimulatorProperties

use of com.hazelcast.simulator.common.SimulatorProperties in project hazelcast-simulator by hazelcast.

the class CloudProviderUtilsTest method getSimulatorProperties.

private static SimulatorProperties getSimulatorProperties(String cloudProvider) {
    SimulatorProperties properties = mock(SimulatorProperties.class);
    when(properties.getCloudProvider()).thenReturn(cloudProvider);
    return properties;
}
Also used : SimulatorProperties(com.hazelcast.simulator.common.SimulatorProperties)

Example 20 with SimulatorProperties

use of com.hazelcast.simulator.common.SimulatorProperties in project hazelcast-simulator by hazelcast.

the class CloudProviderUtilsTest method testIsCloudProvider_withEC2.

@Test
public void testIsCloudProvider_withEC2() {
    SimulatorProperties properties = getSimulatorProperties(PROVIDER_EC2);
    assertTrue(isCloudProvider(properties));
}
Also used : SimulatorProperties(com.hazelcast.simulator.common.SimulatorProperties) Test(org.junit.Test)

Aggregations

SimulatorProperties (com.hazelcast.simulator.common.SimulatorProperties)21 Test (org.junit.Test)12 File (java.io.File)5 Before (org.junit.Before)4 Registry (com.hazelcast.simulator.coordinator.registry.Registry)3 Agent (com.hazelcast.simulator.agent.Agent)2 AgentsFile (com.hazelcast.simulator.common.AgentsFile)2 AgentData (com.hazelcast.simulator.coordinator.registry.AgentData)2 FileUtils.ensureExistingFile (com.hazelcast.simulator.utils.FileUtils.ensureExistingFile)2 SimulatorUtils.loadSimulatorProperties (com.hazelcast.simulator.utils.SimulatorUtils.loadSimulatorProperties)2 HazelcastDriver (com.hazelcast.simulator.vendors.HazelcastDriver)2 Bash (com.hazelcast.simulator.utils.Bash)1 FileUtils.newFile (com.hazelcast.simulator.utils.FileUtils.newFile)1 VendorDriver (com.hazelcast.simulator.vendors.VendorDriver)1 Map (java.util.Map)1 Properties (java.util.Properties)1 TreeSet (java.util.TreeSet)1 BeforeClass (org.junit.BeforeClass)1