client = view.getComputeService();
}
@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();
}
}