mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 18:40:38 +00:00
So callers have access to stderr, return code and more. This causes some churn in the test, but the changes are mechanical.
28 lines
905 B
Python
28 lines
905 B
Python
#
|
|
# Copyright 2023-present ScyllaDB
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
#
|
|
|
|
from rest_api_mock import expected_request
|
|
|
|
|
|
def test_disablebackup(nodetool):
|
|
nodetool("disablebackup", expected_requests=[
|
|
expected_request("POST", "/storage_service/incremental_backups", params={"value": "false"})])
|
|
|
|
|
|
def test_enablebackup(nodetool):
|
|
nodetool("enablebackup", expected_requests=[
|
|
expected_request("POST", "/storage_service/incremental_backups", params={"value": "true"})])
|
|
|
|
|
|
def test_statusbackup(nodetool):
|
|
res = nodetool("statusbackup", expected_requests=[
|
|
expected_request("GET", "/storage_service/incremental_backups", response=False)])
|
|
assert res.stdout == "not running\n"
|
|
|
|
res = nodetool("statusbackup", expected_requests=[
|
|
expected_request("GET", "/storage_service/incremental_backups", response=True)])
|
|
assert res.stdout == "running\n"
|