Skip to content

Commit d2524f9

Browse files
committed
Fixed tests
1 parent 0878a11 commit d2524f9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/test/java/io/github/jopenlibs/vault/api/AuthBackendPkiIT.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828

2929
import static junit.framework.TestCase.assertEquals;
3030
import static junit.framework.TestCase.assertTrue;
31+
import static org.junit.Assume.assumeTrue;
3132

3233
/**
33-
* Integration tests for for operations on Vault's <code>/v1/pki/*</code> REST endpoints.
34+
* Integration tests for operations on Vault's <code>/v1/pki/*</code> REST endpoints.
3435
*/
3536
public class AuthBackendPkiIT {
3637

@@ -178,6 +179,9 @@ void issueCredentialWithCsrTemplate(BiFunction<Pki, String, PkiResponse> pkiResp
178179
public void testIssueCredentialWithCsr()
179180
throws VaultException, InterruptedException, NoSuchAlgorithmException {
180181

182+
// Test not work in Vault versions less than 1.11.0
183+
assumeTrue(VaultVersion.greatThan("1.11.0"));
184+
181185
issueCredentialWithCsrTemplate((pki, csr) -> {
182186
try {
183187
return pki.issue("testRole", "test.myvault.com", null, null, "1h", CredentialFormat.PEM, csr);
@@ -192,6 +196,9 @@ public void testIssueCredentialWithCsr()
192196
public void testIssueCredentialWithCsrAndPrivateKeyFormat()
193197
throws VaultException, InterruptedException, NoSuchAlgorithmException {
194198

199+
// Test not works in Vault versions less than 1.11.0
200+
assumeTrue(VaultVersion.greatThan("1.11.0"));
201+
195202
issueCredentialWithCsrTemplate((pki, csr) -> {
196203
try {
197204
return pki.issue("testRole", "test.myvault.com", null, null, "1h", CredentialFormat.PEM, csr, PrivateKeyFormat.PKCS8);

0 commit comments

Comments
 (0)