Skip to content

Commit 36c73a4

Browse files
committed
Ignoring e2e tests for validate building and installing pipeline actions - second try + some test helpers improvements
1 parent 209fe7e commit 36c73a4

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

.github/workflows/install_and_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ cd ${TESTDIR}
4040
# install, run tests
4141
pip install ${PKG}
4242
# Redis tests
43-
pytest -m 'not onlycluster'
43+
pytest -m 'not onlycluster' --ignore=tests/test_scenario
4444
# RedisCluster tests
4545
CLUSTER_URL="redis://localhost:16379/0"
4646
CLUSTER_SSL_URL="rediss://localhost:27379/0"

tests/test_scenario/conftest.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
RELAX_TIMEOUT = 30
1515
CLIENT_TIMEOUT = 5
1616

17+
DEFAULT_ENDPOINT_NAME = "pslavova-tls" # "m-standard"
18+
1719

1820
@pytest.fixture()
1921
def endpoint_name(request):
2022
return request.config.getoption("--endpoint-name") or os.getenv(
21-
"REDIS_ENDPOINT_NAME", "m-standard"
23+
"REDIS_ENDPOINT_NAME", DEFAULT_ENDPOINT_NAME
2224
)
2325

2426

@@ -75,6 +77,8 @@ def _get_client_maint_events(
7577
host = parsed.hostname
7678
port = parsed.port
7779

80+
tls_enabled = True if parsed.scheme == "rediss" else False
81+
7882
if not host:
7983
raise ValueError(f"Could not parse host from endpoint URL: {endpoints[0]}")
8084

@@ -101,6 +105,9 @@ def _get_client_maint_events(
101105
socket_timeout=CLIENT_TIMEOUT if socket_timeout is None else socket_timeout,
102106
username=username,
103107
password=password,
108+
ssl=tls_enabled,
109+
ssl_cert_reqs="none",
110+
ssl_check_hostname=False,
104111
protocol=3, # RESP3 required for push notifications
105112
maintenance_events_config=maintenance_config,
106113
retry=retry,

tests/test_scenario/hitless_upgrade_helpers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ def find_target_node_and_empty_node(
220220
def find_endpoint_for_bind(
221221
fault_injector: FaultInjectorClient,
222222
endpoint_config: Dict[str, Any],
223+
endpoint_name: str,
223224
timeout: int = 60,
224225
) -> str:
225226
"""Find the endpoint ID from cluster status.
@@ -252,13 +253,13 @@ def find_endpoint_for_bind(
252253
elif endpoints_section_started and line and not line.startswith("DB:ID"):
253254
# Parse endpoint line: db:1 m-standard endpoint:1:1 node:2 single No
254255
parts = line.split()
255-
if len(parts) >= 3:
256+
if len(parts) >= 3 and parts[1] == endpoint_name:
256257
endpoint_full = parts[2] # endpoint:1:1
257258
if endpoint_full.startswith("endpoint:"):
258259
endpoint_id = endpoint_full.replace("endpoint:", "") # 1:1
259260
return endpoint_id
260261

261-
raise ValueError("No endpoint ID found in cluster status")
262+
raise ValueError(f"No endpoint ID for {endpoint_name} found in cluster status")
262263

263264
@staticmethod
264265
def execute_rladmin_migrate(

tests/test_scenario/test_hitless_upgrade.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def setup_and_cleanup(
4848
client_maint_events: Redis,
4949
fault_injector_client: FaultInjectorClient,
5050
endpoints_config: Dict[str, Any],
51+
endpoint_name: str,
5152
):
5253
# Initialize cleanup flags first to ensure they exist even if setup fails
5354
self._migration_executed = False
@@ -70,7 +71,7 @@ def setup_and_cleanup(
7071

7172
try:
7273
self.endpoint_id = ClusterOperations.find_endpoint_for_bind(
73-
fault_injector_client, endpoints_config
74+
fault_injector_client, endpoints_config, endpoint_name
7475
)
7576
logging.info(f"Using endpoint: {self.endpoint_id}")
7677
except Exception as e:

0 commit comments

Comments
 (0)