model: use correct "replication_performance_mode" JSON field
All checks were successful
continuous-integration/drone/push Build is passing

The official docs incorrectly state "replication_perf_mode" which was
renamed to "replication_performance_mode" way back in Vault 0.9. We now
use the correct field name that is emitted by the API.
This commit is contained in:
Stefan Kalscheuer 2021-12-27 18:54:49 +01:00
parent dbb21f85bf
commit dc4b62496a
8 changed files with 21 additions and 12 deletions

View File

@ -25,12 +25,12 @@ steps:
- name: unit-integration-tests
image: maven:3-jdk-11
environment:
VAULT_VERSION: 1.9.0
VAULT_VERSION: 1.9.2
commands:
- curl -s -o vault_1.9.0_linux_amd64.zip https://releases.hashicorp.com/vault/1.9.0/vault_1.9.0_linux_amd64.zip
- curl -s https://releases.hashicorp.com/vault/1.9.0/vault_1.9.0_SHA256SUMS | grep linux_amd64 | sha256sum -c
- unzip vault_1.9.0_linux_amd64.zip
- rm vault_1.9.0_linux_amd64.zip
- curl -s -o vault_1.9.2_linux_amd64.zip https://releases.hashicorp.com/vault/1.9.2/vault_1.9.2_linux_amd64.zip
- curl -s https://releases.hashicorp.com/vault/1.9.2/vault_1.9.2_SHA256SUMS | grep linux_amd64 | sha256sum -c
- unzip vault_1.9.2_linux_amd64.zip
- rm vault_1.9.2_linux_amd64.zip
- mv vault /bin/
- mvn -B -P integration-test verify
when:

View File

@ -6,10 +6,10 @@ jobs:
strategy:
matrix:
jdk: [ 11, 17 ]
vault: [ '1.9.0' ]
vault: [ '1.9.2' ]
include:
- jdk: 11
vault: '1.9.0'
vault: '1.9.2'
analysis: true
steps:
- name: Checkout

View File

@ -1,3 +1,12 @@
## UNRELEASED
### Fix
* Use `replication_performance_mode` instead of `replication_perf_mode` in health response.
### Test
* Tested against Vault 1.9.2
## 1.0.1 (2021-11-21)
### Fix

View File

@ -32,7 +32,7 @@ Java Vault Connector is a connector library for [Vault](https://www.vaultproject
* SQL secret handling
* KV v1 and v2 support
* Connector Factory with builder pattern
* Tested against Vault 1.9.0
* Tested against Vault 1.9.2
## Maven Artifact

View File

@ -4,7 +4,7 @@
<groupId>de.stklcode.jvault</groupId>
<artifactId>jvault-connector</artifactId>
<version>1.0.1</version>
<version>1.0.2-SNAPSHOT</version>
<packaging>jar</packaging>

View File

@ -48,7 +48,7 @@ public final class HealthResponse implements VaultResponse {
@JsonProperty("initialized")
private Boolean initialized;
@JsonProperty("replication_perf_mode")
@JsonProperty("replication_performance_mode")
private String replicationPerfMode;
@JsonProperty("replication_dr_mode")

View File

@ -49,7 +49,7 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue;
* @since 0.1
*/
class HTTPVaultConnectorIT {
private static String VAULT_VERSION = "1.9.0"; // The vault version this test is supposed to run against.
private static String VAULT_VERSION = "1.9.2"; // The vault version this test is supposed to run against.
private static final String KEY1 = "E38bkCm0VhUvpdCKGQpcohhD9XmcHJ/2hreOSY019Lho";
private static final String KEY2 = "O5OHwDleY3IiPdgw61cgHlhsrEm6tVJkrxhF6QAnILd1";
private static final String KEY3 = "mw7Bm3nbt/UWa/juDjjL2EPQ04kiJ0saC5JEXwJvXYsB";

View File

@ -47,7 +47,7 @@ class HealthResponseTest {
" \"standby\": " + STANDBY + ",\n" +
" \"sealed\": " + SEALED + ",\n" +
" \"initialized\": " + INITIALIZED + ",\n" +
" \"replication_perf_mode\": \"" + REPL_PERF_MODE + "\",\n" +
" \"replication_performance_mode\": \"" + REPL_PERF_MODE + "\",\n" +
" \"replication_dr_mode\": \"" + REPL_DR_MODE + "\",\n" +
" \"performance_standby\": " + PERF_STANDBY + "\n" +
"}";