2828
2929import static junit .framework .TestCase .assertEquals ;
3030import 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 */
3536public 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