Test against Vault 0.8.0-rc1

This commit is contained in:
Stefan Kalscheuer 2017-08-04 08:46:33 +02:00
parent ce90f9fba2
commit 934628f382
2 changed files with 21 additions and 21 deletions

View File

@ -8,6 +8,6 @@ dist: trusty
env: env:
- PATH=$PATH:. - PATH=$PATH:.
before_script: before_script:
- wget https://releases.hashicorp.com/vault/0.7.3/vault_0.7.3_linux_amd64.zip - wget https://releases.hashicorp.com/vault/0.8.0-rc1/vault_0.8.0-rc1_linux_amd64.zip
- unzip vault_0.7.3_linux_amd64.zip - unzip vault_0.8.0-rc1_linux_amd64.zip
- rm vault_0.7.3_linux_amd64.zip - rm vault_0.8.0-rc1_linux_amd64.zip

View File

@ -697,24 +697,24 @@ public class HTTPVaultConnectorTest {
} }
/* Overwrite token should fail as of Vault 0.8.0 */ /* Overwrite token should fail as of Vault 0.8.0 */
// token = new TokenBuilder() token = new TokenBuilder()
// .withId("test-id2") .withId("test-id2")
// .withDisplayName("test name 3") .withDisplayName("test name 3")
// .withPolicies(Arrays.asList("pol1", "pol2")) .withPolicies(Arrays.asList("pol1", "pol2"))
// .withDefaultPolicy() .withDefaultPolicy()
// .withMeta("test", "success") .withMeta("test", "success")
// .withMeta("key", "value") .withMeta("key", "value")
// .withTtl(1234) .withTtl(1234)
// .build(); .build();
// try { try {
// connector.createToken(token); connector.createToken(token);
// fail("Overwriting token should fail as of Vault 0.8.0"); fail("Overwriting token should fail as of Vault 0.8.0");
// } catch (VaultConnectorException e) { } catch (VaultConnectorException e) {
// assertThat(e, is(instanceOf(InvalidResponseException.class))); assertThat(e, is(instanceOf(InvalidResponseException.class)));
// assertThat(((InvalidResponseException)e).getStatusCode(), is(400)); assertThat(((InvalidResponseException)e).getStatusCode(), is(400));
// /* Assert that the exception does not reveal token ID */ /* Assert that the exception does not reveal token ID */
// assertThat(stackTrace(e), not(stringContainsInOrder(token.getId()))); assertThat(stackTrace(e), not(stringContainsInOrder(token.getId())));
// } }
} }
/** /**