Skip to content

Commit

Permalink
tests: add rpk tune list ducktape test
Browse files Browse the repository at this point in the history
This golden test will allow us to catch when a
new tuner is either added or removed from
production mode
  • Loading branch information
r-vasquez committed Jul 8, 2022
1 parent 7f1ce30 commit 4fdce91
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tests/rptest/tests/rpk_tuner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,37 @@ def test_tune_transparent_hugepages(self):
rpk.config_set('rpk.tune_transparent_hugepages', 'true')

rpk.tune("transparent_hugepages")

@cluster(num_nodes=1)
def test_tune_list(self):
"""
Forward compatible test, the purpose is to check if available
tuners match our current setup, if a new tuner gets added we
will catch it here.
"""
node = self.redpanda.nodes[0]
rpk = RpkRemoteTool(self.redpanda, node)
# Set all tuners:
rpk.mode_set("prod")
rpk.config_set('rpk.tune_fstrim', 'true')
rpk.config_set('rpk.tune_transparent_hugepages', 'true')
rpk.config_set('rpk.tune_coredump', 'true')

expected = '''TUNER ENABLED SUPPORTED UNSUPPORTED-REASON
aio_events true true
ballast_file true true
clocksource true true
coredump true true
cpu true true
disk_irq true true
disk_nomerges true true
disk_scheduler true true
disk_write_cache true false Disk write cache tuner is only supported in GCP
fstrim true true
net true true
swappiness true true
transparent_hugepages true true
'''
output = rpk.tune("list")

assert output == expected

0 comments on commit 4fdce91

Please sign in to comment.