Files
scylladb/test/rest_api/test_system.py
Jakub Smolar 7cdd979158 db/config: announce ms format as highest supported
Uncomment the feature flag check in get_highest_supported_format()
to return MS format when supported, otherwise fall back to ME.
2026-03-09 17:12:09 +01:00

40 lines
1.3 KiB
Python

# Copyright 2021-present ScyllaDB
#
# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
import pytest
import requests
def test_system_uptime_ms(rest_api):
resp = rest_api.send('GET', "system/uptime_ms")
resp.raise_for_status()
def test_system_highest_sstable_format(rest_api):
resp = rest_api.send('GET', "system/highest_supported_sstable_version")
resp.raise_for_status()
assert resp.json() == "ms"
def test_chosen_sstable_format(rest_api):
resp = rest_api.send('GET', "system/chosen_sstable_version")
resp.raise_for_status()
assert resp.json() == "ms"
@pytest.mark.parametrize("params", [
("storage_service/compaction_throughput", "value"),
("storage_service/stream_throughput", "value")
])
def test_io_throughput(rest_api, params):
resp = rest_api.send("POST", params[0], params={ params[1]: 100 })
resp.raise_for_status()
resp = rest_api.send("GET", params[0])
resp.raise_for_status()
assert resp.json() == 100
resp = rest_api.send("POST", params[0], params={ params[1]: 0 })
resp.raise_for_status()
resp = rest_api.send("GET", params[0])
resp.raise_for_status()
assert resp.json() == 0
resp = rest_api.send("POST", params[0])
assert resp.status_code == requests.codes.bad_request