0fcb1e
From d24b69981d94fce7b1e1aa4a5c1ab88a123f96b5 Mon Sep 17 00:00:00 2001
0fcb1e
From: Rob Crittenden <rcritten@redhat.com>
0fcb1e
Date: Fri, 3 Feb 2023 10:04:31 -0500
0fcb1e
Subject: [PATCH] tests: add wrapper around ACME RSNv3 test
0fcb1e
0fcb1e
This test is located outside of the TestACMEPrune because
0fcb1e
it enables RSNv3 while the server installed by TestACME doesn't.
0fcb1e
0fcb1e
It still needs a wrapper to enforce a version of PKI that
0fcb1e
supports pruning because that is checked first in the tool.
0fcb1e
Re-ordering that wouldn't be a good user experience.
0fcb1e
0fcb1e
https://pagure.io/freeipa/issue/9322
0fcb1e
0fcb1e
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
0fcb1e
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
0fcb1e
---
0fcb1e
 ipatests/test_integration/test_acme.py | 9 ++++++++-
0fcb1e
 1 file changed, 8 insertions(+), 1 deletion(-)
0fcb1e
0fcb1e
diff --git a/ipatests/test_integration/test_acme.py b/ipatests/test_integration/test_acme.py
0fcb1e
index 93e785d8febd9fa8d7b3ef87ecb3f2eb42ac5da2..5ceba05976059de69414a79634d98045c3ab68bb 100644
0fcb1e
--- a/ipatests/test_integration/test_acme.py
0fcb1e
+++ b/ipatests/test_integration/test_acme.py
0fcb1e
@@ -393,7 +393,14 @@ class TestACME(CALessBase):
0fcb1e
 
0fcb1e
     def test_acme_pruning_no_random_serial(self):
0fcb1e
         """This ACME install is configured without random serial
0fcb1e
-           numbers. Verify that we can't enable pruning on it."""
0fcb1e
+           numbers. Verify that we can't enable pruning on it.
0fcb1e
+
0fcb1e
+           This test is located here because by default installs
0fcb1e
+           don't enable RSNv3.
0fcb1e
+        """
0fcb1e
+        if (tasks.get_pki_version(self.master)
0fcb1e
+           < tasks.parse_version('11.3.0')):
0fcb1e
+            raise pytest.skip("Certificate pruning is not available")
0fcb1e
         self.master.run_command(['ipa-acme-manage', 'enable'])
0fcb1e
         result = self.master.run_command(
0fcb1e
             ['ipa-acme-manage', 'pruning', '--enable'],
0fcb1e
-- 
0fcb1e
2.39.1
0fcb1e