Skip to content

Commit

Permalink
Merge pull request #13986 from mmaslankaprv/fix-assertion
Browse files Browse the repository at this point in the history
tests/redpanda: fixed assertion message accessing not existing field
  • Loading branch information
mmaslankaprv authored Oct 6, 2023
2 parents d93d11b + f01df8e commit 6780d6c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/rptest/services/redpanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ def lsof_node(self, node: ClusterNode, filter: Optional[str] = None):
def metrics(self,
node,
metrics_endpoint: MetricsEndpoint = MetricsEndpoint.METRICS):
assert node in self._started, f"where node is {node.name}"
assert node in self._started, f"Node {node.account.hostname} is not started"

metrics_endpoint = ("/metrics" if metrics_endpoint
== MetricsEndpoint.METRICS else "/public_metrics")
Expand Down Expand Up @@ -1686,7 +1686,7 @@ def unset_environment(self, keys: list):
pass

def set_extra_node_conf(self, node, conf):
assert node in self.nodes, f"where node is {node.name}"
assert node in self.nodes, f"Node {node.account.hostname} is not started"
self._extra_node_conf[node] = conf

def set_security_settings(self, settings):
Expand Down Expand Up @@ -2480,7 +2480,7 @@ def is_awaited_state():
wait_until(is_awaited_state, timeout_sec=timeout_sec, backoff_sec=1)

def monitor_log(self, node):
assert node in self.nodes, f"where node is {node.name}"
assert node in self.nodes, f"Node {node.account.hostname} is not started"
return node.account.monitor_log(RedpandaService.STDOUT_STDERR_CAPTURE)

def raise_on_crash(self,
Expand Down Expand Up @@ -3384,7 +3384,7 @@ def data_dir_usage(self, subdir: str, node: ClusterNode):
return int(node.account.ssh_output(shlex.join(cmd), timeout_sec=10))

def broker_address(self, node, listener: str = "dnslistener"):
assert node in self.nodes, f"where node is {node.name}"
assert node in self.nodes, f"Node {node.account.hostname} is not started"
assert node in self._started
cfg = self._node_configs[node]
if cfg['redpanda']['kafka_api']:
Expand All @@ -3399,7 +3399,7 @@ def broker_address(self, node, listener: str = "dnslistener"):
return None

def admin_endpoint(self, node):
assert node in self.nodes, f"where node is {node.name}"
assert node in self.nodes, f"Node {node.account.hostname} is not started"
return f"{node.account.hostname}:9644"

def admin_endpoints_list(self):
Expand Down

0 comments on commit 6780d6c

Please sign in to comment.