Skip to content

Commit

Permalink
tests: ignore num_brokers for RedpandaServiceCloudv2
Browse files Browse the repository at this point in the history
because cloudv2 will provision what it needs
  • Loading branch information
andrewhsu committed May 23, 2023
1 parent 2e8be1c commit 2db8930
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions tests/rptest/services/redpanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from ducktape.utils.local_filesystem_utils import mkdir_p
from ducktape.utils.util import wait_until
from ducktape.cluster.cluster import ClusterNode
from ducktape.cluster.cluster_spec import ClusterSpec
from prometheus_client.parser import text_string_to_metric_families
from ducktape.errors import TimeoutError
from ducktape.tests.test import TestContext
Expand Down Expand Up @@ -759,13 +760,15 @@ def __init__(self,
context,
num_brokers,
*,
cluster_spec=None,
extra_rp_conf=None,
resource_settings: Optional[ResourceSettings] = None,
si_settings: Optional[SISettings] = None,
superuser: Optional[SaslCredentials] = None,
disable_cloud_storage_diagnostics=True):
super(RedpandaServiceBase, self).__init__(context,
num_nodes=num_brokers)
num_nodes=num_brokers,
cluster_spec=cluster_spec)
self._context = context
self._extra_rp_conf = extra_rp_conf or dict()

Expand Down Expand Up @@ -1045,8 +1048,10 @@ def validate_controller_log(self):


class RedpandaServiceK8s(RedpandaServiceBase):
def __init__(self, context, num_brokers):
super(RedpandaServiceK8s, self).__init__(context, num_brokers)
def __init__(self, context, num_brokers, cluster_spec=None):
super(RedpandaServiceK8s, self).__init__(context,
num_brokers,
cluster_spec=cluster_spec)
self._trim_logs = False
self._helm = HelmTool(self)
self._kubectl = KubectlTool(self)
Expand Down Expand Up @@ -1135,7 +1140,11 @@ class RedpandaServiceCloudv2(RedpandaServiceK8s):
GLOBAL_TELEPORT_TARGET = 'teleport_target'

def __init__(self, context, num_brokers):
super(RedpandaServiceCloudv2, self).__init__(context, num_brokers)
super(RedpandaServiceCloudv2,
self).__init__(context, None, cluster_spec=ClusterSpec.empty())
self.logger.info(
f'num_brokers is {num_brokers}, but setting to None for cloudv2')

self._trim_logs = False

self._cloudv2_cluster_name = f'rp-ducktape-{uuid.uuid1()}'
Expand All @@ -1151,7 +1160,8 @@ def __init__(self, context, num_brokers):
self._cloudv2_cluster_id = context.globals.get(
self.GLOBAL_CLOUDV2_CLUSTER_ID, None)
if self._cloudv2_cluster_id is not None:
self.logger.debug(f'using existing cluster_id: {self._cloudv2_cluster_id}')
self.logger.debug(
f'using existing cluster_id: {self._cloudv2_cluster_id}')

target = context.globals.get(self.GLOBAL_TELEPORT_TARGET, None)
self._kubectl = KubectlTool(self,
Expand Down

0 comments on commit 2db8930

Please sign in to comment.