From b36d586d80d9b31d4edb1bf434ab13f0608623de Mon Sep 17 00:00:00 2001 From: Artsiom Mishuta Date: Wed, 12 Feb 2025 11:34:07 +0100 Subject: [PATCH] test.py: move mv tests into a separate folder Now that we support suite subfolders, As an example, this commit move mv tests into a separate folder custom test.py lookup also works. tests can be run as: 1. ./tools/toolchain/dbuild ./test.py --no-gather-metrics --mode=dev topology_custom/mv/tablets/test_mv_tablets_empty_ip 2. ./tools/toolchain/dbuild ./test.py --no-gather-metrics --mode=dev topology_custom/mv/tablets 3. ./tools/toolchain/dbuild ./test.py --no-gather-metrics --mode=dev topology_custom/mv --- test/topology_custom/mv/__init__.py | 5 +++++ test/topology_custom/mv/tablets/__init__.py | 5 +++++ test/topology_custom/{ => mv/tablets}/test_mv_tablets.py | 2 +- .../{ => mv/tablets}/test_mv_tablets_empty_ip.py | 0 .../{ => mv/tablets}/test_mv_tablets_replace.py | 2 +- test/topology_custom/{ => mv}/test_mv_admission_control.py | 2 +- test/topology_custom/{ => mv}/test_mv_backlog.py | 2 +- test/topology_custom/{ => mv}/test_mv_building.py | 0 test/topology_custom/{ => mv}/test_mv_delete_partitions.py | 0 test/topology_custom/{ => mv}/test_mv_fail_building.py | 0 test/topology_custom/{ => mv}/test_mv_read_concurrency.py | 0 test/topology_custom/{ => mv}/test_mv_topology_change.py | 0 12 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 test/topology_custom/mv/__init__.py create mode 100644 test/topology_custom/mv/tablets/__init__.py rename test/topology_custom/{ => mv/tablets}/test_mv_tablets.py (99%) rename test/topology_custom/{ => mv/tablets}/test_mv_tablets_empty_ip.py (100%) rename test/topology_custom/{ => mv/tablets}/test_mv_tablets_replace.py (98%) rename test/topology_custom/{ => mv}/test_mv_admission_control.py (98%) rename test/topology_custom/{ => mv}/test_mv_backlog.py (99%) rename test/topology_custom/{ => mv}/test_mv_building.py (100%) rename test/topology_custom/{ => mv}/test_mv_delete_partitions.py (100%) rename test/topology_custom/{ => mv}/test_mv_fail_building.py (100%) rename test/topology_custom/{ => mv}/test_mv_read_concurrency.py (100%) rename test/topology_custom/{ => mv}/test_mv_topology_change.py (100%) diff --git a/test/topology_custom/mv/__init__.py b/test/topology_custom/mv/__init__.py new file mode 100644 index 0000000000..eb26f97aca --- /dev/null +++ b/test/topology_custom/mv/__init__.py @@ -0,0 +1,5 @@ +# +# Copyright (C) 2025-present ScyllaDB +# +# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0 +# diff --git a/test/topology_custom/mv/tablets/__init__.py b/test/topology_custom/mv/tablets/__init__.py new file mode 100644 index 0000000000..eb26f97aca --- /dev/null +++ b/test/topology_custom/mv/tablets/__init__.py @@ -0,0 +1,5 @@ +# +# Copyright (C) 2025-present ScyllaDB +# +# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0 +# diff --git a/test/topology_custom/test_mv_tablets.py b/test/topology_custom/mv/tablets/test_mv_tablets.py similarity index 99% rename from test/topology_custom/test_mv_tablets.py rename to test/topology_custom/mv/tablets/test_mv_tablets.py index 985f59c466..beff3eabcb 100644 --- a/test/topology_custom/test_mv_tablets.py +++ b/test/topology_custom/mv/tablets/test_mv_tablets.py @@ -12,7 +12,7 @@ from test.pylib.util import wait_for_cql_and_get_hosts from test.pylib.internal_types import ServerInfo from test.topology.conftest import skip_mode -from .test_alternator import get_alternator, alternator_config, full_query +from test.topology_custom.test_alternator import get_alternator, alternator_config, full_query import pytest import asyncio diff --git a/test/topology_custom/test_mv_tablets_empty_ip.py b/test/topology_custom/mv/tablets/test_mv_tablets_empty_ip.py similarity index 100% rename from test/topology_custom/test_mv_tablets_empty_ip.py rename to test/topology_custom/mv/tablets/test_mv_tablets_empty_ip.py diff --git a/test/topology_custom/test_mv_tablets_replace.py b/test/topology_custom/mv/tablets/test_mv_tablets_replace.py similarity index 98% rename from test/topology_custom/test_mv_tablets_replace.py rename to test/topology_custom/mv/tablets/test_mv_tablets_replace.py index a29e5e5657..8756491cb6 100644 --- a/test/topology_custom/test_mv_tablets_replace.py +++ b/test/topology_custom/mv/tablets/test_mv_tablets_replace.py @@ -18,7 +18,7 @@ import logging from test.topology.conftest import skip_mode from test.topology.util import get_topology_coordinator, find_server_by_host_id -from test.topology_custom.test_mv_tablets import get_tablet_replicas +from test.topology_custom.mv.tablets.test_mv_tablets import get_tablet_replicas logger = logging.getLogger(__name__) diff --git a/test/topology_custom/test_mv_admission_control.py b/test/topology_custom/mv/test_mv_admission_control.py similarity index 98% rename from test/topology_custom/test_mv_admission_control.py rename to test/topology_custom/mv/test_mv_admission_control.py index af569fbf28..c1151e68ad 100644 --- a/test/topology_custom/test_mv_admission_control.py +++ b/test/topology_custom/mv/test_mv_admission_control.py @@ -12,7 +12,7 @@ import logging from test.topology.conftest import skip_mode from test.pylib.util import wait_for_view -from test.topology_custom.test_mv_tablets import pin_the_only_tablet, get_tablet_replicas +from test.topology_custom.mv.tablets.test_mv_tablets import pin_the_only_tablet, get_tablet_replicas from cassandra.cluster import ConsistencyLevel, EXEC_PROFILE_DEFAULT # type: ignore from cassandra.cqltypes import Int32Type # type: ignore diff --git a/test/topology_custom/test_mv_backlog.py b/test/topology_custom/mv/test_mv_backlog.py similarity index 99% rename from test/topology_custom/test_mv_backlog.py rename to test/topology_custom/mv/test_mv_backlog.py index 13339f1d76..afc0236c58 100644 --- a/test/topology_custom/test_mv_backlog.py +++ b/test/topology_custom/mv/test_mv_backlog.py @@ -11,7 +11,7 @@ import asyncio import pytest from test.topology.conftest import skip_mode from test.pylib.util import wait_for_view, wait_for -from test.topology_custom.test_mv_tablets import pin_the_only_tablet +from test.topology_custom.mv.tablets.test_mv_tablets import pin_the_only_tablet from test.pylib.tablets import get_tablet_replica logger = logging.getLogger(__name__) diff --git a/test/topology_custom/test_mv_building.py b/test/topology_custom/mv/test_mv_building.py similarity index 100% rename from test/topology_custom/test_mv_building.py rename to test/topology_custom/mv/test_mv_building.py diff --git a/test/topology_custom/test_mv_delete_partitions.py b/test/topology_custom/mv/test_mv_delete_partitions.py similarity index 100% rename from test/topology_custom/test_mv_delete_partitions.py rename to test/topology_custom/mv/test_mv_delete_partitions.py diff --git a/test/topology_custom/test_mv_fail_building.py b/test/topology_custom/mv/test_mv_fail_building.py similarity index 100% rename from test/topology_custom/test_mv_fail_building.py rename to test/topology_custom/mv/test_mv_fail_building.py diff --git a/test/topology_custom/test_mv_read_concurrency.py b/test/topology_custom/mv/test_mv_read_concurrency.py similarity index 100% rename from test/topology_custom/test_mv_read_concurrency.py rename to test/topology_custom/mv/test_mv_read_concurrency.py diff --git a/test/topology_custom/test_mv_topology_change.py b/test/topology_custom/mv/test_mv_topology_change.py similarity index 100% rename from test/topology_custom/test_mv_topology_change.py rename to test/topology_custom/mv/test_mv_topology_change.py