@Override protected Properties setupProperties() { Properties properties = super.setupProperties(); properties.setProperty("jclouds.ssh.max-retries", "20"); return properties; } }
@Override protected Properties setupProperties() { Properties props = super.setupProperties(); setIfTestSystemPropertyPresent(props, KeystoneProperties.CREDENTIAL_TYPE); setIfTestSystemPropertyPresent(props, NovaProperties.AUTO_ALLOCATE_FLOATING_IPS); return props; } }
@Override protected Properties setupProperties() { Properties overrides = super.setupProperties(); String ebsSpec = setIfTestSystemPropertyPresent(overrides, provider + ".ebs-template"); if (ebsSpec != null) ebsTemplate = TemplateBuilderSpec.parse(ebsSpec); return overrides; }
@Override protected Properties setupProperties() { Properties properties = super.setupProperties(); AzureLiveTestUtils.defaultProperties(properties); setIfTestSystemPropertyPresent(properties, "oauth.endpoint"); return properties; }
@Override protected Properties setupProperties() { Properties props = super.setupProperties(); setIfTestSystemPropertyPresent(props, KeystoneProperties.CREDENTIAL_TYPE); setIfTestSystemPropertyPresent(props, NovaProperties.AUTO_ALLOCATE_FLOATING_IPS); return props; } }
@Override protected Properties setupProperties() { Properties props = super.setupProperties(); setIfTestSystemPropertyPresent(props, KeystoneProperties.CREDENTIAL_TYPE); setIfTestSystemPropertyPresent(props, NovaProperties.AUTO_ALLOCATE_FLOATING_IPS); return props; } }
@Override protected Properties setupProperties() { Properties overrides = super.setupProperties(); String ebsSpec = setIfTestSystemPropertyPresent(overrides, provider + ".ebs-template"); if (ebsSpec != null) ebsTemplate = TemplateBuilderSpec.parse(ebsSpec); return overrides; }
@Override protected Properties setupProperties() { TestProperties.setGoogleCredentialsFromJson(provider); return TestProperties.apply(provider, super.setupProperties()); }
@Test(enabled = true, expectedExceptions = AuthorizationException.class) public void testCorrectAuthException() throws Exception { ComputeServiceContext context = null; try { Properties overrides = setupProperties(); overrides.setProperty(provider + ".identity", "MOMMA"); overrides.setProperty(provider + ".credential", "MIA"); context = newBuilder() .modules(ImmutableSet.of(getLoggingModule(), credentialStoreModule)) .overrides(overrides).build(ComputeServiceContext.class); context.getComputeService().listNodes(); } catch (AuthorizationException e) { throw e; } catch (RuntimeException e) { e.printStackTrace(); throw e; } finally { if (context != null) context.close(); } }
@Test(enabled = true, expectedExceptions = AuthorizationException.class) public void testCorrectAuthException() throws Exception { ComputeServiceContext context = null; try { Properties overrides = setupProperties(); overrides.setProperty(provider + ".identity", "MOM:MA"); overrides.setProperty(provider + ".credential", "MIA"); context = newBuilder() .modules(ImmutableSet.of(getLoggingModule(), credentialStoreModule)) .overrides(overrides).build(ComputeServiceContext.class); context.getComputeService().listNodes(); } catch (AuthorizationException e) { throw e; } catch (RuntimeException e) { e.printStackTrace(); throw e; } finally { if (context != null) context.close(); } }