Skip to content

Commit

Permalink
Merge pull request redpanda-data#23586 from michael-redpanda/fix-debu…
Browse files Browse the repository at this point in the history
…g-bundle-tests

dt/debug-bundle: Fixed tests
  • Loading branch information
piyushredpanda authored Oct 2, 2024
2 parents 7fb7d36 + d4e65b8 commit 7f63b74
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/rptest/tests/debug_bundle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@


class DebugBundleTest(RedpandaTest):
debug_bundle_dir_config = "debug_bundle_storage_dir"
"""
Smoke test for debug bundle admin API
"""
Expand Down Expand Up @@ -106,13 +107,16 @@ def test_post_debug_bundle(self, ignore_none: bool):
res = admin.get_debug_bundle_file(filename=filename, node=node)
assert res.status_code == requests.codes.ok, res.json()
assert res.headers['Content-Type'] == 'application/zip', res.json()
data_dir = None
try:
data_dir = admin.get_cluster_config(node=node,
key="debug_bundle_storage_dir")
data_dir = admin.get_cluster_config(
node=node,
key=self.debug_bundle_dir_config)[self.debug_bundle_dir_config]
except requests.HTTPError as e:
data_dir = admin.get_node_config(
node=node
)['data_directory']['data_directory'] + "/debug-bundle"
pass

data_dir = data_dir or admin.get_node_config(
node=node)['data_directory']['data_directory'] + "/debug-bundle"

file = f"{data_dir}/{filename}"
assert self._get_sha256sum(node, file) == hashlib.sha256(
Expand Down

0 comments on commit 7f63b74

Please sign in to comment.