test: update comments referencing pytest.skip() to skip_env()
Update 7 comments/docstrings across 5 files that still referenced pytest.skip() to reference the typed skip_env() wrapper for consistency with the migrated code.
This commit is contained in:
@@ -88,7 +88,7 @@ def local_process_id(ip, port):
|
||||
|
||||
# A fixture to find the Scylla log file, returning the log file's path.
|
||||
# If the log file cannot be found, or it's not Scylla, the fixture calls
|
||||
# pytest.skip() to skip any test which uses it. The fixture has module
|
||||
# skip_env() to skip any test which uses it. The fixture has module
|
||||
# scope, so looking for the log file only happens once. Individual tests
|
||||
# should use the function-scope fixture "logfile" below, which takes care
|
||||
# of opening the log file for reading in the right place.
|
||||
|
||||
@@ -27,8 +27,8 @@ from test.pylib.skip_types import skip_env
|
||||
|
||||
# The "with_tracing" fixture ensures that tracing is enabled throughout
|
||||
# the run of a test function, and disabled when it ends. If tracing cannot be
|
||||
# enabled, the test is pytest.skip()ed. This will of course happens if we run
|
||||
# the test with "--aws" (tracing is a Scylla-only feature).
|
||||
# enabled, the test is skipped via skip_env(). This will of course happens
|
||||
# if we run the test with "--aws" (tracing is a Scylla-only feature).
|
||||
# Note that to support (in the future) the ability for Alternator tests to
|
||||
# run in parallel, the tests here need to be prepared that completely
|
||||
# unrelated requests get traced during a test with with_tracing.
|
||||
|
||||
@@ -204,7 +204,7 @@ def random_seed():
|
||||
# to the address and port to which our our CQL connection is connected.
|
||||
# If such a process exists, we verify that it is Scylla, and return the
|
||||
# executable's path. If we can't find the Scylla executable we use
|
||||
# pytest.skip() to skip tests relying on this executable.
|
||||
# skip_env() to skip tests relying on this executable.
|
||||
@pytest.fixture(scope=dynamic_scope())
|
||||
def scylla_path(cql):
|
||||
pid = local_process_id(cql)
|
||||
|
||||
@@ -14,7 +14,7 @@ from contextlib import contextmanager
|
||||
from test.pylib.skip_types import skip_env
|
||||
|
||||
# Sends GET request to REST API. Response is returned as JSON.
|
||||
# If API isn't available, `pytest.skip()` is called.
|
||||
# If API isn't available, `skip_env()` is called.
|
||||
def get_request(cql, *path):
|
||||
if nodetool.has_rest_api(cql):
|
||||
response = requests.get(f"{nodetool.rest_api_url(cql)}/{'/'.join(path)}")
|
||||
@@ -24,7 +24,7 @@ def get_request(cql, *path):
|
||||
|
||||
# Sends POST request to REST API. Response is returned as JSON or None
|
||||
# if the response body was empty (this is typical).
|
||||
# If API isn't available, `pytest.skip()` is called.
|
||||
# If API isn't available, `skip_env()` is called.
|
||||
def post_request(cql, *path):
|
||||
if nodetool.has_rest_api(cql):
|
||||
response = requests.post(f"{nodetool.rest_api_url(cql)}/{'/'.join(path)}")
|
||||
@@ -36,7 +36,7 @@ def post_request(cql, *path):
|
||||
|
||||
# Sends DELETE request to REST API. Response is returned as JSON or None
|
||||
# if the response body was empty (this is typical).
|
||||
# If API isn't available, `pytest.skip()` is called.
|
||||
# If API isn't available, `skip_env()` is called.
|
||||
def delete_request(cql, *path):
|
||||
if nodetool.has_rest_api(cql):
|
||||
response = requests.delete(f"{nodetool.rest_api_url(cql)}/{'/'.join(path)}")
|
||||
|
||||
@@ -38,7 +38,7 @@ from .test_batch import generate_big_batch
|
||||
|
||||
# A fixture to find the Scylla log file, returning the log file's path.
|
||||
# If the log file cannot be found, or it's not Scylla, the fixture calls
|
||||
# pytest.skip() to skip any test which uses it. The fixture has module
|
||||
# skip_env() to skip any test which uses it. The fixture has module
|
||||
# scope, so looking for the log file only happens once. Individual tests
|
||||
# should use the function-scope fixture "logfile" below, which takes care
|
||||
# of opening the log file for reading in the right place.
|
||||
|
||||
Reference in New Issue
Block a user