Merge branch '3.1.x'

This commit is contained in:
Ryan Baxter
2022-05-19 09:31:19 -04:00
2 changed files with 2 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ public class SpringVaultEnvironmentRepository extends AbstractVaultEnvironmentRe
super(request, watch, properties);
this.keyValueTemplate = keyValueTemplate;
if (properties.getKvVersion() == 2 && StringUtils.hasText(properties.getPathToKey())) {
path = "data/" + properties.getPathToKey() + "/";
path = properties.getPathToKey() + "/";
}
this.objectMapper = new ObjectMapper();
}

View File

@@ -64,7 +64,7 @@ public class SpringVaultEnvironmentRepositoryTests {
private void defaultKeyTest(String myPathKey, int version) {
String path = "";
if (StringUtils.hasText(myPathKey) && version == 2) {
path = "data/" + myPathKey + "/";
path = myPathKey + "/";
}
VaultKeyValueOperations keyValueTemplate = mock(VaultKeyValueOperations.class);
when(keyValueTemplate.get(path + "myapp")).thenReturn(withVaultResponse("foo", "bar"));