Skip to content

Commit

Permalink
Merge pull request #24435 from andrwng/deflake-config-prof-test
Browse files Browse the repository at this point in the history
[CORE-8081] rptest: fix config_profile_verify_test null handling
  • Loading branch information
andrwng authored Dec 5, 2024
2 parents 9e06676 + 3b80f02 commit d9b8df8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/rptest/redpanda_cloud_tests/config_profile_verify_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,15 @@ def _check_rp_config(self):
assert clusterConfig['cluster_id'] in (self._clusterId,
f'rp-{self._clusterId}')

for k, v in self._configProfile["cluster_config"].items():
for k, expected_v in self._configProfile["cluster_config"].items():
actual_v = clusterConfig[k]
self.logger.debug(
"asserting cluster config key {} has expected value: {} actual: {}"
.format(k, v, clusterConfig[k]))
if clusterConfig[k] != v and "{}".format(clusterConfig[k]) != v:
assert False
.format(k, expected_v, actual_v))
if expected_v == "null":
expected_v = None
if actual_v != expected_v and "{}".format(actual_v) != expected_v:
assert False, f"incorrect config value for key '{k}': {actual_v} != {expected_v}"

def _check_aws_nodes(self):
cmd = self.redpanda.kubectl._ssh_prefix() + [
Expand Down

0 comments on commit d9b8df8

Please sign in to comment.