Skip to content

Commit

Permalink
test: fix rpk tuner list test in GCP
Browse files Browse the repository at this point in the history
The CDT_CLOUD_PROVIDER variable is no longer
present in the image so we must get the cloud
provider using another method.

(cherry picked from commit ee2a316)
  • Loading branch information
r-vasquez authored and vbotbuildovich committed Jan 30, 2024
1 parent 807eedb commit 4621cc6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/rptest/tests/rpk_tuner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ def test_tune_list(self):
# either x86-64 or i386.
is_not_x86 = "86" not in uname

r = str(node.account.ssh_output("dmidecode -s system-product-name"))
isGCP = "Google Compute Engine" in r

# Clocksource is only available for x86 architectures.
expected = expected.replace(
"clocksource true true ",
Expand All @@ -98,10 +101,11 @@ def test_tune_list(self):

expected = expected.replace(
"disk_write_cache true false Disk write cache tuner is only supported in GCP",
"disk_write_cache true true ") if os.environ.get(
'CDT_CLOUD_PROVIDER', None) == 'gcp' else expected
"disk_write_cache true true "
) if isGCP else expected

output = rpk.tune("list")
self.logger.debug(output)
if output != expected:
self.logger.debug(f"expected:\n{expected}\ngot:\n{output}")

assert output == expected

0 comments on commit 4621cc6

Please sign in to comment.