Revert Travis test to Vault 0.7,3

Partially reverts e9663ef (commented out), because fixes should be released before 0.8 compatibility is finally required.
This commit is contained in:
Stefan Kalscheuer 2017-08-02 17:40:30 +02:00
parent 42094101a3
commit 63dc329857
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/vault_0.8.0-beta1/vault_0.8.0-beta1_linux_amd64.zip - wget https://releases.hashicorp.com/vault/0.7.3/vault_0.7.3_linux_amd64.zip
- unzip vault_0.8.0-beta1_linux_amd64.zip - unzip vault_0.7.3_linux_amd64.zip
- rm vault_0.8.0-beta1_linux_amd64.zip - rm vault_0.7.3_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())));
} // }
} }
/** /**