> + static GlacierClient getGlacierClient() {
> + return ContextBuilder.newBuilder("glacier").credentials("ADDME",
> "ADDME").buildApi(GlacierClient.class);
> + }
> +
> + @Test(groups = { "integration", "live" })
> + public void testDeleteVaultIfEmptyOrNotFound() throws Exception {
> + assertTrue(getGlacierClient().deleteVaultIfEmpty("testDeleteVault"));
> + }
> +
> + @Test(groups = { "integration", "live" })
> + public void testCreateVault() throws Exception {
> + GlacierClient client = getGlacierClient();
> + String path = client.createVault("testCreateVault").toString();
> + assertTrue(path.contains("https://glacier.us-east-1.amazonaws.com/"));
> + assertTrue(path.contains("/vaults/testCreateVault"));
> + client.deleteVaultIfEmpty("testCreateVault");
Enclose the delete in a `finally` block to make sure it is always deleted.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/4/files#r12843891