Skip to content

Commit 41126c9

Browse files
committed
dt: simplify pkcs12 test
pkcs12 test doesn't need to test that topic creation works when pkcs12 is not active. This is being actively tested by every other test that implements a non-P12 TLSProvider
1 parent 06a6fcb commit 41126c9

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

tests/rptest/tests/pkcs12_test.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import socket
1111

1212
from ducktape.cluster.cluster import ClusterNode
13-
from ducktape.mark import matrix
1413
from ducktape.services.service import Service
1514
from rptest.utils.mode_checks import skip_fips_mode
1615
from rptest.clients.rpk import RpkTool
@@ -22,9 +21,8 @@
2221

2322

2423
class P12TLSProvider(TLSProvider):
25-
def __init__(self, tls: TLSCertManager, use_pkcs12: bool):
24+
def __init__(self, tls: TLSCertManager):
2625
self.tls = tls
27-
self.use_pkcs12 = use_pkcs12
2826

2927
@property
3028
def ca(self) -> CertificateAuthority:
@@ -41,7 +39,7 @@ def create_service_client_cert(self, _: Service, name: str) -> Certificate:
4139
common_name=name)
4240

4341
def use_pkcs12_file(self) -> bool:
44-
return self.use_pkcs12
42+
return True
4543

4644
def p12_password(self, node: ClusterNode) -> str:
4745
assert node.name in self.tls.certs, f"No certificate associated with node {node.name}"
@@ -64,9 +62,9 @@ def setUp(self):
6462
# Skip set up to allow test to control how Redpanda's TLS settings are configured
6563
pass
6664

67-
def _prepare_cluster(self, use_pkcs12: bool):
65+
def _prepare_cluster(self):
6866
self.tls = TLSCertManager(self.logger)
69-
self.provider = P12TLSProvider(self.tls, use_pkcs12)
67+
self.provider = P12TLSProvider(self.tls)
7068
self.user_cert = self.tls.create_cert(socket.gethostname(),
7169
common_name="walterP",
7270
name="user")
@@ -94,12 +92,11 @@ def _prepare_cluster(self, use_pkcs12: bool):
9492
# https://www.redhat.com/en/blog/fips-140-3-changes-pkcs-12
9593
@skip_fips_mode
9694
@cluster(num_nodes=3)
97-
@matrix(use_pkcs12=[True, False])
98-
def test_smoke(self, use_pkcs12: bool):
95+
def test_smoke(self):
9996
"""
10097
Simple smoke test to verify that the PKCS12 file is being used
10198
"""
102-
self._prepare_cluster(use_pkcs12)
99+
self._prepare_cluster()
103100
TOPIC_NAME = "foo"
104101
self.rpk.create_topic(TOPIC_NAME)
105102
topics = [t for t in self.rpk.list_topics()]

0 commit comments

Comments
 (0)