Files
scylladb/test/nodetool/test_compaction_throughput.py
Pavel Emelyanov 67089fd5a1 nodetool: Implement [gs]etcompationthroughput commands
They exist in the original documentation, but are not yet implemented.
Now it's possible to do it.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2024-12-13 14:39:47 +03:00

20 lines
661 B
Python

#
# Copyright 2024-present ScyllaDB
#
# SPDX-License-Identifier: AGPL-3.0-or-later
#
from test.nodetool.rest_api_mock import expected_request
import pytest
def test_get_compaction_throughput(nodetool, scylla_only):
res = nodetool("getcompactionthroughput", expected_requests = [
expected_request("GET", "/storage_service/compaction_throughput", response=0)
])
assert res.stdout == '0\n'
def test_set_compaction_throughput(nodetool, scylla_only):
nodetool("setcompactionthroughput", "100", expected_requests = [
expected_request("POST", "/storage_service/compaction_throughput", params={"value": "100"})
])