Skip to content
Permalink
Browse files
Upgrade to java8
- bump guava version to 21.0
- fix DimensionData test
  • Loading branch information
andreaturli committed May 22, 2018
1 parent 331fd68 commit 1b5dd9feecfc17ce9ee6afdb4427bfa4c6ad9d5e
Showing 2 changed files with 8 additions and 5 deletions.
@@ -259,7 +259,8 @@ public void testCreateNatRule() throws Exception {

public void testListNatRules() throws Exception {
server.enqueue(new MockResponse().setBody(payloadFromResource("/natRules.json")));
api().listNatRules("12345").concat().toList();
Iterable<NatRule> natRules = api().listNatRules("12345").concat().toList();
assertEquals(size(natRules), 2);
assertSent(GET, "/caas/2.4/6ac1e746-b1ea-4da5-a24e-caf1a978789d/network/natRule?networkDomainId=12345");
}

@@ -294,13 +295,15 @@ public void testGetNatRule_404() throws Exception {

public void testListFirewallRules() throws Exception {
server.enqueue(new MockResponse().setBody(payloadFromResource("/firewallRules.json")));
api().listFirewallRules("12345").concat().toList();
Iterable<FirewallRule> firewallRules = api().listFirewallRules("12345").concat().toList();
assertEquals(size(firewallRules), 1);
assertSent(GET, "/caas/2.4/6ac1e746-b1ea-4da5-a24e-caf1a978789d/network/firewallRule?networkDomainId=12345");
}

public void testListFirewallRules_404() throws Exception {
server.enqueue(response404());
api().listFirewallRules("12345").concat().toList();
Iterable<FirewallRule> firewallRules = api().listFirewallRules("12345").concat().toList();
assertEquals(size(firewallRules), 0);
assertSent(GET, "/caas/2.4/6ac1e746-b1ea-4da5-a24e-caf1a978789d/network/firewallRule?networkDomainId=12345");
}

@@ -40,7 +40,7 @@
import java.util.Properties;
import java.util.Set;

import static com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor;
import static com.google.common.util.concurrent.MoreExecutors.newDirectExecutorService;
import static org.jclouds.dimensiondata.cloudcontrol.config.DimensionDataCloudControlComputeServiceContextModule.NETWORK_DOMAIN_DELETED_PREDICATE;
import static org.jclouds.dimensiondata.cloudcontrol.config.DimensionDataCloudControlComputeServiceContextModule.NETWORK_DOMAIN_NORMAL_PREDICATE;
import static org.jclouds.dimensiondata.cloudcontrol.config.DimensionDataCloudControlComputeServiceContextModule.SERVER_DELETED_PREDICATE;
@@ -55,7 +55,7 @@
public class BaseDimensionDataCloudControlApiLiveTest extends BaseApiLiveTest<DimensionDataCloudControlApi> {

protected ApiContext<DimensionDataCloudControlApi> ctx;
private final Set<Module> modules = ImmutableSet.<Module>of(new ExecutorServiceModule(sameThreadExecutor()));
private final Set<Module> modules = ImmutableSet.<Module>of(new ExecutorServiceModule(newDirectExecutorService()));
protected Set<String> datacenters;

protected static final String PREPARED_CUSTOMER_IMAGE_ID = "fb438e00-10f8-47ac-a434-f3f9461c3a76";

0 comments on commit 1b5dd9f

Please sign in to comment.