From c903f134aff74de12bc3d8d8e747455d1ff343f8 Mon Sep 17 00:00:00 2001 From: xavipg003 Date: Fri, 20 Nov 2026 05:47:58 -0500 Subject: [PATCH 1/5] Dependency and unused helpers/fixtures cleanup --- pyproject.toml | 5 +- tests/integration/charm/ha_tests/conftest.py | 168 -- tests/integration/charm/ha_tests/helpers.py | 1607 ----------------- .../charm/new_relations/helpers.py | 183 -- .../charm/pytest_operator_helpers.py | 385 ---- tests/integration/conftest.py | 28 +- tox.ini | 1 - uv.lock | 728 +------- 8 files changed, 31 insertions(+), 3074 deletions(-) delete mode 100644 tests/integration/charm/ha_tests/conftest.py delete mode 100644 tests/integration/charm/ha_tests/helpers.py delete mode 100644 tests/integration/charm/new_relations/helpers.py delete mode 100644 tests/integration/charm/pytest_operator_helpers.py diff --git a/pyproject.toml b/pyproject.toml index 752186c4..7750d88f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,13 +75,11 @@ lint = [ unit = [ "coverage[toml]==7.16.2", "pytest==9.1.1", - "pytest-asyncio==0.21.2", ] integration = [ "pytest==9.1.1", - "pytest-operator==0.43.2", - "juju==3.6.1.3", "jubilant==1.14.0", + "kubernetes==30.1.0", "allure-pytest==2.16.2", "allure-pytest-default-results==0.1.4", "tomli-w==1.2.0", @@ -104,7 +102,6 @@ show_missing = true [tool.pytest.ini_options] minversion = "6.0" log_cli_level = "INFO" -asyncio_mode = "auto" # Linting tools configuration [tool.ruff] diff --git a/tests/integration/charm/ha_tests/conftest.py b/tests/integration/charm/ha_tests/conftest.py deleted file mode 100644 index bdd2c3ad..00000000 --- a/tests/integration/charm/ha_tests/conftest.py +++ /dev/null @@ -1,168 +0,0 @@ -#!/usr/bin/env python3 -# Copyright 2022 Canonical Ltd. -# See LICENSE file for licensing details. -from asyncio import gather - -import pytest -from pytest_operator.plugin import OpsTest -from tenacity import Retrying, stop_after_delay, wait_fixed - -from tests.integration.charm.ha_tests.helpers import ( - ORIGINAL_RESTART_CONDITION, - RESTART_CONDITION, - change_patroni_setting, - change_wal_settings, - deploy_chaos_mesh, - destroy_chaos_mesh, - get_patroni_setting, - get_postgresql_parameter, - modify_pebble_restart_delay, - remove_instance_isolation, - update_restart_condition, -) -from tests.integration.charm.pytest_operator_helpers import ( - APPLICATION_NAME, - app_name, - get_password, - run_command_on_unit, -) -from tests.integration.types import Substrate - - -@pytest.fixture() -async def chaos_mesh(ops_test: OpsTest, substrate: Substrate, architecture: str) -> None: - """Deploys chaos mesh to the namespace and uninstalls it at the end (K8s amd64 only).""" - if substrate == Substrate.vm or architecture != "amd64": - yield - return - - deploy_chaos_mesh(ops_test.model.info.name) - - yield - - remove_instance_isolation(ops_test) - destroy_chaos_mesh(ops_test.model.info.name) - - -@pytest.fixture() -async def continuous_writes(ops_test: OpsTest) -> None: - """Deploy the charm that makes continuous writes to PostgreSQL.""" - yield - # Clear the written data at the end. - for attempt in Retrying(stop=stop_after_delay(60 * 5), wait=wait_fixed(3), reraise=True): - with attempt: - action = ( - await ops_test.model - .applications[APPLICATION_NAME] - .units[0] - .run_action("clear-continuous-writes") - ) - await action.wait() - assert action.results["result"] == "True", "Unable to clear up continuous_writes table" - - -@pytest.fixture() -async def loop_wait(ops_test: OpsTest) -> None: - """Temporary change the loop wait configuration.""" - # Change the parameter that makes Patroni wait for some more time before restarting PostgreSQL. - initial_loop_wait = await get_patroni_setting(ops_test, "loop_wait") - yield - # Rollback to the initial configuration. - patroni_password = await get_password(ops_test, "patroni") - await change_patroni_setting( - ops_test, "loop_wait", initial_loop_wait, patroni_password, use_random_unit=True - ) - - -@pytest.fixture(scope="module") -async def primary_start_timeout(ops_test: OpsTest) -> None: - """Temporary change the primary start timeout configuration.""" - # Change the parameter that makes the primary reelection faster. - patroni_password = await get_password(ops_test, "patroni") - initial_primary_start_timeout = await get_patroni_setting(ops_test, "primary_start_timeout") - await change_patroni_setting(ops_test, "primary_start_timeout", 0, patroni_password) - yield - # Rollback to the initial configuration. - await change_patroni_setting( - ops_test, - "primary_start_timeout", - initial_primary_start_timeout, - patroni_password, - use_random_unit=True, - ) - - -@pytest.fixture() -async def reset_restart_condition(ops_test: OpsTest, substrate: Substrate): - """Resets service file delay on all units (VM only).""" - if substrate == Substrate.k8s: - yield - return - - app = await app_name(ops_test) - - awaits = [] - for unit in ops_test.model.applications[app].units: - awaits.append(update_restart_condition(ops_test, unit, RESTART_CONDITION)) - await gather(*awaits) - - yield - - awaits = [] - for unit in ops_test.model.applications[app].units: - awaits.append(update_restart_condition(ops_test, unit, ORIGINAL_RESTART_CONDITION)) - await gather(*awaits) - - -@pytest.fixture() -async def restart_policy(ops_test: OpsTest, substrate: Substrate) -> None: - """Sets and resets service pebble restart policy on all units (K8s only).""" - if substrate == Substrate.vm: - yield - return - - app = await app_name(ops_test) - - for unit in ops_test.model.applications[app].units: - await modify_pebble_restart_delay( - ops_test, - unit.name, - "tests/integration/charm/ha_tests/manifests/extend_pebble_restart_delay.yml", - ) - - async with ops_test.fast_forward(): - await ops_test.model.wait_for_idle( - apps=[app], - status="active", - raise_on_blocked=True, - timeout=5 * 60, - idle_period=30, - ) - - yield - - -@pytest.fixture() -async def wal_settings(ops_test: OpsTest, substrate: Substrate) -> None: - """Restore the WAL settings to the initial values.""" - # Get the value for each setting. - initial_max_wal_size = await get_postgresql_parameter(ops_test, "max_wal_size") - initial_min_wal_size = await get_postgresql_parameter(ops_test, "min_wal_size") - initial_wal_keep_segments = await get_postgresql_parameter(ops_test, "wal_keep_segments") - yield - app = await app_name(ops_test) - for unit in ops_test.model.applications[app].units: - if substrate == Substrate.vm: - # Start Patroni if it was previously stopped. - await run_command_on_unit(ops_test, unit.name, "snap start charmed-postgresql.patroni") - patroni_password = await get_password(ops_test, "patroni") - - # Rollback to the initial settings. - await change_wal_settings( - ops_test, - unit.name, - initial_max_wal_size, - initial_min_wal_size, - initial_wal_keep_segments, - patroni_password, - ) diff --git a/tests/integration/charm/ha_tests/helpers.py b/tests/integration/charm/ha_tests/helpers.py deleted file mode 100644 index 168c2eaa..00000000 --- a/tests/integration/charm/ha_tests/helpers.py +++ /dev/null @@ -1,1607 +0,0 @@ -# Copyright 2022 Canonical Ltd. -# See LICENSE file for licensing details. -import asyncio -import contextlib -import json -import logging -import os -import random -import string -import subprocess -import tarfile -import tempfile -from datetime import datetime -from tempfile import mkstemp - -import kubernetes as kubernetes -import psycopg2 -import requests -import yaml -from juju.model import Model -from kubernetes import config -from kubernetes.client.api import core_v1_api -from kubernetes.stream import stream -from lightkube.core.client import Client, GlobalResource -from lightkube.core.exceptions import ApiError -from lightkube.resources.core_v1 import ( - PersistentVolume, - PersistentVolumeClaim, - Pod, -) -from pytest_operator.plugin import OpsTest -from tenacity import ( - RetryError, - Retrying, - stop_after_attempt, - stop_after_delay, - wait_fixed, -) - -from tests.integration.charm.pytest_operator_helpers import ( - APPLICATION_NAME, - KUBECTL, - PGDATA_PATH, - app_name, - get_password, - get_patroni_cluster, - get_primary, - get_substrate, - get_unit_address, - run_command_on_unit, -) -from tests.integration.helpers.postgresql import db_connect, execute_query -from tests.integration.types import Substrate - -logger = logging.getLogger(__name__) - -SERVICE_NAME = "snap.charmed-postgresql.patroni.service" -PATRONI_SERVICE_DEFAULT_PATH = f"/etc/systemd/system/{SERVICE_NAME}" -RESTART_CONDITION = "no" -ORIGINAL_RESTART_CONDITION = "always" - - -class MemberNotListedOnClusterError(Exception): - """Raised when a member is not listed in the cluster.""" - - -class MemberNotUpdatedOnClusterError(Exception): - """Raised when a member is not yet updated in the cluster.""" - - -class ProcessError(Exception): - """Raised when a process fails.""" - - -class ProcessRunningError(Exception): - """Raised when a process is running when it is not expected to be.""" - - -async def are_all_db_processes_down(ops_test: OpsTest, process: str, signal: str) -> bool: - """Verifies that all units of the charm do not have the DB process running.""" - app = await app_name(ops_test) - pgrep_cmd = ("pgrep", "-f", process) if "/" in process else ("pgrep", "-x", process) - - try: - for attempt in Retrying(stop=stop_after_delay(400), wait=wait_fixed(3)): - with attempt: - running_process = False - for unit in ops_test.model.applications[app].units: - if get_substrate(ops_test) == Substrate.vm: - _, processes, _ = await ops_test.juju("ssh", unit.name, *pgrep_cmd) - - # Splitting processes by "\n" results in one or more empty lines, hence we - # need to process these lines accordingly. - processes = [proc for proc in processes.split("\n") if len(proc) > 0] - - # If something was returned, there is a running process. - is_running = len(processes) > 0 - else: - pod_name = unit.name.replace("/", "-") - call = subprocess.run( - f"{KUBECTL} -n {ops_test.model.info.name} exec {pod_name} -c postgresql -- {' '.join(pgrep_cmd)}", - shell=True, - ) - - # If something was returned, there is a running process. - is_running = call.returncode != 1 - - if is_running: - logger.info(f"Unit {unit.name} not yet down") - # Try to rekill the unit - await send_signal_to_process(ops_test, unit.name, process, signal) - running_process = True - if running_process: - raise ProcessRunningError - except RetryError: - return False - - return True - - -async def are_writes_increasing( - ops_test, - down_unit: str | None = None, - use_ip_from_inside: bool = False, - extra_model: Model = None, -) -> None: - """Verify new writes are continuing by counting the number of writes.""" - if get_substrate(ops_test) == Substrate.vm: - down_units = [down_unit] if isinstance(down_unit, str) or not down_unit else down_unit - writes, _ = await count_writes( - ops_test, - down_unit=down_units[0], - use_ip_from_inside=use_ip_from_inside, - extra_model=extra_model, - ) - logger.info(f"Initial writes {writes}") - - for attempt in Retrying(stop=stop_after_delay(60 * 3), wait=wait_fixed(3), reraise=True): - with attempt: - more_writes, _ = await count_writes( - ops_test, - down_unit=down_units[0], - use_ip_from_inside=use_ip_from_inside, - extra_model=extra_model, - ) - logger.info(f"Retry writes {more_writes}") - for member, count in writes.items(): - if "/".join(member.split(".", 1)[-1].rsplit("-", 1)) in down_units: - continue - assert more_writes[member] > count, ( - f"{member}: writes not continuing to DB (current writes: {more_writes[member]} - previous writes: {count})" - ) - return - - for attempt in Retrying(stop=stop_after_delay(60), wait=wait_fixed(3), reraise=True): - with attempt: - writes, _ = await count_writes(ops_test, down_unit=down_unit, extra_model=extra_model) - assert len(writes), "No units report count" - logger.info(f"Initial writes {writes}") - for attempt in Retrying(stop=stop_after_delay(60 * 3), wait=wait_fixed(3), reraise=True): - with attempt: - more_writes, _ = await count_writes( - ops_test, down_unit=down_unit, extra_model=extra_model - ) - logger.info(f"Retry writes {more_writes}") - members_checked = [] - for member, count in writes.items(): - if member in more_writes: - members_checked.append(member) - assert more_writes[member] > count, ( - f"{member}: writes not continuing to DB (current writes: {more_writes[member]} - previous writes: {count})" - ) - assert len(members_checked), "No member checked from the initial writes" - - -async def change_patroni_setting( - ops_test: OpsTest, - setting: str, - value: int | bool, - password: str, - use_random_unit: bool = False, - tls: bool = False, -) -> None: - """Change the value of one of the Patroni settings. - - Args: - ops_test: ops_test instance. - setting: the name of the setting. - value: the value to assign to the setting. - password: Patroni password. - use_random_unit: whether to use a random unit (default is False, - so it uses the primary). - tls: if Patroni is serving using tls. - """ - for attempt in Retrying(stop=stop_after_delay(30 * 2), wait=wait_fixed(3)): - with attempt: - app = await app_name(ops_test) - if use_random_unit: - unit = get_random_unit(ops_test, app) - unit_ip = await get_unit_address(ops_test, unit) - else: - primary_name = await get_primary(ops_test, app) - unit_ip = await get_unit_address(ops_test, primary_name) - requests.patch( - f"https://{unit_ip}:8008/config", - json={setting: value}, - verify=False, - auth=requests.auth.HTTPBasicAuth("patroni", password), - ) - - -async def is_cluster_updated( - ops_test: OpsTest, primary_name: str, use_ip_from_inside: bool = False -) -> None: - # Verify that the old primary is now a replica. - logger.info("checking that the former primary is now a replica") - assert await is_replica(ops_test, primary_name, use_ip_from_inside), ( - "there are more than one primary in the cluster." - ) - - # Verify that all units are part of the same cluster. - logger.info("checking that all units are part of the same cluster") - member_ips = await fetch_cluster_members(ops_test, use_ip_from_inside) - app = primary_name.split("/")[0] - ip_addresses = [ - await ( - get_ip_from_inside_the_unit(ops_test, unit.name) - if use_ip_from_inside - else get_unit_ip(ops_test, unit.name) - ) - for unit in ops_test.model.applications[app].units - ] - assert set(member_ips) == set(ip_addresses), "not all units are part of the same cluster." - - # Verify that no writes to the database were missed after stopping the writes. - logger.info("checking that no writes to the database were missed after stopping the writes") - for attempt in Retrying(stop=stop_after_attempt(3), wait=wait_fixed(5), reraise=True): - with attempt: - total_expected_writes = await check_writes(ops_test, use_ip_from_inside) - - # Verify that old primary is up-to-date. - logger.info("checking that the former primary is up to date with the cluster after restarting") - for attempt in Retrying(stop=stop_after_attempt(3), wait=wait_fixed(5), reraise=True): - with attempt: - assert await is_secondary_up_to_date( - ops_test, primary_name, total_expected_writes, use_ip_from_inside - ), f"secondary ({primary_name}) not up to date with the cluster after restarting." - - -async def check_writes( - ops_test, use_ip_from_inside: bool = False, extra_model: Model = None -) -> int: - """Gets the total writes from the test charm and compares to the writes from db.""" - total_expected_writes = await stop_continuous_writes(ops_test) - for attempt in Retrying(stop=stop_after_attempt(3), wait=wait_fixed(5), reraise=True): - with attempt: - actual_writes, max_number_written = await count_writes( - ops_test, use_ip_from_inside=use_ip_from_inside, extra_model=extra_model - ) - for member, count in actual_writes.items(): - logger.info( - f"member: {member}, count: {count}, max_number_written: {max_number_written[member]}, total_expected_writes: {total_expected_writes}" - ) - assert count == max_number_written[member], ( - f"{member}: writes to the db were missed: count of actual writes ({count}) on {member} different from the max number written ({max_number_written[member]})." - ) - assert total_expected_writes == count, f"{member}: writes to the db were missed." - return total_expected_writes - - -def copy_file_into_pod( - client: kubernetes.client.api.core_v1_api.CoreV1Api, - namespace: str, - pod_name: str, - container_name: str, - destination_path: str, - source_path: str, -) -> None: - """Copy file contents into pod. - - Args: - client: The kubernetes CoreV1Api client - namespace: The namespace of the pod to copy files to - pod_name: The name of the pod to copy files to - container_name: The name of the pod container to copy files to - destination_path: The path to which the file should be copied over - source_path: The path of the file which needs to be copied over - """ - try: - exec_command = ["tar", "xvf", "-", "-C", "/"] - - api_response = kubernetes.stream.stream( - client.connect_get_namespaced_pod_exec, - pod_name, - namespace, - container=container_name, - command=exec_command, - stdin=True, - stdout=True, - stderr=True, - tty=False, - _preload_content=False, - ) - - with tempfile.TemporaryFile() as tar_buffer: - with tarfile.open(fileobj=tar_buffer, mode="w") as tar: - tar.add(source_path, destination_path) - - tar_buffer.seek(0) - commands = [] - commands.append(tar_buffer.read()) - - while api_response.is_open(): - api_response.update(timeout=1) - - if commands: - command = commands.pop(0) - api_response.write_stdin(command.decode()) - else: - break - - api_response.close() - except kubernetes.client.rest.ApiException: - assert False - - -async def count_writes( # noqa: C901 - ops_test: OpsTest, - down_unit: str | None = None, - use_ip_from_inside: bool = False, - extra_model: Model = None, -) -> tuple[dict[str, int], dict[str, int]]: - """Count the number of writes in the database.""" - app = await app_name(ops_test) - password = await get_password(ops_test, database_app_name=app) - members = [] - if get_substrate(ops_test) == Substrate.vm: - for model in [ops_test.model, extra_model]: - if model is None: - continue - for unit in model.applications[app].units: - if unit.name != down_unit: - members_data = get_patroni_cluster( - await ( - get_ip_from_inside_the_unit(ops_test, unit.name) - if use_ip_from_inside - else get_unit_ip(ops_test, unit.name) - ) - )["members"] - for member_data in members_data: - member_data["model"] = model.info.name - members.extend(members_data) - break - down_ips = [] - if down_unit: - for unit in ops_test.model.applications[app].units: - if unit.name == down_unit: - down_ips.append(unit.public_address) - down_ips.append(await get_unit_ip(ops_test, unit.name)) - return count_writes_on_members(members, password, down_ips) - - for model in [ops_test.model, extra_model]: - if model is None: - continue - status = await model.get_status() - for unit_name, unit in status["applications"][app]["units"].items(): - if unit_name != down_unit: - members_data = get_patroni_cluster(unit["address"])["members"] - for _, member_data in enumerate(members_data): - member_data["model"] = model.info.name - members.extend(members_data) - break - - count = {} - maximum = {} - for member in members: - if member["role"] != "replica" and member["host"].split(".")[0] != ( - down_unit or "" - ).replace("/", "-"): - host = member["host"] - - # Translate the service hostname to an IP address. - client = Client(namespace=member["model"]) - service = client.get(Pod, name=host.split(".")[0]) - ip = service.status.podIP - - connection_string = ( - f"dbname='{APPLICATION_NAME.replace('-', '_')}_database' user='operator'" - f" host='{ip}' password='{password}' connect_timeout=10" - ) - - member_name = f"{member['model']}.{member['name']}" - connection = None - try: - with ( - psycopg2.connect(connection_string) as connection, - connection.cursor() as cursor, - ): - cursor.execute("SELECT COUNT(number), MAX(number) FROM continuous_writes;") - results = cursor.fetchone() - count[member_name] = results[0] - maximum[member_name] = results[1] - except psycopg2.Error: - # Error raised when the connection is not possible. - count[member_name] = -1 - maximum[member_name] = -1 - finally: - if connection is not None: - connection.close() - return count, maximum - - -def count_writes_on_members(members, password, down_ips) -> tuple[dict[str, int], dict[str, int]]: - count = {} - maximum = {} - for member in members: - if member["role"] != "replica" and member["host"] not in down_ips: - host = member["host"] - - connection_string = ( - f"dbname='{APPLICATION_NAME.replace('-', '_')}_database' user='operator'" - f" host='{host}' password='{password}' connect_timeout=10" - ) - - member_name = f"{member['model']}.{member['name']}" - connection = None - try: - with ( - psycopg2.connect(connection_string) as connection, - connection.cursor() as cursor, - ): - cursor.execute("SELECT COUNT(number), MAX(number) FROM continuous_writes;") - results = cursor.fetchone() - count[member_name] = results[0] - maximum[member_name] = results[1] - except psycopg2.Error: - # Error raised when the connection is not possible. - count[member_name] = -1 - maximum[member_name] = -1 - finally: - if connection is not None: - connection.close() - return count, maximum - - -async def fetch_cluster_members(ops_test: OpsTest, use_ip_from_inside: bool = False): - """Fetches the IPs listed by Patroni as cluster members. - - Args: - ops_test: OpsTest instance. - use_ip_from_inside: whether to use the IP from inside the unit. - """ - app = await app_name(ops_test) - member_ips = {} - if get_substrate(ops_test) == Substrate.vm: - for unit in ops_test.model.applications[app].units: - unit_ip = await ( - get_ip_from_inside_the_unit(ops_test, unit.name) - if use_ip_from_inside - else get_unit_ip(ops_test, unit.name) - ) - cluster_info = requests.get(f"https://{unit_ip}:8008/cluster", verify=False) - if len(member_ips) > 0: - # If the list of members IPs was already fetched, also compare the - # list provided by other members. - assert member_ips == { - member["host"] for member in cluster_info.json()["members"] - }, "members report different lists of cluster members." - else: - member_ips = {member["host"] for member in cluster_info.json()["members"]} - return member_ips - - def get_host_ip(host: str) -> str: - # Translate the pod hostname to an IP address. - model = ops_test.model.info - client = Client(namespace=model.name) - pod = client.get(Pod, name=host.split(".")[0]) - return pod.status.podIP - - for unit in ops_test.model.applications[app].units: - unit_address = await get_unit_address(ops_test, unit.name) - cluster_info = requests.get(f"https://{unit_address}:8008/cluster", verify=False) - if len(member_ips) > 0: - # If the list of members IPs was already fetched, also compare the - # list provided by other members. - assert member_ips == { - get_host_ip(member["host"]) for member in cluster_info.json()["members"] - }, "members report different lists of cluster members." - else: - member_ips = {get_host_ip(member["host"]) for member in cluster_info.json()["members"]} - return member_ips - - -async def get_ip_from_inside_the_unit(ops_test: OpsTest, unit_name: str) -> str: - command = f"exec --unit {unit_name} -- hostname -I" - return_code, stdout, stderr = await ops_test.juju(*command.split()) - if return_code != 0: - raise ProcessError( - "Expected command %s to succeed instead it failed: %s %s", command, return_code, stderr - ) - return stdout.splitlines()[0].strip() - - -async def get_patroni_setting(ops_test: OpsTest, setting: str, tls: bool = False) -> int | None: - """Get the value of one of the integer Patroni settings. - - Args: - ops_test: ops_test instance. - setting: the name of the setting. - tls: if Patroni is serving using tls. - - Returns: - the value of the configuration or None if it's using the default value. - """ - for attempt in Retrying(stop=stop_after_delay(30 * 2), wait=wait_fixed(3)): - with attempt: - app = await app_name(ops_test) - primary_name = await get_primary(ops_test, app) - unit_ip = await get_unit_address(ops_test, primary_name) - configuration_info = requests.get(f"https://{unit_ip}:8008/config", verify=False) - value = configuration_info.json().get(setting) - return int(value) if value is not None else None - - -def get_random_unit(ops_test: OpsTest, app: str) -> str: - """Returns a random unit name.""" - return random.choice(ops_test.model.applications[app].units).name - - -async def get_unit_ip(ops_test: OpsTest, unit_name: str, model: Model = None) -> str: - """Wrapper for getting unit ip. - - Args: - ops_test: The ops test object passed into every test case - unit_name: The name of the unit to get the address - model: Optional model instance to use - Returns: - The (str) ip of the unit - """ - if get_substrate(ops_test) == Substrate.k8s: - return await get_unit_address(ops_test, unit_name) - if model is None: - application = unit_name.split("/")[0] - for unit in ops_test.model.applications[application].units: - if unit.name == unit_name: - break - return await instance_ip(ops_test, unit.machine.hostname) - else: - return await get_unit_address(ops_test, unit_name) - - -async def is_replica(ops_test: OpsTest, unit_name: str, use_ip_from_inside: bool = False) -> bool: - """Returns whether the unit a replica in the cluster.""" - unit_ip = await ( - get_ip_from_inside_the_unit(ops_test, unit_name) - if use_ip_from_inside - else get_unit_ip(ops_test, unit_name) - ) - member_name = unit_name.replace("/", "-") - - try: - for attempt in Retrying(stop=stop_after_delay(60 * 3), wait=wait_fixed(3)): - with attempt: - cluster_info = requests.get(f"https://{unit_ip}:8008/cluster", verify=False) - - # The unit may take some time to be listed on Patroni REST API cluster endpoint. - if member_name not in { - member["name"] for member in cluster_info.json()["members"] - }: - raise MemberNotListedOnClusterError() - - for member in cluster_info.json()["members"]: - if member["name"] == member_name: - role = member["role"] - - # A member that restarted has the DB process stopped may - # take some time to know that a new primary was elected. - if role != "leader": - return True - else: - raise MemberNotUpdatedOnClusterError() - except RetryError: - return False - - -async def get_cluster_roles( - ops_test: OpsTest, unit_name: str, use_ip_from_inside: bool = False -) -> dict[str, str | list[str] | None]: - """Returns whether the unit a replica in the cluster.""" - unit_ip = await ( - get_ip_from_inside_the_unit(ops_test, unit_name) - if use_ip_from_inside - else get_unit_ip(ops_test, unit_name) - ) - - members = {"replicas": [], "primaries": [], "sync_standbys": []} - member_list = get_patroni_cluster(unit_ip)["members"] - logger.info(f"Cluster members are: {member_list}") - for member in member_list: - role = member["role"] - name = "/".join(member["name"].rsplit("-", 1)) - if role == "leader": - members["primaries"].append(name) - elif role == "sync_standby": - members["sync_standbys"].append(name) - else: - members["replicas"].append(name) - - return members - - -async def instance_ip(ops_test: OpsTest, instance: str) -> str: - """Translate juju instance name to IP. - - Args: - ops_test: pytest ops test helper - instance: The name of the instance - - Returns: - The (str) IP address of the instance - """ - _, output, _ = await ops_test.juju("machines") - - for line in output.splitlines(): - if instance in line: - return line.split()[2] - - -async def modify_pebble_restart_delay( - ops_test: OpsTest, - unit_name: str, - pebble_plan_path: str, - ensure_replan: bool = False, -) -> None: - """Modify the pebble restart delay of the underlying process. - - Args: - ops_test: The ops test framework - unit_name: The name of unit to extend the pebble restart delay for - pebble_plan_path: Path to the file with the modified pebble plan - ensure_replan: Whether to check that the replan command succeeded - """ - kubernetes.config.load_kube_config() - client = kubernetes.client.api.core_v1_api.CoreV1Api() - - pod_name = unit_name.replace("/", "-") - container_name = "postgresql" - service_name = "postgresql" - now = datetime.now().isoformat() - - copy_file_into_pod( - client, - ops_test.model.info.name, - pod_name, - container_name, - f"/tmp/pebble_plan_{now}.yml", - pebble_plan_path, - ) - - add_to_pebble_layer_commands = ( - f"/charm/bin/pebble add --combine {service_name} /tmp/pebble_plan_{now}.yml" - ) - response = kubernetes.stream.stream( - client.connect_get_namespaced_pod_exec, - pod_name, - ops_test.model.info.name, - container=container_name, - command=add_to_pebble_layer_commands.split(), - stdin=False, - stdout=True, - stderr=True, - tty=False, - _preload_content=False, - ) - response.run_forever(timeout=5) - assert response.returncode == 0, ( - f"Failed to add to pebble layer, unit={unit_name}, container={container_name}, service={service_name}" - ) - - for attempt in Retrying(stop=stop_after_delay(60), wait=wait_fixed(3), reraise=True): - with attempt: - replan_pebble_layer_commands = "/charm/bin/pebble replan" - response = kubernetes.stream.stream( - client.connect_get_namespaced_pod_exec, - pod_name, - ops_test.model.info.name, - container=container_name, - command=replan_pebble_layer_commands.split(), - stdin=False, - stdout=True, - stderr=True, - tty=False, - _preload_content=False, - ) - response.run_forever(timeout=60) - if ensure_replan and response.returncode != 0: - assert response.returncode == 0, ( - f"Failed to replan pebble layer, unit={unit_name}, container={container_name}, service={service_name}" - ) - - -async def send_signal_to_process( # noqa: C901 - ops_test: OpsTest, unit_name: str, process: str, signal: str, use_ssh: bool = False -) -> None: - """Send a signal to an OS process on a specific unit. - - Args: - ops_test: The ops test framework instance - unit_name: The name of the unit to run the command on - process: OS process name - signal: Signal that will be sent to the OS process - (examples: SIGKILL, SIGTERM, SIGSTOP, SIGCONT) - use_ssh: whether to use juju ssh instead of kubernetes client (K8s only). - - Returns: - the command output if it succeeds, otherwise raises an exception. - """ - # Killing or freezing the only instance can be disastrous. - app = await app_name(ops_test) - if len(ops_test.model.applications[app].units) < 2: - await ops_test.model.applications[app].add_unit(count=1) - await ops_test.model.wait_for_idle(apps=[app], status="active", timeout=1000) - - opt = "-f" if "/" in process else "-x" - - if get_substrate(ops_test) == Substrate.vm: - command = f"exec --unit {unit_name} -- pkill --signal {signal} {opt} {process}" - - # Send the signal. - return_code, _, _ = await ops_test.juju(*command.split()) - if signal != "SIGCONT" and return_code != 0: - raise ProcessError( - "Expected command %s to succeed instead it failed: %s", - command, - return_code, - ) - return - - pod_name = unit_name.replace("/", "-") - - if signal not in ["SIGSTOP", "SIGCONT"]: - _, old_pid, _ = await ops_test.juju( - "ssh", "--container", "postgresql", unit_name, "pgrep", opt, process - ) - - command = f"pkill --signal {signal} {opt} {process}" - - if use_ssh: - kill_cmd = f"ssh {unit_name} {command}" - return_code, _, _ = await asyncio.wait_for(ops_test.juju(*kill_cmd.split()), 10) - if return_code != 0: - raise ProcessError( - "Expected command %s to succeed instead it failed: %s", - command, - return_code, - ) - return - - # Load Kubernetes configuration to connect to the cluster. - config.load_kube_config() - - for attempt in Retrying(stop=stop_after_delay(60), wait=wait_fixed(3)): - with attempt: - # Send the signal. - response = stream( - core_v1_api.CoreV1Api().connect_get_namespaced_pod_exec, - pod_name, - ops_test.model.info.name, - container="postgresql", - command=command.split(), - stderr=True, - stdin=False, - stdout=True, - tty=False, - _preload_content=False, - ) - - response.run_forever(timeout=10) - - if signal not in ["SIGSTOP", "SIGCONT"]: - _, raw_pid, _ = await ops_test.juju( - "ssh", "--container", "postgresql", unit_name, "pgrep", opt, process - ) - - # If the same output was returned, process was not restarted. - if raw_pid == old_pid: - raise ProcessRunningError - elif response.returncode != 0: - raise ProcessError( - "Expected command %s to succeed instead it failed: %s", - command, - response.returncode, - ) - - -async def is_postgresql_ready(ops_test, unit_name: str, use_ip_from_inside: bool = False) -> bool: - """Verifies a PostgreSQL instance is running and available.""" - unit_ip = ( - (await get_ip_from_inside_the_unit(ops_test, unit_name)) - if use_ip_from_inside - else await get_unit_address(ops_test, unit_name) - ) - try: - for attempt in Retrying(stop=stop_after_delay(60 * 10), wait=wait_fixed(3)): - with attempt: - instance_health_info = requests.get(f"https://{unit_ip}:8008/health", verify=False) - assert instance_health_info.status_code == 200 - except RetryError: - return False - - return True - - -async def is_secondary_up_to_date( - ops_test: OpsTest, unit_name: str, expected_writes: int, use_ip_from_inside: bool = False -) -> bool: - """Checks if secondary is up-to-date with the cluster. - - Retries over the period of one minute to give secondary adequate time to copy over data. - """ - app = await app_name(ops_test) - password = await get_password(ops_test, database_app_name=app) - if get_substrate(ops_test) == Substrate.vm: - host = await next( - ( - get_ip_from_inside_the_unit(ops_test, unit.name) - if use_ip_from_inside - else get_unit_ip(ops_test, unit.name) - ) - for unit in ops_test.model.applications[app].units - if unit.name == unit_name - ) - else: - status = await ops_test.model.get_status() - host = status["applications"][app]["units"][unit_name]["address"] - connection_string = ( - f"dbname='{APPLICATION_NAME.replace('-', '_')}_database' user='operator'" - f" host='{host}' password='{password}' connect_timeout=10" - ) - - try: - for attempt in Retrying(stop=stop_after_delay(60 * 3), wait=wait_fixed(3)): - with ( - attempt, - psycopg2.connect(connection_string) as connection, - connection.cursor() as cursor, - ): - cursor.execute("SELECT COUNT(number), MAX(number) FROM continuous_writes;") - results = cursor.fetchone() - if get_substrate(ops_test) == Substrate.vm: - assert results[0] == expected_writes and results[1] == expected_writes - elif results[0] != expected_writes or results[1] != expected_writes: - async with ops_test.fast_forward(fast_interval="30s"): - await ops_test.model.wait_for_idle( - apps=[unit_name.split("/")[0]], idle_period=15, timeout=1000 - ) - raise Exception - except RetryError: - return False - finally: - connection.close() - - return True - - -async def start_continuous_writes(ops_test: OpsTest, app: str, model: Model = None) -> None: - """Start continuous writes to PostgreSQL.""" - # Start the process by relating the application to the database or - # by calling the action if the relation already exists. - if model is None: - model = ops_test.model - relations = [ - relation - for relation in model.applications[app].relations - if not relation.is_peer - and f"{relation.requires.application_name}:{relation.requires.name}" - == f"{APPLICATION_NAME}:database" - ] - if not relations: - await model.relate(app, f"{APPLICATION_NAME}:database") - await model.wait_for_idle( - apps=[APPLICATION_NAME, app], status="active", timeout=1000, idle_period=30 - ) - for attempt in Retrying(stop=stop_after_delay(60 * 5), wait=wait_fixed(3), reraise=True): - with attempt: - action = ( - await model - .applications[APPLICATION_NAME] - .units[0] - .run_action("start-continuous-writes") - ) - await action.wait() - assert action.results["result"] == "True", "Unable to create continuous_writes table" - - -async def stop_continuous_writes(ops_test: OpsTest) -> int: - """Stops continuous writes to PostgreSQL and returns the last written value.""" - action = ( - await ops_test.model - .applications[APPLICATION_NAME] - .units[0] - .run_action("stop-continuous-writes") - ) - action = await action.wait() - return int(action.results["writes"]) - - -async def update_restart_condition(ops_test: OpsTest, unit, condition: str): - """Updates the restart condition in the DB service file. - - When the DB service fails it will now wait for `delay` number of seconds. - """ - # Load the service file from the unit and update it with the new delay. - _, temp_path = mkstemp() - await unit.scp_from(source=PATRONI_SERVICE_DEFAULT_PATH, destination=temp_path) - with open(temp_path) as patroni_service_file: - patroni_service = patroni_service_file.readlines() - - for index, line in enumerate(patroni_service): - if "Restart=" in line: - patroni_service[index] = f"Restart={condition}\n" - - with open(temp_path, "w") as service_file: - service_file.writelines(patroni_service) - - # Upload the changed file back to the unit, we cannot scp this file directly to - # PATRONI_SERVICE_DEFAULT_PATH since this directory has strict permissions, instead we scp it - # elsewhere and then move it to PATRONI_SERVICE_DEFAULT_PATH. - await unit.scp_to(source=temp_path, destination="patroni.service") - mv_cmd = f"mv /home/ubuntu/patroni.service {PATRONI_SERVICE_DEFAULT_PATH}" - await run_command_on_unit(ops_test, unit.name, mv_cmd) - - # Remove temporary file from machine. - os.remove(temp_path) - - # Reload the daemon for systemd otherwise changes are not saved. - reload_cmd = "systemctl daemon-reload" - await run_command_on_unit(ops_test, unit.name, reload_cmd) - start_cmd = f"systemctl start {SERVICE_NAME}" - await run_command_on_unit(ops_test, unit.name, start_cmd) - - await is_postgresql_ready(ops_test, unit.name) - - -def storage_type(ops_test, app): - """Retrieves type of storage associated with an application. - - Note: this function exists as a temporary solution until this issue is ported to libjuju 2: - https://github.com/juju/python-libjuju/issues/694 - """ - model_name = ops_test.model.info.name - proc = subprocess.check_output(f"juju storage --model={model_name}".split()) - proc = proc.decode("utf-8") - for line in proc.splitlines(): - if "Storage" in line: - continue - - if len(line) == 0: - continue - - if "detached" in line: - continue - - unit_name = line.split()[0] - app_name = unit_name.split("/")[0] - if app_name == app: - return line.split()[3] - - -async def get_storage_ids(ops_test: OpsTest, unit_name: str) -> list[str]: - """Retrieves storage ids associated with provided unit (only the data storage on K8s). - - Note: this function exists as a temporary solution until this issue is ported to libjuju 2: - https://github.com/juju/python-libjuju/issues/694 - """ - storage_ids = [] - model_name = ops_test.model.info.name - proc = subprocess.check_output( - f"juju storage --model={ops_test.controller_name}:{model_name}".split() - ) - proc = proc.decode("utf-8") - for line in proc.splitlines(): - if "Storage" in line: - continue - - if len(line) == 0: - continue - - if "detached" in line: - continue - - if line.split()[0] == unit_name and ( - get_substrate(ops_test) == Substrate.vm or line.split()[1].startswith("data") - ): - storage_ids.append(line.split()[1]) - return storage_ids - - -async def add_unit_with_storage(ops_test, app, storages): - """Adds unit with storages. - - Note: this function exists as a temporary solution until this issue is resolved: - https://github.com/juju/python-libjuju/issues/695 - """ - original_units = {unit.name for unit in ops_test.model.applications[app].units} - model_name = ops_test.model.info.name - add_unit_cmd = f"add-unit {app} --model={model_name}" - for storage in storages: - add_unit_cmd = add_unit_cmd + f" --attach-storage={storage}" - add_unit_cmd = add_unit_cmd.split() - return_code, _, _ = await ops_test.juju(*add_unit_cmd) - assert return_code == 0, "Failed to add unit with storage" - async with ops_test.fast_forward(): - await ops_test.model.wait_for_idle(apps=[app], status="active", timeout=2000) - - # When removing all units sometimes the last unit remain in the list - current_units = {unit.name for unit in ops_test.model.applications[app].units} - original_units.intersection_update(current_units) - assert original_units.issubset(current_units), "New unit not added to model" - - # verify storage attached - new_unit = (current_units - original_units).pop() - assert sorted(await get_storage_ids(ops_test, new_unit)) == sorted(storages), ( - "unit added with incorrect storage" - ) - - # return a reference to newly added unit - for unit in ops_test.model.applications[app].units: - if unit.name == new_unit: - return unit - - -async def reused_replica_storage(ops_test: OpsTest, unit_name) -> bool: - """Returns True if storage provided to Postgresql has been reused. - - Checks Patroni logs for when the database was in archive mode. - """ - await run_command_on_unit( - ops_test, - unit_name, - "grep 'Database cluster state: in archive recovery' " - "/var/snap/charmed-postgresql/common/var/log/patroni/patroni.log*", - ) - return True - - -async def is_storage_exists(ops_test: OpsTest, storage_id: str) -> bool: - """Returns True if storage exists by provided storage ID.""" - complete_command = [ - "show-storage", - "-m", - f"{ops_test.controller_name}:{ops_test.model.info.name}", - storage_id, - "--format=json", - ] - return_code, stdout, _ = await ops_test.juju(*complete_command) - if return_code != 0: - if return_code == 1: - return storage_id in stdout - raise Exception( - "Expected command %s to succeed instead it failed: %s with code: ", - complete_command, - stdout, - return_code, - ) - return storage_id in str(stdout) - - -async def create_db(ops_test: OpsTest, app: str, db: str) -> None: - """Creates database with specified name.""" - unit = ops_test.model.applications[app].units[0] - unit_address = await get_unit_address(ops_test, unit.name) - password = await get_password(ops_test, database_app_name=app) - - conn = db_connect(unit_address, password) - conn.autocommit = True - cursor = conn.cursor() - cursor.execute(f"CREATE DATABASE {db};") - cursor.close() - conn.close() - - -async def check_db(ops_test: OpsTest, app: str, db: str) -> bool: - """Returns True if database with specified name already exists.""" - unit = ops_test.model.applications[app].units[0] - unit_address = await get_unit_address(ops_test, unit.name) - password = await get_password(ops_test, database_app_name=app) - - assert password is not None - - query = execute_query( - unit_address, - password, - f"select datname from pg_catalog.pg_database where datname = '{db}';", - ) - - if "ERROR" in query: - raise Exception(f"Database check is failed with postgresql err: {query}") - - return db in query - - -async def get_detached_storages(ops_test: OpsTest) -> list[str]: - """Returns the current available detached storages (only the data storage on K8s).""" - return_code, storages_list, stderr = await ops_test.juju( - "storage", "-m", f"{ops_test.controller_name}:{ops_test.model.info.name}", "--format=json" - ) - if return_code != 0: - raise Exception(f"failed to get storages info with error: {stderr}") - - parsed_storages_list = json.loads(storages_list) - detached_storages = [] - for storage_name, storage in parsed_storages_list["storage"].items(): - if ( - (get_substrate(ops_test) == Substrate.vm or storage_name.startswith("data")) - and (str(storage["status"]["current"]) == "detached") - and (str(storage["life"] == "alive")) - ): - detached_storages.append(storage_name) - - if len(detached_storages) > 0: - return detached_storages - - raise Exception("failed to get deatached storage") - - -async def check_password_auth(ops_test: OpsTest, unit_name: str) -> bool: - """Checks if "operator" password is valid for current postgresql db.""" - complete_command = [ - "exec", - "--unit", - unit_name, - "--", - "grep", - "-E", - "'password'", - "/var/snap/charmed-postgresql/common/var/log/postgresql/postgresql*", - ] - return_code, stdout, _ = await ops_test.juju(*complete_command) - if return_code != 0: - raise Exception( - "Expected command %s to succeed. Instead it failed: %s with code: ", - complete_command, - stdout, - return_code, - ) - return 'password authentication failed for user "operator"' not in stdout - - -async def check_system_id_mismatch(ops_test: OpsTest, unit_name: str) -> bool: - """Returns True if system id mismatch if found in logs.""" - log_str = f"CRITICAL: system ID mismatch, node {unit_name.replace('/', '-')} belongs to a different cluster" - stdout = await run_command_on_unit( - ops_test, - unit_name, - "cat /var/lib/pg/logs/16/main/patroni_logs/patroni.log*", - ) - - return log_str in str(stdout) - - -def delete_pvc(ops_test: OpsTest, pvc: GlobalResource): - """Deletes PersistentVolumeClaim.""" - client = Client(namespace=ops_test.model.name) - try: - client.delete(PersistentVolumeClaim, namespace=ops_test.model.name, name=pvc.metadata.name) - except ApiError as e: - logger.warning(f"failed to delete pvc {pvc.metadata.name}: {e}") - pass - - -def get_pvcs(ops_test: OpsTest, unit_name: str): - """Get PersistentVolumeClaims for unit.""" - pvcs = {} - client = Client(namespace=ops_test.model.name) - pvc_list = client.list(PersistentVolumeClaim, namespace=ops_test.model.name) - unit_label = unit_name.replace("/", "-") - for pvc in pvc_list: - if unit_label in pvc.metadata.name: - pvc_storage_name = pvc.metadata.name.replace(unit_name.split("/")[0], "").split("-")[1] - logger.info(f"got pvc for {pvc_storage_name} storage: {pvc.metadata.name}") - pvcs[pvc_storage_name] = pvc - return pvcs - - -def get_pvs(ops_test: OpsTest, unit_name: str): - """Get PersistentVolumes for unit.""" - pvs = {} - client = Client(namespace=ops_test.model.name) - pv_list = client.list(PersistentVolume, namespace=ops_test.model.name) - unit_label = unit_name.replace("/", "-") - for pv in pv_list: - if pv.spec.claimRef and pv.spec.claimRef.name.endswith(unit_label): - pvc_storage_name = pv.spec.claimRef.name.replace(unit_name.split("/")[0], "").split( - "-" - )[1] - logger.info(f"got pv for {pvc_storage_name} storage: {pv.metadata.name}") - pvs[pvc_storage_name] = pv - return pvs - - -def change_pvs_reclaim_policy( - ops_test: OpsTest, pvs_configs: dict[str, PersistentVolume], policy: str -): - """Change PersistentVolume reclaim policy config value.""" - client = Client(namespace=ops_test.model.name) - results = {} - for pvc_storage_name, pv_config in pvs_configs.items(): - results[pvc_storage_name] = client.patch( - PersistentVolume, - pv_config.metadata.name, - {"spec": {"persistentVolumeReclaimPolicy": f"{policy}"}}, - namespace=ops_test.model.name, - ) - return results - - -def remove_pv_claimref(ops_test: OpsTest, pv_config: PersistentVolume): - """Remove claimRef config value for PersistentVolume.""" - client = Client(namespace=ops_test.model.name) - client.patch( - PersistentVolume, - pv_config.metadata.name, - {"spec": {"claimRef": None}}, - namespace=ops_test.model.name, - ) - - -def change_pvc_pv_name( - pvc_config: PersistentVolumeClaim, pv_name_new: str -) -> PersistentVolumeClaim: - """Change PersistentVolume name config value for PersistentVolumeClaim.""" - pvc_config.spec.volumeName = pv_name_new - del pvc_config.metadata.annotations["pv.kubernetes.io/bind-completed"] - pvc_config.metadata.uid = None - return pvc_config - - -def apply_pvc_config(ops_test: OpsTest, pvc_config: PersistentVolumeClaim): - """Apply provided PersistentVolumeClaim config.""" - client = Client(namespace=ops_test.model.name) - pvc_config.metadata.managedFields = None - client.apply(pvc_config, namespace=ops_test.model.name, field_manager="lightkube") - - -async def remove_unit_force(ops_test: OpsTest, num_units: int): - """Removes unit with --force --no-wait.""" - app_name_str = await app_name(ops_test) - scale = len(ops_test.model.applications[app_name_str].units) - num_units - complete_command = [ - "remove-unit", - f"{app_name_str}", - "--force", - "--no-wait", - "--no-prompt", - "--num-units", - num_units, - ] - return_code, stdout, stderr = await ops_test.juju(*complete_command) - if return_code != 0: - raise Exception( - "Expected command %s to succeed instead it failed: %s with err: %s with code: %s", - complete_command, - stdout, - stderr, - return_code, - ) - - if scale == 0: - await ops_test.model.block_until( - lambda: len(ops_test.model.applications[app_name_str].units) == scale, - timeout=1000, - ) - else: - await ops_test.model.wait_for_idle( - apps=[app_name_str], - status="active", - timeout=1000, - wait_for_exact_units=scale, - ) - - -async def change_wal_settings( - ops_test: OpsTest, - unit_name: str, - max_wal_size: int, - min_wal_size, - wal_keep_segments, - password: str, -) -> None: - """Change WAL settings in the unit. - - Args: - ops_test: ops_test instance. - unit_name: name of the unit to change the WAL settings. - max_wal_size: maximum amount of WAL to keep (MB). - min_wal_size: minimum amount of WAL to keep (MB). - wal_keep_segments: number of WAL segments to keep. - password: Patroni password. - """ - for attempt in Retrying(stop=stop_after_delay(30 * 2), wait=wait_fixed(3)): - with attempt: - unit_ip = await get_unit_address(ops_test, unit_name) - requests.patch( - f"https://{unit_ip}:8008/config", - json={ - "postgresql": { - "parameters": { - "max_wal_size": max_wal_size, - "min_wal_size": min_wal_size, - "wal_keep_segments": wal_keep_segments, - } - } - }, - verify=False, - auth=requests.auth.HTTPBasicAuth("patroni", password), - ) - - -async def get_postgresql_parameter(ops_test: OpsTest, parameter_name: str) -> int | None: - """Get the value of a PostgreSQL parameter from Patroni API. - - Args: - ops_test: ops_test instance. - parameter_name: the name of the parameter to get the value for. - - Returns: - the value of the requested PostgreSQL parameter. - """ - for attempt in Retrying(stop=stop_after_delay(60), wait=wait_fixed(3)): - with attempt: - app = await app_name(ops_test) - primary_name = await get_primary(ops_test, app) - unit_ip = await get_unit_address(ops_test, primary_name) - configuration_info = requests.get(f"https://{unit_ip}:8008/config", verify=False) - postgresql_dict = configuration_info.json().get("postgresql") - if postgresql_dict is None: - return None - parameters = postgresql_dict.get("parameters") - if parameters is None: - return None - parameter_value = parameters.get(parameter_name) - return parameter_value - - -async def list_wal_files(ops_test: OpsTest, app: str) -> set: - """Returns the list of WAL segment files in each unit.""" - units = [unit.name for unit in ops_test.model.applications[app].units] - files = {} - if get_substrate(ops_test) == Substrate.vm: - command = "ls -1 /var/snap/charmed-postgresql/common/var/lib/postgresql/16/main/pg_wal/" - for unit in units: - stdout = await run_command_on_unit(ops_test, unit, command) - files[unit] = stdout.splitlines() - files[unit] = { - i for i in files[unit] if ".history" not in i and i != "" and i != "archive_status" - } - return files - - command = f"ls -1 {PGDATA_PATH}/pg_wal/" - for unit in units: - complete_command = f"run --unit {unit} -- {command}" - _, stdout, _ = await ops_test.juju(*complete_command.split()) - files[unit] = stdout.splitlines() - files[unit] = { - i for i in files[unit] if ".history" not in i and i != "" and i != "archive_status" - } - return files - - -async def is_connection_possible( - ops_test: OpsTest, unit_name: str, use_ip_from_inside: bool = False -) -> bool: - """Test a connection to a PostgreSQL server.""" - try: - app = unit_name.split("/")[0] - for attempt in Retrying(stop=stop_after_delay(120), wait=wait_fixed(3)): - with attempt: - password = await asyncio.wait_for( - get_password(ops_test, database_app_name=app), 15 - ) - address = await asyncio.wait_for( - get_ip_from_inside_the_unit(ops_test, unit_name) - if use_ip_from_inside - else get_unit_ip(ops_test, unit_name), - 15, - ) - - with ( - db_connect(host=address, password=password) as connection, - connection.cursor() as cursor, - ): - cursor.execute("SELECT 1;") - success = cursor.fetchone()[0] == 1 - connection.close() - - if not success: - raise Exception - return True - except RetryError: - # Error raised when the connection is not possible. - return False - - -def cut_network_from_unit(machine_name: str) -> None: - """Cut network from a lxc container. - - Args: - machine_name: lxc container hostname - """ - # apply a mask (device type `none`) - cut_network_command = f"lxc config device add {machine_name} eth0 none" - subprocess.check_call(cut_network_command.split()) - - -def cut_network_from_unit_without_ip_change(machine_name: str) -> None: - """Cut network from a lxc container (without causing the change of the unit IP address). - - Args: - machine_name: lxc container hostname - """ - override_command = f"lxc config device override {machine_name} eth0" - # Ignore if the interface was already overridden. - with contextlib.suppress(subprocess.CalledProcessError): - subprocess.check_call(override_command.split()) - limit_set_command = f"lxc config device set {machine_name} eth0 limits.egress=0kbit" - subprocess.check_call(limit_set_command.split()) - limit_set_command = f"lxc config device set {machine_name} eth0 limits.ingress=1kbit" - subprocess.check_call(limit_set_command.split()) - limit_set_command = f"lxc config device set {machine_name} eth0 limits.priority=10" - subprocess.check_call(limit_set_command.split()) - - -async def get_controller_machine(ops_test: OpsTest) -> str: - """Return controller machine hostname. - - Args: - ops_test: The ops test framework instance - - Returns: - Controller hostname (str) - """ - _, raw_controller, _ = await ops_test.juju("show-controller") - - controller = yaml.safe_load(raw_controller.strip()) - - return next( - machine.get("instance-id") - for machine in controller[ops_test.controller_name]["controller-machines"].values() - ) - - -def is_machine_reachable_from(origin_machine: str, target_machine: str) -> bool: - """Test network reachability between hosts. - - Args: - origin_machine: hostname of the machine to test connection from - target_machine: hostname of the machine to test connection to - """ - try: - subprocess.check_call(f"lxc exec {origin_machine} -- ping -c 3 {target_machine}".split()) - return True - except subprocess.CalledProcessError: - return False - - -def restore_network_for_unit(machine_name: str) -> None: - """Restore network from a lxc container. - - Args: - machine_name: lxc container hostname - """ - # remove mask from eth0 - restore_network_command = f"lxc config device remove {machine_name} eth0" - subprocess.check_call(restore_network_command.split()) - - -def restore_network_for_unit_without_ip_change(machine_name: str) -> None: - """Restore network from a lxc container (without causing the change of the unit IP address). - - Args: - machine_name: lxc container hostname - """ - limit_set_command = f"lxc config device set {machine_name} eth0 limits.egress=" - subprocess.check_call(limit_set_command.split()) - limit_set_command = f"lxc config device set {machine_name} eth0 limits.ingress=" - subprocess.check_call(limit_set_command.split()) - limit_set_command = f"lxc config device set {machine_name} eth0 limits.priority=" - subprocess.check_call(limit_set_command.split()) - - -async def wait_network_restore(ops_test: OpsTest, unit_name: str, old_ip: str) -> None: - """Wait until network is restored. - - Args: - ops_test: pytest plugin helper - unit_name: name of the unit - old_ip: old registered IP address - """ - # Retrieve the unit IP from inside the unit because it may not be updated in the - # Juju status too quickly. - if (await get_ip_from_inside_the_unit(ops_test, unit_name)) == old_ip: - raise Exception - - -def get_member_lag(cluster: dict, member_name: str) -> int: - """Return the lag of a specific member.""" - for member in cluster["members"]: - if member["name"] == member_name.replace("/", "-"): - return member.get("lag", 0) - return 0 - - -async def is_member_isolated( - ops_test: OpsTest, not_isolated_member: str, isolated_member: str -) -> bool: - """Check whether the member is isolated from the cluster.""" - # Check if the lag is too high. - unit_ip = await get_unit_address(ops_test, not_isolated_member) - try: - for attempt in Retrying(stop=stop_after_delay(60), wait=wait_fixed(3)): - with attempt: - cluster_info = get_patroni_cluster(unit_ip) - lag = get_member_lag(cluster_info, isolated_member) - assert lag > 1000 - except RetryError: - return False - - return True - - -def deploy_chaos_mesh(namespace: str) -> None: - """Deploy chaos mesh to the provided namespace. - - Args: - namespace: The namespace to deploy chaos mesh to - """ - env = os.environ - env["KUBECONFIG"] = os.path.expanduser("~/.kube/config") - - subprocess.check_output( - " ".join([ - "tests/integration/charm/ha_tests/scripts/deploy_chaos_mesh.sh", - namespace, - ]), - shell=True, - env=env, - ) - - -def destroy_chaos_mesh(namespace: str) -> None: - """Remove chaos mesh from the provided namespace. - - Args: - namespace: The namespace to deploy chaos mesh to - """ - env = os.environ - env["KUBECONFIG"] = os.path.expanduser("~/.kube/config") - - subprocess.check_output( - f"tests/integration/charm/ha_tests/scripts/destroy_chaos_mesh.sh {namespace}", - shell=True, - env=env, - ) - - -def isolate_instance_from_cluster(ops_test: OpsTest, unit_name: str) -> None: - """Apply a NetworkChaos file to use chaos-mesh to simulate a network cut.""" - with tempfile.NamedTemporaryFile() as temp_file: - with open( - "tests/integration/charm/ha_tests/manifests/chaos_network_loss.yml" - ) as chaos_network_loss_file: - template = string.Template(chaos_network_loss_file.read()) - chaos_network_loss = template.substitute( - namespace=ops_test.model.info.name, - pod=unit_name.replace("/", "-"), - ) - - temp_file.write(str.encode(chaos_network_loss)) - temp_file.flush() - - env = os.environ - env["KUBECONFIG"] = os.path.expanduser("~/.kube/config") - subprocess.check_output( - " ".join([*KUBECTL.split(), "apply", "-f", temp_file.name]), shell=True, env=env - ) - - -def remove_instance_isolation(ops_test: OpsTest) -> None: - """Delete the NetworkChaos that is isolating the primary unit of the cluster.""" - env = os.environ - env["KUBECONFIG"] = os.path.expanduser("~/.kube/config") - subprocess.check_output( - f"{KUBECTL} -n {ops_test.model.info.name} delete --ignore-not-found=true networkchaos network-loss-primary", - shell=True, - env=env, - ) - - -async def remove_charm_code(ops_test: OpsTest, unit_name: str) -> None: - """Remove src/charm.py from the PostgreSQL unit.""" - await run_command_on_unit( - ops_test, - unit_name, - f"rm /var/lib/juju/agents/unit-{unit_name.replace('/', '-')}/charm/src/charm.py", - container="charm", - ) diff --git a/tests/integration/charm/new_relations/helpers.py b/tests/integration/charm/new_relations/helpers.py deleted file mode 100644 index 1f8ae6c0..00000000 --- a/tests/integration/charm/new_relations/helpers.py +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/env python3 -# Copyright 2022 Canonical Ltd. -# See LICENSE file for licensing details. -import json - -import yaml -from lightkube import AsyncClient -from lightkube.resources.core_v1 import Service -from pytest_operator.plugin import OpsTest - -from tests.integration.charm.pytest_operator_helpers import get_substrate -from tests.integration.types import Substrate - - -async def get_juju_secret(ops_test: OpsTest, secret_uri: str) -> dict[str, str]: - """Retrieve juju secret.""" - secret_unique_id = secret_uri.split("/")[-1] - complete_command = f"show-secret {secret_uri} --reveal --format=json" - _, stdout, _ = await ops_test.juju(*complete_command.split()) - return json.loads(stdout)[secret_unique_id]["content"]["Data"] - - -async def build_connection_string( - ops_test: OpsTest, - application_name: str, - relation_name: str, - *, - relation_id: str | None = None, - relation_alias: str | None = None, - read_only_endpoint: bool = False, - database: str | None = None, -) -> str: - """Build a PostgreSQL connection string. - - Args: - ops_test: The ops test framework instance - application_name: The name of the application - relation_name: name of the relation to get connection data from - relation_id: id of the relation to get connection data from - relation_alias: alias of the relation (like a connection name) - to get connection data from - read_only_endpoint: whether to choose the read-only endpoint - instead of the read/write endpoint - database: optional database to be used in the connection string - - Returns: - a PostgreSQL connection string - """ - # Get the connection data exposed to the application through the relation. - if database is None: - database = f"{application_name.replace('-', '_')}_{relation_name.replace('-', '_')}" - - if secret_uri := await get_application_relation_data( - ops_test, - application_name, - relation_name, - "secret-user", - relation_id, - relation_alias, - ): - secret_data = await get_juju_secret(ops_test, secret_uri) - username = secret_data["username"] - password = secret_data["password"] - else: - username = await get_application_relation_data( - ops_test, application_name, relation_name, "username", relation_id, relation_alias - ) - password = await get_application_relation_data( - ops_test, application_name, relation_name, "password", relation_id, relation_alias - ) - - endpoints = await get_application_relation_data( - ops_test, - application_name, - relation_name, - "read-only-endpoints" if read_only_endpoint else "endpoints", - relation_id, - relation_alias, - ) - host = endpoints.split(",")[0].split(":")[0] - - if get_substrate(ops_test) == Substrate.k8s: - # Translate the service hostname to an IP address. - model = ops_test.model.info - client = AsyncClient(namespace=model.name) - service = await client.get(Service, name=host.split(".")[0]) - host = service.spec.clusterIP - - # Build the complete connection string to connect to the database. - return f"dbname='{database}' user='{username}' host='{host}' password='{password}' connect_timeout=10" - - -async def get_alias_from_relation_data( - ops_test: OpsTest, unit_name: str, related_unit_name: str -) -> str | None: - """Get the alias that the unit assigned to the related unit application/cluster. - - Args: - ops_test: The ops test framework instance - unit_name: The name of the unit - related_unit_name: name of the related unit - - Returns: - the alias for the application/cluster of - the related unit - - Raises: - ValueError if it's not possible to get unit data - or if there is no alias on that. - """ - raw_data = (await ops_test.juju("show-unit", related_unit_name))[1] - if not raw_data: - raise ValueError(f"no unit info could be grabbed for {related_unit_name}") - data = yaml.safe_load(raw_data) - - # Retrieve the relation data from the unit. - relation_data = {} - for relation in data[related_unit_name]["relation-info"]: - for name, unit in relation["related-units"].items(): - if name == unit_name: - relation_data = unit["data"] - break - - # Check whether the unit has set an alias for the related unit application/cluster. - if "alias" not in relation_data: - raise ValueError(f"no alias could be grabbed for {related_unit_name} application/cluster") - - return relation_data["alias"] - - -async def get_application_relation_data( - ops_test: OpsTest, - application_name: str, - relation_name: str, - key: str, - relation_id: str | None = None, - relation_alias: str | None = None, -) -> str | None: - """Get relation data for an application. - - Args: - ops_test: The ops test framework instance - application_name: The name of the application - relation_name: name of the relation to get connection data from - key: key of data to be retrieved - relation_id: id of the relation to get connection data from - relation_alias: alias of the relation (like a connection name) - to get connection data from - - Returns: - the data that was requested or None - if no data in the relation - - Raises: - ValueError if it's not possible to get application data - or if there is no data for the particular relation endpoint - and/or alias. - """ - unit_name = f"{application_name}/0" - raw_data = (await ops_test.juju("show-unit", unit_name))[1] - if not raw_data: - raise ValueError(f"no unit info could be grabbed for {unit_name}") - data = yaml.safe_load(raw_data) - # Filter the data based on the relation name. - relation_data = [v for v in data[unit_name]["relation-info"] if v["endpoint"] == relation_name] - if relation_id: - # Filter the data based on the relation id. - relation_data = [v for v in relation_data if v["relation-id"] == relation_id] - if relation_alias: - # Filter the data based on the cluster/relation alias. - relation_data = [ - v - for v in relation_data - if await get_alias_from_relation_data( - ops_test, unit_name, next(iter(v["related-units"])) - ) - == relation_alias - ] - if len(relation_data) == 0: - raise ValueError( - f"no relation data could be grabbed on relation with endpoint {relation_name} and alias {relation_alias}" - ) - return relation_data[0]["application-data"].get(key) diff --git a/tests/integration/charm/pytest_operator_helpers.py b/tests/integration/charm/pytest_operator_helpers.py deleted file mode 100644 index 8ecf8b63..00000000 --- a/tests/integration/charm/pytest_operator_helpers.py +++ /dev/null @@ -1,385 +0,0 @@ -#!/usr/bin/env python3 -# Copyright 2022 Canonical Ltd. -# See LICENSE file for licensing details. - -"""pytest-operator helpers shared by the VM and K8s tests (tests/integration/helpers.py of both repos). - -Only for the tests that use pytest-operator in both repos; the rest use charm/helpers.py. -""" - -import json -import logging -import subprocess -from subprocess import check_call - -import requests -from juju.model import Model -from juju.unit import Unit -from pytest_operator.plugin import OpsTest -from single_kernel_postgresql.config.literals import PEER_RELATION, SYSTEM_USERS_PASSWORD_CONFIG -from tenacity import Retrying, stop_after_delay, wait_fixed - -from tests.integration.helpers.postgresql import execute_query -from tests.integration.types import Substrate - -CHARM_BASE = "ubuntu@24.04" -APPLICATION_NAME = "postgresql-test-app" -PGDATA_PATH = "/var/lib/postgresql/16/main" - - -class SecretNotFoundError(Exception): - """Raised when a secret is not found.""" - - -try: - check_call(["kubectl", "version", "--client=true"]) - KUBECTL = "kubectl" -except FileNotFoundError: - KUBECTL = "sudo k8s kubectl" - -logger = logging.getLogger(__name__) - - -def get_substrate(ops_test: OpsTest) -> Substrate: - """Return the substrate of the ops_test model (a caas model on K8s).""" - return Substrate.k8s if ops_test.model.info.type_ == "caas" else Substrate.vm - - -async def app_name( - ops_test: OpsTest, application_name: str = "postgresql", model: Model = None -) -> str | None: - """Returns the name of the cluster running PostgreSQL. - - This is important since not all deployments of the PostgreSQL charm have the application name - "postgresql". - - Note: if multiple clusters are running PostgreSQL this will return the one first found. - """ - if model is None: - model = ops_test.model - status = await model.get_status() - for app in model.applications: - if ( - application_name in status["applications"][app]["charm"] - and APPLICATION_NAME not in status["applications"][app]["charm"] - ): - return app - - return None - - -async def get_leader_unit(ops_test: OpsTest, app: str, model: Model = None) -> Unit | None: - if model is None: - model = ops_test.model - - leader_unit = None - for unit in model.applications[app].units: - if await unit.is_leader_from_status(): - leader_unit = unit - break - - return leader_unit - - -def get_patroni_cluster(unit_ip: str) -> dict[str, str]: - for attempt in Retrying(stop=stop_after_delay(30), wait=wait_fixed(3)): - with attempt: - resp = requests.get(f"https://{unit_ip}:8008/cluster", verify=False) - return resp.json() - - -async def get_machine_from_unit(ops_test: OpsTest, unit_name: str) -> str: - """Get the name of the machine from a specific unit. - - Args: - ops_test: The ops test framework instance - unit_name: The name of the unit to get the machine - - Returns: - The name of the machine. - """ - raw_hostname = await run_command_on_unit(ops_test, unit_name, "hostname") - return raw_hostname.strip() - - -async def get_password( - ops_test: OpsTest, - username: str = "operator", - database_app_name: str | None = None, -) -> str: - """Retrieve a user password from the secret. - - Args: - ops_test: ops_test instance. - username: the user to get the password. - database_app_name: the app for getting the secret (defaults to the PostgreSQL cluster) - - Returns: - the user password. - """ - if database_app_name is None: - database_app_name = await app_name(ops_test) - secret = await get_secret_by_label(ops_test, label=f"{PEER_RELATION}.{database_app_name}.app") - password = secret.get(f"{username}-password") - - return password - - -async def get_secret_by_label(ops_test: OpsTest, label: str) -> dict[str, str]: - secrets_raw = await ops_test.juju("list-secrets") - secret_ids = [ - secret_line.split()[0] for secret_line in secrets_raw[1].split("\n")[1:] if secret_line - ] - - for secret_id in secret_ids: - secret_data_raw = await ops_test.juju( - "show-secret", "--format", "json", "--reveal", secret_id - ) - secret_data = json.loads(secret_data_raw[1]) - - if label == secret_data[secret_id].get("label"): - return secret_data[secret_id]["content"]["Data"] - - raise SecretNotFoundError(f"Secret with label {label} not found") - - -async def get_primary(ops_test: OpsTest, app, down_unit: str | None = None) -> str: - """Use the charm action to retrieve the primary from provided application. - - Args: - ops_test: OpsTest instance. - app: database application name. - down_unit: unit that is offline and the action won't run on. - - Returns: - primary unit name. - """ - for unit in ops_test.model.applications[app].units: - if unit.name != down_unit: - action = await unit.run_action("get-primary") - action = await action.wait() - primary = action.results.get("primary", "None") - if primary == "None": - continue - return primary - return None - - -async def get_unit_address(ops_test: OpsTest, unit_name: str) -> str: - """Get unit IP address. - - Args: - ops_test: The ops test framework instance - unit_name: The name of the unit - - Returns: - IP address of the unit - """ - if get_substrate(ops_test) == Substrate.vm: - return ops_test.model.units.get(unit_name).public_address - status = await ops_test.model.get_status() - return status["applications"][unit_name.split("/")[0]].units[unit_name]["address"] - - -async def run_command_on_unit( - ops_test: OpsTest, unit_name: str, command: str, container: str = "postgresql" -) -> str: - """Run a command on a specific unit (in the selected container on K8s). - - Args: - ops_test: The ops test framework instance - unit_name: The name of the unit to run the command on - command: The command to run - container: The K8s container to run the command in (ignored on VM). - - Returns: - the command output if it succeeds, otherwise raises an exception. - """ - if get_substrate(ops_test) == Substrate.vm: - complete_command = ["exec", "--unit", unit_name, "--", *command.split()] - return_code, stdout, _ = await ops_test.juju(*complete_command) - if return_code != 0: - logger.error(stdout) - raise Exception( - f"Expected command '{command}' to succeed instead it failed: {return_code}" - ) - return stdout - - complete_command = f"ssh --container {container} {unit_name} {command}" - return_code, stdout, stderr = await ops_test.juju(*complete_command.split()) - if return_code != 0: - raise Exception( - f"Expected command {command} to succeed instead it failed: {stderr}. Code: {return_code}" - ) - return stdout - - -async def scale_application( - ops_test: OpsTest, application_name: str, count: int, model: Model = None -) -> None: - """Scale a given application to a specific unit count. - - Args: - ops_test: The ops test framework instance - application_name: The name of the application - count: The desired number of units to scale to - model: The model to scale the application in - """ - if model is None: - model = ops_test.model - if get_substrate(ops_test) == Substrate.vm: - change = count - len(model.applications[application_name].units) - if change > 0: - await model.applications[application_name].add_units(change) - elif change < 0: - units = [unit.name for unit in model.applications[application_name].units[0:-change]] - await model.applications[application_name].destroy_units(*units) - await model.wait_for_idle( - apps=[application_name], - status="active", - timeout=2000, - idle_period=30, - wait_for_exact_units=count, - ) - return - - await model.applications[application_name].scale(count) - if count == 0: - await model.block_until( - lambda: len(model.applications[application_name].units) == count, timeout=1200 - ) - else: - await model.wait_for_idle( - apps=[application_name], - status="active", - timeout=1200, - wait_for_exact_units=count, - idle_period=2, - ) - - -def assert_sync_standbys(unit_ip: str, standbys: int) -> None: - for attempt in Retrying(stop=stop_after_delay(60), wait=wait_fixed(3), reraise=True): - with attempt: - cluster = get_patroni_cluster(unit_ip) - cluster_standbys = 0 - for member in cluster["members"]: - if member["role"] == "sync_standby": - cluster_standbys += 1 - assert cluster_standbys >= standbys, "Less than expected standbys" - - -async def check_database_users_existence( - ops_test: OpsTest, - users_that_should_exist: list[str], - users_that_should_not_exist: list[str], - admin: bool = False, - database_app_name: str | None = None, -) -> None: - """Checks that applications users exist in the database. - - Args: - ops_test: The ops test framework - users_that_should_exist: List of users that should exist in the database - users_that_should_not_exist: List of users that should not exist in the database - admin: Whether to check if the existing users are superusers - database_app_name: Optional database app name - (defaults to the PostgreSQL cluster) - """ - if database_app_name is None: - database_app_name = await app_name(ops_test) - unit = ops_test.model.applications[database_app_name].units[0] - unit_address = await get_unit_address(ops_test, unit.name) - password = await get_password(ops_test, database_app_name=database_app_name) - - # Retrieve all users in the database. - output = execute_query( - unit_address, - password, - ( - "SELECT CONCAT(usename, ':', usesuper) FROM pg_catalog.pg_user;" - if admin - else "SELECT usename FROM pg_catalog.pg_user;" - ), - ) - - # Assert users that should exist. - for user in users_that_should_exist: - if admin: - # The t flag indicates the user is a superuser. - assert f"{user}:t" in output - else: - assert user in output - - # Assert users that should not exist. - for user in users_that_should_not_exist: - assert user not in output - - -async def start_machine(ops_test: OpsTest, machine_name: str) -> None: - """Start the machine where a unit run on. - - Args: - ops_test: The ops test framework instance - machine_name: The name of the machine to start - """ - start_machine_command = f"lxc start {machine_name}" - subprocess.check_call(start_machine_command.split()) - - -async def stop_machine(ops_test: OpsTest, machine_name: str) -> None: - """Stop the machine where a unit run on. - - Args: - ops_test: The ops test framework instance - machine_name: The name of the machine to stop - """ - stop_machine_command = f"lxc stop {machine_name}" - subprocess.check_call(stop_machine_command.split()) - - -async def reused_full_cluster_recovery_storage(ops_test: OpsTest, unit_name) -> bool: - """Returns True if storage provided to Postgresql has been reused. - - Checks Patroni logs for when the database was in archive mode or shut down. - """ - await run_command_on_unit( - ops_test, - unit_name, - "grep -E 'Database cluster state: in archive recovery|Database cluster state: shut down' " - "/var/snap/charmed-postgresql/common/var/log/patroni/patroni.log*", - ) - return True - - -async def set_password( - ops_test: OpsTest, - database_app_name: str, - username: str = "operator", - password: str | None = None, -): - """Set a user password via secret. - - Args: - ops_test: ops_test instance. - username: the user to set the password. - password: optional password to use - instead of auto-generating - database_app_name: name of the app for the secret - """ - secret_name = "system_users_secret" - - try: - secret_id = await ops_test.model.add_secret( - name=secret_name, data_args=[f"{username}={password}"] - ) - await ops_test.model.grant_secret(secret_name=secret_name, application=database_app_name) - - # update the application config to include the secret - await ops_test.model.applications[database_app_name].set_config({ - SYSTEM_USERS_PASSWORD_CONFIG: secret_id - }) - except Exception: - await ops_test.model.update_secret( - name=secret_name, data_args=[f"{username}={password}"], new_name=secret_name - ) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 33b3a97d..4d9e2299 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -19,7 +19,26 @@ def pytest_addoption(parser: pytest.Parser) -> None: - # --controller, --model and --keep-models come from pytest-operator. + parser.addoption( + "--controller", + action="store", + help="Juju controller to use; defaults to the current controller.", + ) + parser.addoption( + "--model", + action="store", + help="Juju model to use; defaults to a temporary model for each test module.", + ) + parser.addoption( + "--keep-models", + action="store_true", + help="Keep temporary models after the tests.", + ) + parser.addoption( + "--no-deploy", + action="store_true", + help="Skip tests marked skip_if_deployed; requires --model.", + ) parser.addoption( "--substrate", choices=[substrate.value for substrate in Substrate], @@ -29,6 +48,11 @@ def pytest_addoption(parser: pytest.Parser) -> None: def pytest_configure(config: pytest.Config) -> None: + if config.getoption("--no-deploy") and not config.getoption("--model"): + raise pytest.UsageError("must specify --model when using --no-deploy") + config.addinivalue_line( + "markers", "skip_if_deployed: skip deployment when --no-deploy is specified" + ) config.addinivalue_line("markers", "vm_only: run the test only on the VM substrate") config.addinivalue_line("markers", "k8s_only: run the test only on the K8s substrate") config.addinivalue_line( @@ -45,6 +69,8 @@ def pytest_runtest_makereport(item: pytest.Item, call: pytest.CallInfo): def pytest_runtest_setup(item: pytest.Item) -> None: + if item.get_closest_marker("skip_if_deployed") and item.config.getoption("--no-deploy"): + pytest.skip("Skipping deployment because --no-deploy was specified.") aborted_by = item.getparent(pytest.Module).stash.get(ABORTED_BY, None) if aborted_by: pytest.skip(f"aborted: {aborted_by} failed") diff --git a/tox.ini b/tox.ini index 29f45dc1..4dd0a225 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,6 @@ all_path = {[vars]src_path} {[vars]tests_path} [testenv] set_env = PYTHONPATH = {src_path} - PYTHONBREAKPOINT=ipdb.set_trace PY_COLORS = 1 pass_env = PYTHONPATH diff --git a/uv.lock b/uv.lock index 6eb0869d..1ec92dc6 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 5 +revision = 3 requires-python = ">=3.8, <4.0" resolution-markers = [ "python_full_version >= '3.14'", @@ -75,15 +75,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/da/35/f2287558c17e29fafc8ef3daf819bb9834061cfa43bff8014f7df7f63bdc/anyio-4.14.2-py3-none-any.whl", hash = "sha256:9f505dda5ac9f0c8309b5e8bd445a8c2bf7246f3ce950121e45ea15bc41d1494", size = 125813, upload-time = "2026-07-12T20:29:05.763Z" }, ] -[[package]] -name = "asttokens" -version = "3.0.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/25/1e/faf0f247f6f881b98fc4d6d07e14085cb89d13665084e6d6ac1dc2c03d0b/asttokens-3.0.2.tar.gz", hash = "sha256:3ecdbd8f2cc195f53ccada3a613538bb5f9ef6f6869129f13e03c30a677b8fe2", size = 63136, upload-time = "2026-07-12T03:31:49.084Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d4/2b/04b8a15f3a1c77bc79ddf5c73875327f34b4fa75982df2b76e45e402d364/asttokens-3.0.2-py3-none-any.whl", hash = "sha256:9da13157f5b28becde0bd374fc677dcd3c290614264eff096f167c469cd9f933", size = 28702, upload-time = "2026-07-12T03:31:47.542Z" }, -] - [[package]] name = "attrs" version = "26.1.0" @@ -93,130 +84,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" }, ] -[[package]] -name = "backports-datetime-fromisoformat" -version = "2.0.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/71/81/eff3184acb1d9dc3ce95a98b6f3c81a49b4be296e664db8e1c2eeabef3d9/backports_datetime_fromisoformat-2.0.3.tar.gz", hash = "sha256:b58edc8f517b66b397abc250ecc737969486703a66eb97e01e6d51291b1a139d", size = 23588, upload-time = "2024-12-28T20:18:15.017Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/42/4b/d6b051ca4b3d76f23c2c436a9669f3be616b8cf6461a7e8061c7c4269642/backports_datetime_fromisoformat-2.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5f681f638f10588fa3c101ee9ae2b63d3734713202ddfcfb6ec6cea0778a29d4", size = 27561, upload-time = "2024-12-28T20:16:47.974Z" }, - { url = "https://files.pythonhosted.org/packages/6d/40/e39b0d471e55eb1b5c7c81edab605c02f71c786d59fb875f0a6f23318747/backports_datetime_fromisoformat-2.0.3-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:cd681460e9142f1249408e5aee6d178c6d89b49e06d44913c8fdfb6defda8d1c", size = 34448, upload-time = "2024-12-28T20:16:50.712Z" }, - { url = "https://files.pythonhosted.org/packages/f2/28/7a5c87c5561d14f1c9af979231fdf85d8f9fad7a95ff94e56d2205e2520a/backports_datetime_fromisoformat-2.0.3-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:ee68bc8735ae5058695b76d3bb2aee1d137c052a11c8303f1e966aa23b72b65b", size = 27093, upload-time = "2024-12-28T20:16:52.994Z" }, - { url = "https://files.pythonhosted.org/packages/80/ba/f00296c5c4536967c7d1136107fdb91c48404fe769a4a6fd5ab045629af8/backports_datetime_fromisoformat-2.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8273fe7932db65d952a43e238318966eab9e49e8dd546550a41df12175cc2be4", size = 52836, upload-time = "2024-12-28T20:16:55.283Z" }, - { url = "https://files.pythonhosted.org/packages/e3/92/bb1da57a069ddd601aee352a87262c7ae93467e66721d5762f59df5021a6/backports_datetime_fromisoformat-2.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39d57ea50aa5a524bb239688adc1d1d824c31b6094ebd39aa164d6cadb85de22", size = 52798, upload-time = "2024-12-28T20:16:56.64Z" }, - { url = "https://files.pythonhosted.org/packages/df/ef/b6cfd355982e817ccdb8d8d109f720cab6e06f900784b034b30efa8fa832/backports_datetime_fromisoformat-2.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ac6272f87693e78209dc72e84cf9ab58052027733cd0721c55356d3c881791cf", size = 52891, upload-time = "2024-12-28T20:16:58.887Z" }, - { url = "https://files.pythonhosted.org/packages/37/39/b13e3ae8a7c5d88b68a6e9248ffe7066534b0cfe504bf521963e61b6282d/backports_datetime_fromisoformat-2.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:44c497a71f80cd2bcfc26faae8857cf8e79388e3d5fbf79d2354b8c360547d58", size = 52955, upload-time = "2024-12-28T20:17:00.028Z" }, - { url = "https://files.pythonhosted.org/packages/1e/e4/70cffa3ce1eb4f2ff0c0d6f5d56285aacead6bd3879b27a2ba57ab261172/backports_datetime_fromisoformat-2.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:6335a4c9e8af329cb1ded5ab41a666e1448116161905a94e054f205aa6d263bc", size = 29323, upload-time = "2024-12-28T20:17:01.125Z" }, - { url = "https://files.pythonhosted.org/packages/62/f5/5bc92030deadf34c365d908d4533709341fb05d0082db318774fdf1b2bcb/backports_datetime_fromisoformat-2.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e2e4b66e017253cdbe5a1de49e0eecff3f66cd72bcb1229d7db6e6b1832c0443", size = 27626, upload-time = "2024-12-28T20:17:03.448Z" }, - { url = "https://files.pythonhosted.org/packages/28/45/5885737d51f81dfcd0911dd5c16b510b249d4c4cf6f4a991176e0358a42a/backports_datetime_fromisoformat-2.0.3-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:43e2d648e150777e13bbc2549cc960373e37bf65bd8a5d2e0cef40e16e5d8dd0", size = 34588, upload-time = "2024-12-28T20:17:04.459Z" }, - { url = "https://files.pythonhosted.org/packages/bc/6d/bd74de70953f5dd3e768c8fc774af942af0ce9f211e7c38dd478fa7ea910/backports_datetime_fromisoformat-2.0.3-cp311-cp311-macosx_11_0_x86_64.whl", hash = "sha256:4ce6326fd86d5bae37813c7bf1543bae9e4c215ec6f5afe4c518be2635e2e005", size = 27162, upload-time = "2024-12-28T20:17:06.752Z" }, - { url = "https://files.pythonhosted.org/packages/47/ba/1d14b097f13cce45b2b35db9898957578b7fcc984e79af3b35189e0d332f/backports_datetime_fromisoformat-2.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7c8fac333bf860208fd522a5394369ee3c790d0aa4311f515fcc4b6c5ef8d75", size = 54482, upload-time = "2024-12-28T20:17:08.15Z" }, - { url = "https://files.pythonhosted.org/packages/25/e9/a2a7927d053b6fa148b64b5e13ca741ca254c13edca99d8251e9a8a09cfe/backports_datetime_fromisoformat-2.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24a4da5ab3aa0cc293dc0662a0c6d1da1a011dc1edcbc3122a288cfed13a0b45", size = 54362, upload-time = "2024-12-28T20:17:10.605Z" }, - { url = "https://files.pythonhosted.org/packages/c1/99/394fb5e80131a7d58c49b89e78a61733a9994885804a0bb582416dd10c6f/backports_datetime_fromisoformat-2.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:58ea11e3bf912bd0a36b0519eae2c5b560b3cb972ea756e66b73fb9be460af01", size = 54162, upload-time = "2024-12-28T20:17:12.301Z" }, - { url = "https://files.pythonhosted.org/packages/88/25/1940369de573c752889646d70b3fe8645e77b9e17984e72a554b9b51ffc4/backports_datetime_fromisoformat-2.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:8a375c7dbee4734318714a799b6c697223e4bbb57232af37fbfff88fb48a14c6", size = 54118, upload-time = "2024-12-28T20:17:13.609Z" }, - { url = "https://files.pythonhosted.org/packages/b7/46/f275bf6c61683414acaf42b2df7286d68cfef03e98b45c168323d7707778/backports_datetime_fromisoformat-2.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:ac677b1664c4585c2e014739f6678137c8336815406052349c85898206ec7061", size = 29329, upload-time = "2024-12-28T20:17:16.124Z" }, - { url = "https://files.pythonhosted.org/packages/a2/0f/69bbdde2e1e57c09b5f01788804c50e68b29890aada999f2b1a40519def9/backports_datetime_fromisoformat-2.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:66ce47ee1ba91e146149cf40565c3d750ea1be94faf660ca733d8601e0848147", size = 27630, upload-time = "2024-12-28T20:17:19.442Z" }, - { url = "https://files.pythonhosted.org/packages/d5/1d/1c84a50c673c87518b1adfeafcfd149991ed1f7aedc45d6e5eac2f7d19d7/backports_datetime_fromisoformat-2.0.3-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:8b7e069910a66b3bba61df35b5f879e5253ff0821a70375b9daf06444d046fa4", size = 34707, upload-time = "2024-12-28T20:17:21.79Z" }, - { url = "https://files.pythonhosted.org/packages/71/44/27eae384e7e045cda83f70b551d04b4a0b294f9822d32dea1cbf1592de59/backports_datetime_fromisoformat-2.0.3-cp312-cp312-macosx_11_0_x86_64.whl", hash = "sha256:a3b5d1d04a9e0f7b15aa1e647c750631a873b298cdd1255687bb68779fe8eb35", size = 27280, upload-time = "2024-12-28T20:17:24.503Z" }, - { url = "https://files.pythonhosted.org/packages/a7/7a/a4075187eb6bbb1ff6beb7229db5f66d1070e6968abeb61e056fa51afa5e/backports_datetime_fromisoformat-2.0.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec1b95986430e789c076610aea704db20874f0781b8624f648ca9fb6ef67c6e1", size = 55094, upload-time = "2024-12-28T20:17:25.546Z" }, - { url = "https://files.pythonhosted.org/packages/71/03/3fced4230c10af14aacadc195fe58e2ced91d011217b450c2e16a09a98c8/backports_datetime_fromisoformat-2.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffe5f793db59e2f1d45ec35a1cf51404fdd69df9f6952a0c87c3060af4c00e32", size = 55605, upload-time = "2024-12-28T20:17:29.208Z" }, - { url = "https://files.pythonhosted.org/packages/f6/0a/4b34a838c57bd16d3e5861ab963845e73a1041034651f7459e9935289cfd/backports_datetime_fromisoformat-2.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:620e8e73bd2595dfff1b4d256a12b67fce90ece3de87b38e1dde46b910f46f4d", size = 55353, upload-time = "2024-12-28T20:17:32.433Z" }, - { url = "https://files.pythonhosted.org/packages/d9/68/07d13c6e98e1cad85606a876367ede2de46af859833a1da12c413c201d78/backports_datetime_fromisoformat-2.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4cf9c0a985d68476c1cabd6385c691201dda2337d7453fb4da9679ce9f23f4e7", size = 55298, upload-time = "2024-12-28T20:17:34.919Z" }, - { url = "https://files.pythonhosted.org/packages/60/33/45b4d5311f42360f9b900dea53ab2bb20a3d61d7f9b7c37ddfcb3962f86f/backports_datetime_fromisoformat-2.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:d144868a73002e6e2e6fef72333e7b0129cecdd121aa8f1edba7107fd067255d", size = 29375, upload-time = "2024-12-28T20:17:36.018Z" }, - { url = "https://files.pythonhosted.org/packages/d0/d6/5f85db8ffa880ddfbb551a4a30a7d0fcb496431ed5ec06b15d67b4ce75d7/backports_datetime_fromisoformat-2.0.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e81b26497a17c29595bc7df20bc6a872ceea5f8c9d6537283945d4b6396aec10", size = 27545, upload-time = "2024-12-28T20:17:38.707Z" }, - { url = "https://files.pythonhosted.org/packages/c9/0e/7e520925029fcc4c8fc7d0272d105c2e7230c29009c62ce15503ada714b2/backports_datetime_fromisoformat-2.0.3-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:5ba00ead8d9d82fd6123eb4891c566d30a293454e54e32ff7ead7644f5f7e575", size = 34454, upload-time = "2024-12-28T20:17:41.209Z" }, - { url = "https://files.pythonhosted.org/packages/ef/b7/b8f6e8dda72b224601918dc6e58d7e7c4f1373494b641c4a7c04a8d7469f/backports_datetime_fromisoformat-2.0.3-cp38-cp38-macosx_11_0_x86_64.whl", hash = "sha256:24d574cb4072e1640b00864e94c4c89858033936ece3fc0e1c6f7179f120d0a8", size = 27090, upload-time = "2024-12-28T20:17:43.609Z" }, - { url = "https://files.pythonhosted.org/packages/72/5a/346715e3a36e6dbe6f76238c8d42d2f606f7bd53371b829568ff012469a5/backports_datetime_fromisoformat-2.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9735695a66aad654500b0193525e590c693ab3368478ce07b34b443a1ea5e824", size = 52425, upload-time = "2024-12-28T20:17:44.656Z" }, - { url = "https://files.pythonhosted.org/packages/ce/fb/ce8c282da10f3e42c9677a825038f4904ff3ef34e384adb2fedb35754192/backports_datetime_fromisoformat-2.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63d39709e17eb72685d052ac82acf0763e047f57c86af1b791505b1fec96915d", size = 52357, upload-time = "2024-12-28T20:17:47.239Z" }, - { url = "https://files.pythonhosted.org/packages/4d/fb/80b12b769aa9af01e4f5653e05d820dffc99e28f47b9429c4a707cb94c47/backports_datetime_fromisoformat-2.0.3-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:1ea2cc84224937d6b9b4c07f5cb7c667f2bde28c255645ba27f8a675a7af8234", size = 51887, upload-time = "2024-12-28T20:17:48.361Z" }, - { url = "https://files.pythonhosted.org/packages/58/29/ec772891233d09f9e2bcec24c3d1c43a122315e55de0010fdaa14a8ef7b3/backports_datetime_fromisoformat-2.0.3-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:4024e6d35a9fdc1b3fd6ac7a673bd16cb176c7e0b952af6428b7129a70f72cce", size = 52060, upload-time = "2024-12-28T20:17:49.545Z" }, - { url = "https://files.pythonhosted.org/packages/08/5c/10eb5e8aee03f97485a8c7eed148420d70f6cc14a3de72e10fb9ba02b9e9/backports_datetime_fromisoformat-2.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:5e2dcc94dc9c9ab8704409d86fcb5236316e9dcef6feed8162287634e3568f4c", size = 29331, upload-time = "2024-12-28T20:17:53.405Z" }, - { url = "https://files.pythonhosted.org/packages/36/bf/990ac5a4f86fdb92d435511bb80a9e66f0a8dd87e76ae00dd062db2cf649/backports_datetime_fromisoformat-2.0.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fa2de871801d824c255fac7e5e7e50f2be6c9c376fd9268b40c54b5e9da91f42", size = 27548, upload-time = "2024-12-28T20:17:55.065Z" }, - { url = "https://files.pythonhosted.org/packages/c6/e8/8f49cfc187df0231a1c1bcf780bbdb3d1c391dccafc3510cd033b637f836/backports_datetime_fromisoformat-2.0.3-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:1314d4923c1509aa9696712a7bc0c7160d3b7acf72adafbbe6c558d523f5d491", size = 34445, upload-time = "2024-12-28T20:17:56.134Z" }, - { url = "https://files.pythonhosted.org/packages/06/25/4ac60683f383d51337620ef6f5ff56438174b18f5d6a66f71da2ea4acd26/backports_datetime_fromisoformat-2.0.3-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:b750ecba3a8815ad8bc48311552f3f8ab99dd2326d29df7ff670d9c49321f48f", size = 27093, upload-time = "2024-12-28T20:17:57.17Z" }, - { url = "https://files.pythonhosted.org/packages/c7/ea/561edac54f9a1440a4bce0aecc291e5155e734ab42db88ce24cd1cccf288/backports_datetime_fromisoformat-2.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2d5117dce805d8a2f78baeddc8c6127281fa0a5e2c40c6dd992ba6b2b367876", size = 52352, upload-time = "2024-12-28T20:17:59.642Z" }, - { url = "https://files.pythonhosted.org/packages/43/aa/98ed742a9a1bd88f5ead7852eb1d2fc828cba96b46340b70fc216a7f4b70/backports_datetime_fromisoformat-2.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb35f607bd1cbe37b896379d5f5ed4dc298b536f4b959cb63180e05cacc0539d", size = 52314, upload-time = "2024-12-28T20:18:00.771Z" }, - { url = "https://files.pythonhosted.org/packages/c7/ab/5b8f8c0be6a563f00bf2ecefff18beb6daf1e78025c0d823f581bf0a879f/backports_datetime_fromisoformat-2.0.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:61c74710900602637d2d145dda9720c94e303380803bf68811b2a151deec75c2", size = 52488, upload-time = "2024-12-28T20:18:01.888Z" }, - { url = "https://files.pythonhosted.org/packages/20/14/fef93556a022530525c77729f94eab3452568a11f7893cbcd76e06b398e8/backports_datetime_fromisoformat-2.0.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:ece59af54ebf67ecbfbbf3ca9066f5687879e36527ad69d8b6e3ac565d565a62", size = 52555, upload-time = "2024-12-28T20:18:03.065Z" }, - { url = "https://files.pythonhosted.org/packages/2f/bf/e1a2fe6ec0ce2b983d7cc93c43b41334f595fd7793aa35afbd02737c5e75/backports_datetime_fromisoformat-2.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:d0a7c5f875068efe106f62233bc712d50db4d07c13c7db570175c7857a7b5dbd", size = 29331, upload-time = "2024-12-28T20:18:05.494Z" }, - { url = "https://files.pythonhosted.org/packages/be/03/7eaa9f9bf290395d57fd30d7f1f2f9dff60c06a31c237dc2beb477e8f899/backports_datetime_fromisoformat-2.0.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:90e202e72a3d5aae673fcc8c9a4267d56b2f532beeb9173361293625fe4d2039", size = 28980, upload-time = "2024-12-28T20:18:06.554Z" }, - { url = "https://files.pythonhosted.org/packages/47/80/a0ecf33446c7349e79f54cc532933780341d20cff0ee12b5bfdcaa47067e/backports_datetime_fromisoformat-2.0.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2df98ef1b76f5a58bb493dda552259ba60c3a37557d848e039524203951c9f06", size = 28449, upload-time = "2024-12-28T20:18:07.77Z" }, - { url = "https://files.pythonhosted.org/packages/3b/7b/588dc0ab9d01638de461c18390756c1337c14f8f28451d5e8fc62341724c/backports_datetime_fromisoformat-2.0.3-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7100adcda5e818b5a894ad0626e38118bb896a347f40ebed8981155675b9ba7b", size = 28977, upload-time = "2024-12-28T20:18:08.875Z" }, - { url = "https://files.pythonhosted.org/packages/18/32/33ee65947b6e07918de4a2aa30a37e8bf7a0a726579cc3f21498bc3841dd/backports_datetime_fromisoformat-2.0.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e410383f5d6a449a529d074e88af8bc80020bb42b402265f9c02c8358c11da5", size = 28385, upload-time = "2024-12-28T20:18:11.335Z" }, - { url = "https://files.pythonhosted.org/packages/93/a3/ef965bee678d5dfbabfd85283d8a9caf125b11c394174eceb76707e64334/backports_datetime_fromisoformat-2.0.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2797593760da6bcc32c4a13fa825af183cd4bfd333c60b3dbf84711afca26ef", size = 28978, upload-time = "2024-12-28T20:18:12.441Z" }, - { url = "https://files.pythonhosted.org/packages/dc/e7/910935727b5c0e4975820d0ae5c9489d111859c651109f72208a8a28105b/backports_datetime_fromisoformat-2.0.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:35a144fd681a0bea1013ccc4cd3fd4dc758ea17ee23dca019c02b82ec46fc0c4", size = 28437, upload-time = "2024-12-28T20:18:13.465Z" }, -] - -[[package]] -name = "bcrypt" -version = "5.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d4/36/3329e2518d70ad8e2e5817d5a4cac6bba05a47767ec416c7d020a965f408/bcrypt-5.0.0.tar.gz", hash = "sha256:f748f7c2d6fd375cc93d3fba7ef4a9e3a092421b8dbf34d8d4dc06be9492dfdd", size = 25386, upload-time = "2025-09-25T19:50:47.829Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/13/85/3e65e01985fddf25b64ca67275bb5bdb4040bd1a53b66d355c6c37c8a680/bcrypt-5.0.0-cp313-cp313t-macosx_10_12_universal2.whl", hash = "sha256:f3c08197f3039bec79cee59a606d62b96b16669cff3949f21e74796b6e3cd2be", size = 481806, upload-time = "2025-09-25T19:49:05.102Z" }, - { url = "https://files.pythonhosted.org/packages/44/dc/01eb79f12b177017a726cbf78330eb0eb442fae0e7b3dfd84ea2849552f3/bcrypt-5.0.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:200af71bc25f22006f4069060c88ed36f8aa4ff7f53e67ff04d2ab3f1e79a5b2", size = 268626, upload-time = "2025-09-25T19:49:06.723Z" }, - { url = "https://files.pythonhosted.org/packages/8c/cf/e82388ad5959c40d6afd94fb4743cc077129d45b952d46bdc3180310e2df/bcrypt-5.0.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:baade0a5657654c2984468efb7d6c110db87ea63ef5a4b54732e7e337253e44f", size = 271853, upload-time = "2025-09-25T19:49:08.028Z" }, - { url = "https://files.pythonhosted.org/packages/ec/86/7134b9dae7cf0efa85671651341f6afa695857fae172615e960fb6a466fa/bcrypt-5.0.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:c58b56cdfb03202b3bcc9fd8daee8e8e9b6d7e3163aa97c631dfcfcc24d36c86", size = 269793, upload-time = "2025-09-25T19:49:09.727Z" }, - { url = "https://files.pythonhosted.org/packages/cc/82/6296688ac1b9e503d034e7d0614d56e80c5d1a08402ff856a4549cb59207/bcrypt-5.0.0-cp313-cp313t-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4bfd2a34de661f34d0bda43c3e4e79df586e4716ef401fe31ea39d69d581ef23", size = 289930, upload-time = "2025-09-25T19:49:11.204Z" }, - { url = "https://files.pythonhosted.org/packages/d1/18/884a44aa47f2a3b88dd09bc05a1e40b57878ecd111d17e5bba6f09f8bb77/bcrypt-5.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:ed2e1365e31fc73f1825fa830f1c8f8917ca1b3ca6185773b349c20fd606cec2", size = 272194, upload-time = "2025-09-25T19:49:12.524Z" }, - { url = "https://files.pythonhosted.org/packages/0e/8f/371a3ab33c6982070b674f1788e05b656cfbf5685894acbfef0c65483a59/bcrypt-5.0.0-cp313-cp313t-manylinux_2_34_aarch64.whl", hash = "sha256:83e787d7a84dbbfba6f250dd7a5efd689e935f03dd83b0f919d39349e1f23f83", size = 269381, upload-time = "2025-09-25T19:49:14.308Z" }, - { url = "https://files.pythonhosted.org/packages/b1/34/7e4e6abb7a8778db6422e88b1f06eb07c47682313997ee8a8f9352e5a6f1/bcrypt-5.0.0-cp313-cp313t-manylinux_2_34_x86_64.whl", hash = "sha256:137c5156524328a24b9fac1cb5db0ba618bc97d11970b39184c1d87dc4bf1746", size = 271750, upload-time = "2025-09-25T19:49:15.584Z" }, - { url = "https://files.pythonhosted.org/packages/c0/1b/54f416be2499bd72123c70d98d36c6cd61a4e33d9b89562c22481c81bb30/bcrypt-5.0.0-cp313-cp313t-musllinux_1_1_aarch64.whl", hash = "sha256:38cac74101777a6a7d3b3e3cfefa57089b5ada650dce2baf0cbdd9d65db22a9e", size = 303757, upload-time = "2025-09-25T19:49:17.244Z" }, - { url = "https://files.pythonhosted.org/packages/13/62/062c24c7bcf9d2826a1a843d0d605c65a755bc98002923d01fd61270705a/bcrypt-5.0.0-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:d8d65b564ec849643d9f7ea05c6d9f0cd7ca23bdd4ac0c2dbef1104ab504543d", size = 306740, upload-time = "2025-09-25T19:49:18.693Z" }, - { url = "https://files.pythonhosted.org/packages/d5/c8/1fdbfc8c0f20875b6b4020f3c7dc447b8de60aa0be5faaf009d24242aec9/bcrypt-5.0.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:741449132f64b3524e95cd30e5cd3343006ce146088f074f31ab26b94e6c75ba", size = 334197, upload-time = "2025-09-25T19:49:20.523Z" }, - { url = "https://files.pythonhosted.org/packages/a6/c1/8b84545382d75bef226fbc6588af0f7b7d095f7cd6a670b42a86243183cd/bcrypt-5.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:212139484ab3207b1f0c00633d3be92fef3c5f0af17cad155679d03ff2ee1e41", size = 352974, upload-time = "2025-09-25T19:49:22.254Z" }, - { url = "https://files.pythonhosted.org/packages/10/a6/ffb49d4254ed085e62e3e5dd05982b4393e32fe1e49bb1130186617c29cd/bcrypt-5.0.0-cp313-cp313t-win32.whl", hash = "sha256:9d52ed507c2488eddd6a95bccee4e808d3234fa78dd370e24bac65a21212b861", size = 148498, upload-time = "2025-09-25T19:49:24.134Z" }, - { url = "https://files.pythonhosted.org/packages/48/a9/259559edc85258b6d5fc5471a62a3299a6aa37a6611a169756bf4689323c/bcrypt-5.0.0-cp313-cp313t-win_amd64.whl", hash = "sha256:f6984a24db30548fd39a44360532898c33528b74aedf81c26cf29c51ee47057e", size = 145853, upload-time = "2025-09-25T19:49:25.702Z" }, - { url = "https://files.pythonhosted.org/packages/2d/df/9714173403c7e8b245acf8e4be8876aac64a209d1b392af457c79e60492e/bcrypt-5.0.0-cp313-cp313t-win_arm64.whl", hash = "sha256:9fffdb387abe6aa775af36ef16f55e318dcda4194ddbf82007a6f21da29de8f5", size = 139626, upload-time = "2025-09-25T19:49:26.928Z" }, - { url = "https://files.pythonhosted.org/packages/f8/14/c18006f91816606a4abe294ccc5d1e6f0e42304df5a33710e9e8e95416e1/bcrypt-5.0.0-cp314-cp314t-macosx_10_12_universal2.whl", hash = "sha256:4870a52610537037adb382444fefd3706d96d663ac44cbb2f37e3919dca3d7ef", size = 481862, upload-time = "2025-09-25T19:49:28.365Z" }, - { url = "https://files.pythonhosted.org/packages/67/49/dd074d831f00e589537e07a0725cf0e220d1f0d5d8e85ad5bbff251c45aa/bcrypt-5.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:48f753100931605686f74e27a7b49238122aa761a9aefe9373265b8b7aa43ea4", size = 268544, upload-time = "2025-09-25T19:49:30.39Z" }, - { url = "https://files.pythonhosted.org/packages/f5/91/50ccba088b8c474545b034a1424d05195d9fcbaaf802ab8bfe2be5a4e0d7/bcrypt-5.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f70aadb7a809305226daedf75d90379c397b094755a710d7014b8b117df1ebbf", size = 271787, upload-time = "2025-09-25T19:49:32.144Z" }, - { url = "https://files.pythonhosted.org/packages/aa/e7/d7dba133e02abcda3b52087a7eea8c0d4f64d3e593b4fffc10c31b7061f3/bcrypt-5.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:744d3c6b164caa658adcb72cb8cc9ad9b4b75c7db507ab4bc2480474a51989da", size = 269753, upload-time = "2025-09-25T19:49:33.885Z" }, - { url = "https://files.pythonhosted.org/packages/33/fc/5b145673c4b8d01018307b5c2c1fc87a6f5a436f0ad56607aee389de8ee3/bcrypt-5.0.0-cp314-cp314t-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a28bc05039bdf3289d757f49d616ab3efe8cf40d8e8001ccdd621cd4f98f4fc9", size = 289587, upload-time = "2025-09-25T19:49:35.144Z" }, - { url = "https://files.pythonhosted.org/packages/27/d7/1ff22703ec6d4f90e62f1a5654b8867ef96bafb8e8102c2288333e1a6ca6/bcrypt-5.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:7f277a4b3390ab4bebe597800a90da0edae882c6196d3038a73adf446c4f969f", size = 272178, upload-time = "2025-09-25T19:49:36.793Z" }, - { url = "https://files.pythonhosted.org/packages/c8/88/815b6d558a1e4d40ece04a2f84865b0fef233513bd85fd0e40c294272d62/bcrypt-5.0.0-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:79cfa161eda8d2ddf29acad370356b47f02387153b11d46042e93a0a95127493", size = 269295, upload-time = "2025-09-25T19:49:38.164Z" }, - { url = "https://files.pythonhosted.org/packages/51/8c/e0db387c79ab4931fc89827d37608c31cc57b6edc08ccd2386139028dc0d/bcrypt-5.0.0-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:a5393eae5722bcef046a990b84dff02b954904c36a194f6cfc817d7dca6c6f0b", size = 271700, upload-time = "2025-09-25T19:49:39.917Z" }, - { url = "https://files.pythonhosted.org/packages/06/83/1570edddd150f572dbe9fc00f6203a89fc7d4226821f67328a85c330f239/bcrypt-5.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7f4c94dec1b5ab5d522750cb059bb9409ea8872d4494fd152b53cca99f1ddd8c", size = 334034, upload-time = "2025-09-25T19:49:41.227Z" }, - { url = "https://files.pythonhosted.org/packages/c9/f2/ea64e51a65e56ae7a8a4ec236c2bfbdd4b23008abd50ac33fbb2d1d15424/bcrypt-5.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0cae4cb350934dfd74c020525eeae0a5f79257e8a201c0c176f4b84fdbf2a4b4", size = 352766, upload-time = "2025-09-25T19:49:43.08Z" }, - { url = "https://files.pythonhosted.org/packages/d7/d4/1a388d21ee66876f27d1a1f41287897d0c0f1712ef97d395d708ba93004c/bcrypt-5.0.0-cp314-cp314t-win32.whl", hash = "sha256:b17366316c654e1ad0306a6858e189fc835eca39f7eb2cafd6aaca8ce0c40a2e", size = 152449, upload-time = "2025-09-25T19:49:44.971Z" }, - { url = "https://files.pythonhosted.org/packages/3f/61/3291c2243ae0229e5bca5d19f4032cecad5dfb05a2557169d3a69dc0ba91/bcrypt-5.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:92864f54fb48b4c718fc92a32825d0e42265a627f956bc0361fe869f1adc3e7d", size = 149310, upload-time = "2025-09-25T19:49:46.162Z" }, - { url = "https://files.pythonhosted.org/packages/3e/89/4b01c52ae0c1a681d4021e5dd3e45b111a8fb47254a274fa9a378d8d834b/bcrypt-5.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:dd19cf5184a90c873009244586396a6a884d591a5323f0e8a5922560718d4993", size = 143761, upload-time = "2025-09-25T19:49:47.345Z" }, - { url = "https://files.pythonhosted.org/packages/84/29/6237f151fbfe295fe3e074ecc6d44228faa1e842a81f6d34a02937ee1736/bcrypt-5.0.0-cp38-abi3-macosx_10_12_universal2.whl", hash = "sha256:fc746432b951e92b58317af8e0ca746efe93e66555f1b40888865ef5bf56446b", size = 494553, upload-time = "2025-09-25T19:49:49.006Z" }, - { url = "https://files.pythonhosted.org/packages/45/b6/4c1205dde5e464ea3bd88e8742e19f899c16fa8916fb8510a851fae985b5/bcrypt-5.0.0-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c2388ca94ffee269b6038d48747f4ce8df0ffbea43f31abfa18ac72f0218effb", size = 275009, upload-time = "2025-09-25T19:49:50.581Z" }, - { url = "https://files.pythonhosted.org/packages/3b/71/427945e6ead72ccffe77894b2655b695ccf14ae1866cd977e185d606dd2f/bcrypt-5.0.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:560ddb6ec730386e7b3b26b8b4c88197aaed924430e7b74666a586ac997249ef", size = 278029, upload-time = "2025-09-25T19:49:52.533Z" }, - { url = "https://files.pythonhosted.org/packages/17/72/c344825e3b83c5389a369c8a8e58ffe1480b8a699f46c127c34580c4666b/bcrypt-5.0.0-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:d79e5c65dcc9af213594d6f7f1fa2c98ad3fc10431e7aa53c176b441943efbdd", size = 275907, upload-time = "2025-09-25T19:49:54.709Z" }, - { url = "https://files.pythonhosted.org/packages/0b/7e/d4e47d2df1641a36d1212e5c0514f5291e1a956a7749f1e595c07a972038/bcrypt-5.0.0-cp38-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2b732e7d388fa22d48920baa267ba5d97cca38070b69c0e2d37087b381c681fd", size = 296500, upload-time = "2025-09-25T19:49:56.013Z" }, - { url = "https://files.pythonhosted.org/packages/0f/c3/0ae57a68be2039287ec28bc463b82e4b8dc23f9d12c0be331f4782e19108/bcrypt-5.0.0-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:0c8e093ea2532601a6f686edbc2c6b2ec24131ff5c52f7610dd64fa4553b5464", size = 278412, upload-time = "2025-09-25T19:49:57.356Z" }, - { url = "https://files.pythonhosted.org/packages/45/2b/77424511adb11e6a99e3a00dcc7745034bee89036ad7d7e255a7e47be7d8/bcrypt-5.0.0-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:5b1589f4839a0899c146e8892efe320c0fa096568abd9b95593efac50a87cb75", size = 275486, upload-time = "2025-09-25T19:49:59.116Z" }, - { url = "https://files.pythonhosted.org/packages/43/0a/405c753f6158e0f3f14b00b462d8bca31296f7ecfc8fc8bc7919c0c7d73a/bcrypt-5.0.0-cp38-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:89042e61b5e808b67daf24a434d89bab164d4de1746b37a8d173b6b14f3db9ff", size = 277940, upload-time = "2025-09-25T19:50:00.869Z" }, - { url = "https://files.pythonhosted.org/packages/62/83/b3efc285d4aadc1fa83db385ec64dcfa1707e890eb42f03b127d66ac1b7b/bcrypt-5.0.0-cp38-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:e3cf5b2560c7b5a142286f69bde914494b6d8f901aaa71e453078388a50881c4", size = 310776, upload-time = "2025-09-25T19:50:02.393Z" }, - { url = "https://files.pythonhosted.org/packages/95/7d/47ee337dacecde6d234890fe929936cb03ebc4c3a7460854bbd9c97780b8/bcrypt-5.0.0-cp38-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:f632fd56fc4e61564f78b46a2269153122db34988e78b6be8b32d28507b7eaeb", size = 312922, upload-time = "2025-09-25T19:50:04.232Z" }, - { url = "https://files.pythonhosted.org/packages/d6/3a/43d494dfb728f55f4e1cf8fd435d50c16a2d75493225b54c8d06122523c6/bcrypt-5.0.0-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:801cad5ccb6b87d1b430f183269b94c24f248dddbbc5c1f78b6ed231743e001c", size = 341367, upload-time = "2025-09-25T19:50:05.559Z" }, - { url = "https://files.pythonhosted.org/packages/55/ab/a0727a4547e383e2e22a630e0f908113db37904f58719dc48d4622139b5c/bcrypt-5.0.0-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:3cf67a804fc66fc217e6914a5635000259fbbbb12e78a99488e4d5ba445a71eb", size = 359187, upload-time = "2025-09-25T19:50:06.916Z" }, - { url = "https://files.pythonhosted.org/packages/1b/bb/461f352fdca663524b4643d8b09e8435b4990f17fbf4fea6bc2a90aa0cc7/bcrypt-5.0.0-cp38-abi3-win32.whl", hash = "sha256:3abeb543874b2c0524ff40c57a4e14e5d3a66ff33fb423529c88f180fd756538", size = 153752, upload-time = "2025-09-25T19:50:08.515Z" }, - { url = "https://files.pythonhosted.org/packages/41/aa/4190e60921927b7056820291f56fc57d00d04757c8b316b2d3c0d1d6da2c/bcrypt-5.0.0-cp38-abi3-win_amd64.whl", hash = "sha256:35a77ec55b541e5e583eb3436ffbbf53b0ffa1fa16ca6782279daf95d146dcd9", size = 150881, upload-time = "2025-09-25T19:50:09.742Z" }, - { url = "https://files.pythonhosted.org/packages/54/12/cd77221719d0b39ac0b55dbd39358db1cd1246e0282e104366ebbfb8266a/bcrypt-5.0.0-cp38-abi3-win_arm64.whl", hash = "sha256:cde08734f12c6a4e28dc6755cd11d3bdfea608d93d958fffbe95a7026ebe4980", size = 144931, upload-time = "2025-09-25T19:50:11.016Z" }, - { url = "https://files.pythonhosted.org/packages/5d/ba/2af136406e1c3839aea9ecadc2f6be2bcd1eff255bd451dd39bcf302c47a/bcrypt-5.0.0-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:0c418ca99fd47e9c59a301744d63328f17798b5947b0f791e9af3c1c499c2d0a", size = 495313, upload-time = "2025-09-25T19:50:12.309Z" }, - { url = "https://files.pythonhosted.org/packages/ac/ee/2f4985dbad090ace5ad1f7dd8ff94477fe089b5fab2040bd784a3d5f187b/bcrypt-5.0.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ddb4e1500f6efdd402218ffe34d040a1196c072e07929b9820f363a1fd1f4191", size = 275290, upload-time = "2025-09-25T19:50:13.673Z" }, - { url = "https://files.pythonhosted.org/packages/e4/6e/b77ade812672d15cf50842e167eead80ac3514f3beacac8902915417f8b7/bcrypt-5.0.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7aeef54b60ceddb6f30ee3db090351ecf0d40ec6e2abf41430997407a46d2254", size = 278253, upload-time = "2025-09-25T19:50:15.089Z" }, - { url = "https://files.pythonhosted.org/packages/36/c4/ed00ed32f1040f7990dac7115f82273e3c03da1e1a1587a778d8cea496d8/bcrypt-5.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f0ce778135f60799d89c9693b9b398819d15f1921ba15fe719acb3178215a7db", size = 276084, upload-time = "2025-09-25T19:50:16.699Z" }, - { url = "https://files.pythonhosted.org/packages/e7/c4/fa6e16145e145e87f1fa351bbd54b429354fd72145cd3d4e0c5157cf4c70/bcrypt-5.0.0-cp39-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a71f70ee269671460b37a449f5ff26982a6f2ba493b3eabdd687b4bf35f875ac", size = 297185, upload-time = "2025-09-25T19:50:18.525Z" }, - { url = "https://files.pythonhosted.org/packages/24/b4/11f8a31d8b67cca3371e046db49baa7c0594d71eb40ac8121e2fc0888db0/bcrypt-5.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f8429e1c410b4073944f03bd778a9e066e7fad723564a52ff91841d278dfc822", size = 278656, upload-time = "2025-09-25T19:50:19.809Z" }, - { url = "https://files.pythonhosted.org/packages/ac/31/79f11865f8078e192847d2cb526e3fa27c200933c982c5b2869720fa5fce/bcrypt-5.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:edfcdcedd0d0f05850c52ba3127b1fce70b9f89e0fe5ff16517df7e81fa3cbb8", size = 275662, upload-time = "2025-09-25T19:50:21.567Z" }, - { url = "https://files.pythonhosted.org/packages/d4/8d/5e43d9584b3b3591a6f9b68f755a4da879a59712981ef5ad2a0ac1379f7a/bcrypt-5.0.0-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:611f0a17aa4a25a69362dcc299fda5c8a3d4f160e2abb3831041feb77393a14a", size = 278240, upload-time = "2025-09-25T19:50:23.305Z" }, - { url = "https://files.pythonhosted.org/packages/89/48/44590e3fc158620f680a978aafe8f87a4c4320da81ed11552f0323aa9a57/bcrypt-5.0.0-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:db99dca3b1fdc3db87d7c57eac0c82281242d1eabf19dcb8a6b10eb29a2e72d1", size = 311152, upload-time = "2025-09-25T19:50:24.597Z" }, - { url = "https://files.pythonhosted.org/packages/5f/85/e4fbfc46f14f47b0d20493669a625da5827d07e8a88ee460af6cd9768b44/bcrypt-5.0.0-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:5feebf85a9cefda32966d8171f5db7e3ba964b77fdfe31919622256f80f9cf42", size = 313284, upload-time = "2025-09-25T19:50:26.268Z" }, - { url = "https://files.pythonhosted.org/packages/25/ae/479f81d3f4594456a01ea2f05b132a519eff9ab5768a70430fa1132384b1/bcrypt-5.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:3ca8a166b1140436e058298a34d88032ab62f15aae1c598580333dc21d27ef10", size = 341643, upload-time = "2025-09-25T19:50:28.02Z" }, - { url = "https://files.pythonhosted.org/packages/df/d2/36a086dee1473b14276cd6ea7f61aef3b2648710b5d7f1c9e032c29b859f/bcrypt-5.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:61afc381250c3182d9078551e3ac3a41da14154fbff647ddf52a769f588c4172", size = 359698, upload-time = "2025-09-25T19:50:31.347Z" }, - { url = "https://files.pythonhosted.org/packages/c0/f6/688d2cd64bfd0b14d805ddb8a565e11ca1fb0fd6817175d58b10052b6d88/bcrypt-5.0.0-cp39-abi3-win32.whl", hash = "sha256:64d7ce196203e468c457c37ec22390f1a61c85c6f0b8160fd752940ccfb3a683", size = 153725, upload-time = "2025-09-25T19:50:34.384Z" }, - { url = "https://files.pythonhosted.org/packages/9f/b9/9d9a641194a730bda138b3dfe53f584d61c58cd5230e37566e83ec2ffa0d/bcrypt-5.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:64ee8434b0da054d830fa8e89e1c8bf30061d539044a39524ff7dec90481e5c2", size = 150912, upload-time = "2025-09-25T19:50:35.69Z" }, - { url = "https://files.pythonhosted.org/packages/27/44/d2ef5e87509158ad2187f4dd0852df80695bb1ee0cfe0a684727b01a69e0/bcrypt-5.0.0-cp39-abi3-win_arm64.whl", hash = "sha256:f2347d3534e76bf50bca5500989d6c1d05ed64b440408057a37673282c654927", size = 144953, upload-time = "2025-09-25T19:50:37.32Z" }, - { url = "https://files.pythonhosted.org/packages/8a/75/4aa9f5a4d40d762892066ba1046000b329c7cd58e888a6db878019b282dc/bcrypt-5.0.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:7edda91d5ab52b15636d9c30da87d2cc84f426c72b9dba7a9b4fe142ba11f534", size = 271180, upload-time = "2025-09-25T19:50:38.575Z" }, - { url = "https://files.pythonhosted.org/packages/54/79/875f9558179573d40a9cc743038ac2bf67dfb79cecb1e8b5d70e88c94c3d/bcrypt-5.0.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:046ad6db88edb3c5ece4369af997938fb1c19d6a699b9c1b27b0db432faae4c4", size = 273791, upload-time = "2025-09-25T19:50:39.913Z" }, - { url = "https://files.pythonhosted.org/packages/bc/fe/975adb8c216174bf70fc17535f75e85ac06ed5252ea077be10d9cff5ce24/bcrypt-5.0.0-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:dcd58e2b3a908b5ecc9b9df2f0085592506ac2d5110786018ee5e160f28e0911", size = 270746, upload-time = "2025-09-25T19:50:43.306Z" }, - { url = "https://files.pythonhosted.org/packages/e4/f8/972c96f5a2b6c4b3deca57009d93e946bbdbe2241dca9806d502f29dd3ee/bcrypt-5.0.0-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:6b8f520b61e8781efee73cba14e3e8c9556ccfb375623f4f97429544734545b4", size = 273375, upload-time = "2025-09-25T19:50:45.43Z" }, -] - [[package]] name = "boto3" version = "1.43.87" @@ -873,15 +740,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/70/e7/d798bb22f172ad819944aa13f50bc330dc4fa2d5f52be36c8303465571ef/data_platform_helpers-1.1.0-py3-none-any.whl", hash = "sha256:71b2c2ba31d1bc01c55c9da82d02b0cb654b99231172916722ecaf4c469d27c4", size = 56200, upload-time = "2026-06-17T14:18:31.047Z" }, ] -[[package]] -name = "decorator" -version = "5.3.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/60/8b/32f9823da46cde7df2087faa08cd98d01b908f8dcab982cdba9c84e85355/decorator-5.3.1.tar.gz", hash = "sha256:4cbcdd55a6efadb9dbea26b858f4fb3264567b52d69ca0d25b721b553f60ea82", size = 58084, upload-time = "2026-05-18T06:03:28.057Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/05/7f/798705f5296a58ca505d600456748d1be48078eac8a7050d8a98bc9edb89/decorator-5.3.1-py3-none-any.whl", hash = "sha256:f47fe6fdbd2edd623ecfe36875d37aba411624e2670dd395dddae1358689bb3c", size = 10365, upload-time = "2026-05-18T06:03:26.517Z" }, -] - [[package]] name = "diskcache" version = "5.6.3" @@ -891,15 +749,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/3f/27/4570e78fc0bf5ea0ca45eb1de3818a23787af9b390c0b0a0033a1b8236f9/diskcache-5.6.3-py3-none-any.whl", hash = "sha256:5e31b2d5fbad117cc363ebaf6b689474db18a1f6438bc82358b024abd4c2ca19", size = 45550, upload-time = "2023-08-31T06:11:58.822Z" }, ] -[[package]] -name = "executing" -version = "2.3.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/52/92/8a611141e42930c0f194f7504063ab87dfe970cf1a5af28e7703df448734/executing-2.3.0.tar.gz", hash = "sha256:15919cb5d667e5cb4e099511971d00d659573fff2dd5c4e6cd8b71636c7858d2", size = 1338003, upload-time = "2026-10-10T14:06:04.64Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/4d/dd/8bc67e7d5ffc1d88aa5af511189dfb76dc4e1e5b808fab186146ef2663e5/executing-2.3.0-py3-none-any.whl", hash = "sha256:736e859c9f8701f11fcf516856f26f562e04776387824b43a35a1dfe21c84122", size = 29393, upload-time = "2026-10-10T14:06:02.777Z" }, -] - [[package]] name = "google-auth" version = "2.62.1" @@ -1019,18 +868,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/9b/43/832f631d32e4f1211caa2ba368317739fe71f0b8530e4c9d15dc454bac2a/httpx2_jsfetch-1.0-py3-none-any.whl", hash = "sha256:cb916b707601e69a07721aabc8f3f6659be3a6893bc1ff5c6f9e02241df2da32", size = 6382, upload-time = "2026-08-07T00:13:06.567Z" }, ] -[[package]] -name = "hvac" -version = "2.4.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "requests" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/e2/57/b46c397fb3842cfb02a44609aa834c887f38dd75f290c2fc5a34da4b2fee/hvac-2.4.0.tar.gz", hash = "sha256:e0056ad9064e7923e874e6769015b032580b639e29246f5ab1044f7959c1c7e0", size = 332543, upload-time = "2025-10-30T12:57:47.512Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/55/33/71e45a6bd6875f44a26f99da31c63b6840123e88bedf2c0b1ce429b8be12/hvac-2.4.0-py3-none-any.whl", hash = "sha256:008db5efd8c2f77bd37d2368ea5f713edceae1c65f11fd608393179478649e0f", size = 155921, upload-time = "2025-10-30T12:57:46.253Z" }, -] - [[package]] name = "hyperframe" version = "6.1.0" @@ -1058,73 +895,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, ] -[[package]] -name = "invoke" -version = "3.0.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/33/f6/227c48c5fe47fa178ccf1fda8f047d16c97ba926567b661e9ce2045c600c/invoke-3.0.3.tar.gz", hash = "sha256:437b6a622223824380bfb4e64f612711a6b648c795f565efc8625af66fb57f0c", size = 343419, upload-time = "2026-04-07T15:17:48.307Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/5a/de/bbc12563bbf979618d17625a4e753ff7a078523e28d870d3626daa97261a/invoke-3.0.3-py3-none-any.whl", hash = "sha256:f11327165e5cbb89b2ad1d88d3292b5113332c43b8553b494da435d6ec6f5053", size = 160958, upload-time = "2026-04-07T15:17:46.875Z" }, -] - -[[package]] -name = "ipdb" -version = "0.13.13" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "decorator" }, - { name = "ipython" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/3d/1b/7e07e7b752017f7693a0f4d41c13e5ca29ce8cbcfdcc1fd6c4ad8c0a27a0/ipdb-0.13.13.tar.gz", hash = "sha256:e3ac6018ef05126d442af680aad863006ec19d02290561ac88b8b1c0b0cfc726", size = 17042, upload-time = "2023-03-09T15:40:57.487Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/0c/4c/b075da0092003d9a55cf2ecc1cae9384a1ca4f650d51b00fc59875fe76f6/ipdb-0.13.13-py3-none-any.whl", hash = "sha256:45529994741c4ab6d2388bfa5d7b725c2cf7fe9deffabdb8a6113aa5ed449ed4", size = 12130, upload-time = "2023-03-09T15:40:55.021Z" }, -] - -[[package]] -name = "ipython" -version = "9.18.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32'" }, - { name = "ipython-pygments-lexers" }, - { name = "jedi" }, - { name = "matplotlib-inline" }, - { name = "pexpect", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, - { name = "prompt-toolkit" }, - { name = "psutil", marker = "sys_platform != 'android' and sys_platform != 'cygwin' and sys_platform != 'emscripten'" }, - { name = "pygments" }, - { name = "stack-data" }, - { name = "traitlets" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/38/04/0d945c72d5b77527273ecb4c66aa2436de7a3b3bbe3da345bf053232b886/ipython-9.18.1.tar.gz", hash = "sha256:6319c0f5372c196397899479e6db1783dd7937abae06815d1317e8d5d51aaaaf", size = 4437314, upload-time = "2026-11-02T09:19:55.55Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/bb/1c/91da4a1c541b75e97eb99d09c6a9b0534de55bb4a466669d1170e39b915c/ipython-9.18.1-py3-none-any.whl", hash = "sha256:997ce9140d374531a61069c70c0f9ef299d6dd3559ea0f94b8af589726e3c1d5", size = 649819, upload-time = "2026-11-02T09:19:53.32Z" }, -] - -[[package]] -name = "ipython-pygments-lexers" -version = "1.1.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pygments" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ef/4c/5dd1d8af08107f88c7f741ead7a40854b8ac24ddf9ae850afbcf698aa552/ipython_pygments_lexers-1.1.1.tar.gz", hash = "sha256:09c0138009e56b6854f9535736f4171d855c8c08a563a0dcd8022f78355c7e81", size = 8393, upload-time = "2025-01-17T11:24:34.505Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d9/33/1f075bf72b0b747cb3288d011319aaf64083cf2efef8354174e3ed4540e2/ipython_pygments_lexers-1.1.1-py3-none-any.whl", hash = "sha256:a9462224a505ade19a605f71f8fa63c2048833ce50abc86768a0d81d876dc81c", size = 8074, upload-time = "2025-01-17T11:24:33.271Z" }, -] - -[[package]] -name = "jedi" -version = "0.20.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "parso" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/a3/a4/4692ecd7fa700ac1066b1c1f6cadef60aa2e01e5e364710235137d823e0a/jedi-0.20.1.tar.gz", hash = "sha256:2f71208c3f9c1bca057c0e90d3f272aba44ace88fc4067d7587e9e069331b7e5", size = 3121738, upload-time = "2026-10-12T17:42:24.361Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/be/c7/71eb0d51cdcbb63b857c931aa4e9218b078b5d9f8ecd383b234f28fe7b0f/jedi-0.20.1-py2.py3-none-any.whl", hash = "sha256:0fb16d86c4a4c73c37ba518c77419975e30fcc620658a8d14fbb5720cdd34142", size = 4885980, upload-time = "2026-10-12T17:42:21.585Z" }, -] - [[package]] name = "jinja2" version = "3.1.6" @@ -1185,29 +955,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/23/d4/6effc16acb9fff30603c46270ab58f48c812ba1f567025f22ab5eb96c91a/jubilant-1.14.0-py3-none-any.whl", hash = "sha256:2a631fb2363cdd26c0dea52659b5a8946e36f57fec922895521ab59bda6398e8", size = 39483, upload-time = "2026-09-29T23:03:23.102Z" }, ] -[[package]] -name = "juju" -version = "3.6.1.3" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "backports-datetime-fromisoformat" }, - { name = "hvac" }, - { name = "kubernetes" }, - { name = "macaroonbakery" }, - { name = "packaging" }, - { name = "paramiko" }, - { name = "pyasn1" }, - { name = "pyyaml" }, - { name = "toposort" }, - { name = "typing-extensions" }, - { name = "typing-inspect" }, - { name = "websockets" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/91/ac/42ed7565d1b031856fb7e8884089acb3eab5aa6a2dabfee3fcf09660f885/juju-3.6.1.3.tar.gz", hash = "sha256:2fcf510fa35b387abb382da3a8b2227f38852ae7e9dc1058afb228588e1aec51", size = 305052, upload-time = "2025-07-11T02:15:59.237Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/86/13/e31f9b9c24e723a161bc3b75729acb109d80bf3f75f937e4c3d408f19e5a/juju-3.6.1.3-py3-none-any.whl", hash = "sha256:87469500a0a4e6a3976ddf0595e316379868d5cea96e15af2d2d4b94188f76e5", size = 287075, upload-time = "2025-07-11T02:15:57.118Z" }, -] - [[package]] name = "kubernetes" version = "30.1.0" @@ -1253,23 +1000,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c4/7f/57524764347c39a9d523c4eef68522b693523d7dbda13a2a14f9a39f315b/lightkube_models-1.36.3.8-py3-none-any.whl", hash = "sha256:a938eed82e61ae3083e7cac15802e58cf8f7e5d7d6a9a9576d5cbb043427db46", size = 322569, upload-time = "2026-07-26T08:40:45.697Z" }, ] -[[package]] -name = "macaroonbakery" -version = "1.3.4" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "protobuf" }, - { name = "pymacaroons" }, - { name = "pynacl" }, - { name = "pyrfc3339" }, - { name = "requests" }, - { name = "six" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/4b/ae/59f5ab870640bd43673b708e5f24aed592dc2673cc72caa49b0053b4af37/macaroonbakery-1.3.4.tar.gz", hash = "sha256:41ca993a23e4f8ef2fe7723b5cd4a30c759735f1d5021e990770c8a0e0f33970", size = 82143, upload-time = "2023-12-13T14:22:22.539Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/60/42/227f748dc222b7a1c5cb40c7c74ab4162c7fc146b88980776b490ab673a1/macaroonbakery-1.3.4-py2.py3-none-any.whl", hash = "sha256:1e952a189f5c1e96ef82b081b2852c770d7daa20987e2088e762dd5689fb253b", size = 103184, upload-time = "2023-12-13T14:22:20.159Z" }, -] - [[package]] name = "markdown-it-py" version = "4.2.0" @@ -1378,18 +1108,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/4e/d3/fe08482b5cd995033556d45041a4f4e76e7f0521112a9c9991d40d39825f/markupsafe-3.0.3-cp39-cp39-win_arm64.whl", hash = "sha256:38664109c14ffc9e7437e86b4dceb442b0096dfe3541d7864d9cbe1da4cf36c8", size = 13928, upload-time = "2025-09-27T18:37:39.037Z" }, ] -[[package]] -name = "matplotlib-inline" -version = "0.2.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "traitlets" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/bd/c0/9f7c9a46090390368a4d7bcb76bb87a4a36c421e4c0792cdb53486ffac7a/matplotlib_inline-0.2.2.tar.gz", hash = "sha256:72f3fe8fce36b70d4a5b612f899090cd0401deddc4ea90e1572b9f4bfb058c79", size = 8150, upload-time = "2026-05-08T17:33:33.49Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/41/09/5b161152e2d90f7b87f781c2e1267494aef9c32498df793f73ad0a0a494a/matplotlib_inline-0.2.2-py3-none-any.whl", hash = "sha256:3c821cf1c209f59fb2d2d64abbf5b23b67bcb2210d663f9918dd851c6da1fcf6", size = 9534, upload-time = "2026-05-08T17:33:32.055Z" }, -] - [[package]] name = "mdurl" version = "0.1.2" @@ -1455,15 +1173,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/90/91/56c5d560f20e6c20e9e4f55bd0e458f7f162aa689ee350346c04c48eac0b/msgspec-0.21.1-cp314-cp314t-win_arm64.whl", hash = "sha256:0d2cc73df6058d811a126ac3a8ad63a4dfa210c82f9cf5a004802eaf4712de90", size = 183149, upload-time = "2026-04-12T21:44:48.833Z" }, ] -[[package]] -name = "mypy-extensions" -version = "1.2.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d0/6f/43edf3be2748d0e40974a5ee046a8bb4c9961a4bdd3e7d5c6dcbf32d1af6/mypy_extensions-1.2.0.tar.gz", hash = "sha256:c6e275a07f1c2fc096b62940452d0eaa3f3af7de45d704787866240a7c6d5a51", size = 6566, upload-time = "2026-11-03T16:26:33.692Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b5/99/7b1adac7e97ce7bbda34792dc6e9b2f5cc5cffd1875883f78a818b2a2687/mypy_extensions-1.2.0-py3-none-any.whl", hash = "sha256:993e7a20aa5671eb41a7132cf555af30062da99729601601b9a8382b11cae768", size = 5114, upload-time = "2026-11-03T16:26:32.731Z" }, -] - [[package]] name = "oauthlib" version = "4.0.1" @@ -1555,42 +1264,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" }, ] -[[package]] -name = "paramiko" -version = "5.1.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "bcrypt" }, - { name = "cryptography" }, - { name = "invoke" }, - { name = "pynacl" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/76/cb/b1fde76618d84b1acf54d3d03d2b833ba5878afd12b9899346cc080f209d/paramiko-5.1.0.tar.gz", hash = "sha256:239b5f9b2a53006cd54f83cf8495ee742083708ead947882c8dd2786de79f39b", size = 1579549, upload-time = "2026-10-18T02:38:51.931Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/13/45/fa0e8d70cb25d2dae06bc238e580a84834f6ca53a4e2408cccc19a78db7b/paramiko-5.1.0-py3-none-any.whl", hash = "sha256:d9fe6d67a9d0bbf3eb85b051d26ab850b678c02d060f32915b944e5ca6d0d9e1", size = 211623, upload-time = "2026-10-18T02:38:49.903Z" }, -] - -[[package]] -name = "parso" -version = "0.8.7" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/30/4b/90c937815137d43ce71ba043cd3566221e9df6b9c805f24b5d138c9d40a7/parso-0.8.7.tar.gz", hash = "sha256:eaaac4c9fdd5e9e8852dc778d2d7405897ec510f2a298071453e5e3a07914bb1", size = 401824, upload-time = "2026-05-01T23:13:02.138Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/99/5d/8268b644392ee874ee82a635cd0df1773de230bde356c38de28e298392cc/parso-0.8.7-py2.py3-none-any.whl", hash = "sha256:a8926eb2a1b915486941fdbd31e86a4baf88fe8c210f25f2f35ecec5b574ca1c", size = 107025, upload-time = "2026-05-01T23:12:58.867Z" }, -] - -[[package]] -name = "pexpect" -version = "4.9.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "ptyprocess" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450, upload-time = "2023-11-25T09:07:26.339Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", size = 63772, upload-time = "2023-11-25T06:56:14.81Z" }, -] - [[package]] name = "pluggy" version = "1.6.0" @@ -1652,9 +1325,8 @@ integration = [ { name = "allure-pytest", marker = "python_full_version >= '3.12'" }, { name = "allure-pytest-default-results", marker = "python_full_version >= '3.12'" }, { name = "jubilant", marker = "python_full_version >= '3.12'" }, - { name = "juju", marker = "python_full_version >= '3.12'" }, + { name = "kubernetes", marker = "python_full_version >= '3.12'" }, { name = "pytest", marker = "python_full_version >= '3.12'" }, - { name = "pytest-operator", marker = "python_full_version >= '3.12'" }, { name = "tomli-w", marker = "python_full_version >= '3.12'" }, ] lint = [ @@ -1664,15 +1336,8 @@ lint = [ unit = [ { name = "coverage", marker = "python_full_version >= '3.12'" }, { name = "pytest", marker = "python_full_version >= '3.12'" }, - { name = "pytest-asyncio", marker = "python_full_version >= '3.12'" }, ] -[package.group-requires-python] -format = ">=3.12" -integration = ">=3.12" -lint = ">=3.12" -unit = ">=3.12" - [package.metadata] requires-dist = [ { name = "boto3", marker = "python_full_version >= '3.12' and extra == 'postgresql'", specifier = ">=1.43.85" }, @@ -1708,9 +1373,8 @@ integration = [ { name = "allure-pytest", marker = "python_full_version >= '3.12'", specifier = "==2.16.2" }, { name = "allure-pytest-default-results", marker = "python_full_version >= '3.12'", specifier = "==0.1.4" }, { name = "jubilant", marker = "python_full_version >= '3.12'", specifier = "==1.14.0" }, - { name = "juju", marker = "python_full_version >= '3.12'", specifier = "==3.6.1.3" }, + { name = "kubernetes", marker = "python_full_version >= '3.12'", specifier = "==30.1.0" }, { name = "pytest", marker = "python_full_version >= '3.12'", specifier = "==9.1.1" }, - { name = "pytest-operator", marker = "python_full_version >= '3.12'", specifier = "==0.43.2" }, { name = "tomli-w", marker = "python_full_version >= '3.12'", specifier = "==1.2.0" }, ] lint = [ @@ -1720,34 +1384,6 @@ lint = [ unit = [ { name = "coverage", extras = ["toml"], marker = "python_full_version >= '3.12'", specifier = "==7.16.2" }, { name = "pytest", marker = "python_full_version >= '3.12'", specifier = "==9.1.1" }, - { name = "pytest-asyncio", marker = "python_full_version >= '3.12'", specifier = "==0.21.2" }, -] - -[[package]] -name = "prompt-toolkit" -version = "3.0.53" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "wcwidth" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/7d/ea/39b988c938f75cb75d7045b5c69f8bfed47ee2152c8837fb403de29d6fb8/prompt_toolkit-3.0.53.tar.gz", hash = "sha256:9ec8a0ad96d5c56148b3f914aa79c1564c3fde5d2e6b876e7bc327e353cf8fa6", size = 435492, upload-time = "2026-07-26T20:56:14.758Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/54/6f/84908cad2d6aa5144abcf7b42709fe4fdb459bc640ec7ac5786e7693dabc/prompt_toolkit-3.0.53-py3-none-any.whl", hash = "sha256:01c0891d7f9237d5e339f7d3e42cdae80b7534abb1c7c0e3352efba6231492f2", size = 392288, upload-time = "2026-07-26T20:56:12.512Z" }, -] - -[[package]] -name = "protobuf" -version = "7.36.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d9/89/5b8517baa72f84a67b8a307ba953c91057af618bf40bf676f3c03551f8f0/protobuf-7.36.2.tar.gz", hash = "sha256:497d0463ff3316681da6c0b9e8d06cb465d61abce00b613ab42226175644d1bb", size = 512737, upload-time = "2026-09-17T20:07:59.326Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/32/72/98342feb672507c8f3a69e34b4fa8961f608edba5c1a48a6f47156d92cb5/protobuf-7.36.2-cp310-abi3-macosx_10_9_universal2.whl", hash = "sha256:cbc70b17ee27e28894c7fee8bb04be1abead49e936bc70eb60052531eee2079e", size = 456039, upload-time = "2026-09-17T20:07:51.542Z" }, - { url = "https://files.pythonhosted.org/packages/b6/ea/91fdf7c2b8bbd49cde056f00a9df6773532987e1c00fe2830b895af95c7e/protobuf-7.36.2-cp310-abi3-manylinux2014_aarch64.whl", hash = "sha256:e11e1f0180583a2af89db6a2ecd9e8dc40aa6d2988ca175bfd0e6d12ea72d74e", size = 344219, upload-time = "2026-09-17T20:07:52.914Z" }, - { url = "https://files.pythonhosted.org/packages/17/ab/5fd5f8ece73fad885c5a09aa849b32d70472f954ba3a92d3bb5974ea953b/protobuf-7.36.2-cp310-abi3-manylinux2014_s390x.whl", hash = "sha256:f4fee11ec330d238b34a05c9b675f693c20415d1c5bd7d5320cc2f8a798eb9cf", size = 357223, upload-time = "2026-09-17T20:07:53.985Z" }, - { url = "https://files.pythonhosted.org/packages/db/f3/3996583dd2906297a637af12114deddf7658af6e683fedb83be061983fb5/protobuf-7.36.2-cp310-abi3-manylinux2014_x86_64.whl", hash = "sha256:89f23aa53c24553a2416fd4fd1ec06f74fa42b14b546d8883128813f775bbfd2", size = 343223, upload-time = "2026-09-17T20:07:54.931Z" }, - { url = "https://files.pythonhosted.org/packages/fc/1b/dcc64f358fcb51811b58ae40b3d28f820725f116d86487cc20bd4b130701/protobuf-7.36.2-cp310-abi3-win32.whl", hash = "sha256:912c1221170e16c08d1f086762f563dd61ff83c18b5fa6652952dfaded66f728", size = 442998, upload-time = "2026-09-17T20:07:55.826Z" }, - { url = "https://files.pythonhosted.org/packages/8a/55/b77bda4e5e5f5971fb51b07663694690e9afdb9402136c16a522bd621cad/protobuf-7.36.2-cp310-abi3-win_amd64.whl", hash = "sha256:a300819d441e078a5608c0d3c709796bb548136058fda017ae51d425b44fd353", size = 456514, upload-time = "2026-09-17T20:07:57.188Z" }, - { url = "https://files.pythonhosted.org/packages/e4/04/d52c7016b04b6c5108f26691f9d33ec82a9b65d041f1a9c771137693d618/protobuf-7.36.2-py3-none-any.whl", hash = "sha256:bdb3a345d48db958e6ce1f18e508beb0cc981d64f24088427549c866cd039f1e", size = 179806, upload-time = "2026-09-17T20:07:58.211Z" }, ] [[package]] @@ -1819,24 +1455,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e3/c7/f04d68a178c9a5830f8f6c2116bdbafe12386d65aabf88c099814264d22e/psycopg2-2.9.12-cp39-cp39-win_amd64.whl", hash = "sha256:09826a6b89714626a662275d03f21639f1c68d183e2dcc9ba134d463a3da753e", size = 2757855, upload-time = "2026-04-20T23:33:28.837Z" }, ] -[[package]] -name = "ptyprocess" -version = "0.7.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220", size = 70762, upload-time = "2020-12-28T15:15:30.155Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", size = 13993, upload-time = "2020-12-28T15:15:28.35Z" }, -] - -[[package]] -name = "pure-eval" -version = "0.2.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/da/9f/abfd2959e9261dd5217ca8551d4de211ca6ab26fe9b72cf44731ff6c4442/pure_eval-0.2.4.tar.gz", hash = "sha256:260c2774686e651b79f8b8e7fc9d80b3599ea6a66334b47d5f4abb69fc2c0ea1", size = 20563, upload-time = "2026-09-10T21:41:22.836Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/6d/18/83376915176eb058cb86470eb7396388a13350b09a8f233a79303bbcbc5b/pure_eval-0.2.4-py3-none-any.whl", hash = "sha256:96cae060a313cfaad51bb761278bfb0e62dc0248d9315a81173752dc546cd37a", size = 11893, upload-time = "2026-09-10T21:41:21.532Z" }, -] - [[package]] name = "pyasn1" version = "0.6.5" @@ -2021,66 +1639,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176", size = 1231151, upload-time = "2026-03-29T13:29:30.038Z" }, ] -[[package]] -name = "pymacaroons" -version = "0.13.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pynacl" }, - { name = "six" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/37/b4/52ff00b59e91c4817ca60210c33caf11e85a7f68f7b361748ca2eb50923e/pymacaroons-0.13.0.tar.gz", hash = "sha256:1e6bba42a5f66c245adf38a5a4006a99dcc06a0703786ea636098667d42903b8", size = 21083, upload-time = "2018-02-21T18:07:49.045Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d8/87/fd9b54258216e3f19671f6e9dd76da1ebc49e93ea0107c986b1071dd3068/pymacaroons-0.13.0-py2.py3-none-any.whl", hash = "sha256:3e14dff6a262fdbf1a15e769ce635a8aea72e6f8f91e408f9a97166c53b91907", size = 19463, upload-time = "2018-02-21T18:07:47.085Z" }, -] - -[[package]] -name = "pynacl" -version = "1.6.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "cffi", marker = "platform_python_implementation != 'PyPy'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/d9/9a/4019b524b03a13438637b11538c82781a5eda427394380381af8f04f467a/pynacl-1.6.2.tar.gz", hash = "sha256:018494d6d696ae03c7e656e5e74cdfd8ea1326962cc401bcf018f1ed8436811c", size = 3511692, upload-time = "2026-01-01T17:48:10.851Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/4b/79/0e3c34dc3c4671f67d251c07aa8eb100916f250ee470df230b0ab89551b4/pynacl-1.6.2-cp314-cp314t-macosx_10_10_universal2.whl", hash = "sha256:622d7b07cc5c02c666795792931b50c91f3ce3c2649762efb1ef0d5684c81594", size = 390064, upload-time = "2026-01-01T17:31:57.264Z" }, - { url = "https://files.pythonhosted.org/packages/eb/1c/23a26e931736e13b16483795c8a6b2f641bf6a3d5238c22b070a5112722c/pynacl-1.6.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d071c6a9a4c94d79eb665db4ce5cedc537faf74f2355e4d502591d850d3913c0", size = 809370, upload-time = "2026-01-01T17:31:59.198Z" }, - { url = "https://files.pythonhosted.org/packages/87/74/8d4b718f8a22aea9e8dcc8b95deb76d4aae380e2f5b570cc70b5fd0a852d/pynacl-1.6.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fe9847ca47d287af41e82be1dd5e23023d3c31a951da134121ab02e42ac218c9", size = 1408304, upload-time = "2026-01-01T17:32:01.162Z" }, - { url = "https://files.pythonhosted.org/packages/fd/73/be4fdd3a6a87fe8a4553380c2b47fbd1f7f58292eb820902f5c8ac7de7b0/pynacl-1.6.2-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:04316d1fc625d860b6c162fff704eb8426b1a8bcd3abacea11142cbd99a6b574", size = 844871, upload-time = "2026-01-01T17:32:02.824Z" }, - { url = "https://files.pythonhosted.org/packages/55/ad/6efc57ab75ee4422e96b5f2697d51bbcf6cdcc091e66310df91fbdc144a8/pynacl-1.6.2-cp314-cp314t-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:44081faff368d6c5553ccf55322ef2819abb40e25afaec7e740f159f74813634", size = 1446356, upload-time = "2026-01-01T17:32:04.452Z" }, - { url = "https://files.pythonhosted.org/packages/78/b7/928ee9c4779caa0a915844311ab9fb5f99585621c5d6e4574538a17dca07/pynacl-1.6.2-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:a9f9932d8d2811ce1a8ffa79dcbdf3970e7355b5c8eb0c1a881a57e7f7d96e88", size = 826814, upload-time = "2026-01-01T17:32:06.078Z" }, - { url = "https://files.pythonhosted.org/packages/f7/a9/1bdba746a2be20f8809fee75c10e3159d75864ef69c6b0dd168fc60e485d/pynacl-1.6.2-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:bc4a36b28dd72fb4845e5d8f9760610588a96d5a51f01d84d8c6ff9849968c14", size = 1411742, upload-time = "2026-01-01T17:32:07.651Z" }, - { url = "https://files.pythonhosted.org/packages/f3/2f/5e7ea8d85f9f3ea5b6b87db1d8388daa3587eed181bdeb0306816fdbbe79/pynacl-1.6.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:3bffb6d0f6becacb6526f8f42adfb5efb26337056ee0831fb9a7044d1a964444", size = 801714, upload-time = "2026-01-01T17:32:09.558Z" }, - { url = "https://files.pythonhosted.org/packages/06/ea/43fe2f7eab5f200e40fb10d305bf6f87ea31b3bbc83443eac37cd34a9e1e/pynacl-1.6.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:2fef529ef3ee487ad8113d287a593fa26f48ee3620d92ecc6f1d09ea38e0709b", size = 1372257, upload-time = "2026-01-01T17:32:11.026Z" }, - { url = "https://files.pythonhosted.org/packages/4d/54/c9ea116412788629b1347e415f72195c25eb2f3809b2d3e7b25f5c79f13a/pynacl-1.6.2-cp314-cp314t-win32.whl", hash = "sha256:a84bf1c20339d06dc0c85d9aea9637a24f718f375d861b2668b2f9f96fa51145", size = 231319, upload-time = "2026-01-01T17:32:12.46Z" }, - { url = "https://files.pythonhosted.org/packages/ce/04/64e9d76646abac2dccf904fccba352a86e7d172647557f35b9fe2a5ee4a1/pynacl-1.6.2-cp314-cp314t-win_amd64.whl", hash = "sha256:320ef68a41c87547c91a8b58903c9caa641ab01e8512ce291085b5fe2fcb7590", size = 244044, upload-time = "2026-01-01T17:32:13.781Z" }, - { url = "https://files.pythonhosted.org/packages/33/33/7873dc161c6a06f43cda13dec67b6fe152cb2f982581151956fa5e5cdb47/pynacl-1.6.2-cp314-cp314t-win_arm64.whl", hash = "sha256:d29bfe37e20e015a7d8b23cfc8bd6aa7909c92a1b8f41ee416bbb3e79ef182b2", size = 188740, upload-time = "2026-01-01T17:32:15.083Z" }, - { url = "https://files.pythonhosted.org/packages/be/7b/4845bbf88e94586ec47a432da4e9107e3fc3ce37eb412b1398630a37f7dd/pynacl-1.6.2-cp38-abi3-macosx_10_10_universal2.whl", hash = "sha256:c949ea47e4206af7c8f604b8278093b674f7c79ed0d4719cc836902bf4517465", size = 388458, upload-time = "2026-01-01T17:32:16.829Z" }, - { url = "https://files.pythonhosted.org/packages/1e/b4/e927e0653ba63b02a4ca5b4d852a8d1d678afbf69b3dbf9c4d0785ac905c/pynacl-1.6.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8845c0631c0be43abdd865511c41eab235e0be69c81dc66a50911594198679b0", size = 800020, upload-time = "2026-01-01T17:32:18.34Z" }, - { url = "https://files.pythonhosted.org/packages/7f/81/d60984052df5c97b1d24365bc1e30024379b42c4edcd79d2436b1b9806f2/pynacl-1.6.2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:22de65bb9010a725b0dac248f353bb072969c94fa8d6b1f34b87d7953cf7bbe4", size = 1399174, upload-time = "2026-01-01T17:32:20.239Z" }, - { url = "https://files.pythonhosted.org/packages/68/f7/322f2f9915c4ef27d140101dd0ed26b479f7e6f5f183590fd32dfc48c4d3/pynacl-1.6.2-cp38-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:46065496ab748469cdd999246d17e301b2c24ae2fdf739132e580a0e94c94a87", size = 835085, upload-time = "2026-01-01T17:32:22.24Z" }, - { url = "https://files.pythonhosted.org/packages/3e/d0/f301f83ac8dbe53442c5a43f6a39016f94f754d7a9815a875b65e218a307/pynacl-1.6.2-cp38-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8a66d6fb6ae7661c58995f9c6435bda2b1e68b54b598a6a10247bfcdadac996c", size = 1437614, upload-time = "2026-01-01T17:32:23.766Z" }, - { url = "https://files.pythonhosted.org/packages/c4/58/fc6e649762b029315325ace1a8c6be66125e42f67416d3dbd47b69563d61/pynacl-1.6.2-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:26bfcd00dcf2cf160f122186af731ae30ab120c18e8375684ec2670dccd28130", size = 818251, upload-time = "2026-01-01T17:32:25.69Z" }, - { url = "https://files.pythonhosted.org/packages/c9/a8/b917096b1accc9acd878819a49d3d84875731a41eb665f6ebc826b1af99e/pynacl-1.6.2-cp38-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:c8a231e36ec2cab018c4ad4358c386e36eede0319a0c41fed24f840b1dac59f6", size = 1402859, upload-time = "2026-01-01T17:32:27.215Z" }, - { url = "https://files.pythonhosted.org/packages/85/42/fe60b5f4473e12c72f977548e4028156f4d340b884c635ec6b063fe7e9a5/pynacl-1.6.2-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:68be3a09455743ff9505491220b64440ced8973fe930f270c8e07ccfa25b1f9e", size = 791926, upload-time = "2026-01-01T17:32:29.314Z" }, - { url = "https://files.pythonhosted.org/packages/fa/f9/e40e318c604259301cc091a2a63f237d9e7b424c4851cafaea4ea7c4834e/pynacl-1.6.2-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:8b097553b380236d51ed11356c953bf8ce36a29a3e596e934ecabe76c985a577", size = 1363101, upload-time = "2026-01-01T17:32:31.263Z" }, - { url = "https://files.pythonhosted.org/packages/48/47/e761c254f410c023a469284a9bc210933e18588ca87706ae93002c05114c/pynacl-1.6.2-cp38-abi3-win32.whl", hash = "sha256:5811c72b473b2f38f7e2a3dc4f8642e3a3e9b5e7317266e4ced1fba85cae41aa", size = 227421, upload-time = "2026-01-01T17:32:33.076Z" }, - { url = "https://files.pythonhosted.org/packages/41/ad/334600e8cacc7d86587fe5f565480fde569dfb487389c8e1be56ac21d8ac/pynacl-1.6.2-cp38-abi3-win_amd64.whl", hash = "sha256:62985f233210dee6548c223301b6c25440852e13d59a8b81490203c3227c5ba0", size = 239754, upload-time = "2026-01-01T17:32:34.557Z" }, - { url = "https://files.pythonhosted.org/packages/29/7d/5945b5af29534641820d3bd7b00962abbbdfee84ec7e19f0d5b3175f9a31/pynacl-1.6.2-cp38-abi3-win_arm64.whl", hash = "sha256:834a43af110f743a754448463e8fd61259cd4ab5bbedcf70f9dabad1d28a394c", size = 184801, upload-time = "2026-01-01T17:32:36.309Z" }, -] - -[[package]] -name = "pyrfc3339" -version = "1.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pytz" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/00/52/75ea0ae249ba885c9429e421b4f94bc154df68484847f1ac164287d978d7/pyRFC3339-1.1.tar.gz", hash = "sha256:81b8cbe1519cdb79bed04910dd6fa4e181faf8c88dff1e1b987b5f7ab23a5b1a", size = 5290, upload-time = "2018-06-11T00:26:31Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c1/7a/725f5c16756ec6211b1e7eeac09f469084595513917ea069bc023c40a5e2/pyRFC3339-1.1-py2.py3-none-any.whl", hash = "sha256:67196cb83b470709c580bb4738b83165e67c6cc60e1f2e4f286cfcb402a926f4", size = 5669, upload-time = "2018-06-11T00:22:40.934Z" }, -] - [[package]] name = "pysyncobj" version = "0.3.16" @@ -2103,35 +1661,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" }, ] -[[package]] -name = "pytest-asyncio" -version = "0.21.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pytest" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ae/53/57663d99acaac2fcdafdc697e52a9b1b7d6fcf36616281ff9768a44e7ff3/pytest_asyncio-0.21.2.tar.gz", hash = "sha256:d67738fc232b94b326b9d060750beb16e0074210b98dd8b58a5239fa2a154f45", size = 30656, upload-time = "2024-04-29T13:23:24.738Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9c/ce/1e4b53c213dce25d6e8b163697fbce2d43799d76fa08eea6ad270451c370/pytest_asyncio-0.21.2-py3-none-any.whl", hash = "sha256:ab664c88bb7998f711d8039cacd4884da6430886ae8bbd4eded552ed2004f16b", size = 13368, upload-time = "2024-04-29T13:23:23.126Z" }, -] - -[[package]] -name = "pytest-operator" -version = "0.43.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "ipdb" }, - { name = "jinja2" }, - { name = "juju" }, - { name = "pytest" }, - { name = "pytest-asyncio" }, - { name = "pyyaml" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/2e/48/880facbcaca080b852854f60fd46b37ca2985b27dc7f1713857d9de6d469/pytest_operator-0.43.2.tar.gz", hash = "sha256:3db34dcd9c114a2e41a9bc61da72daf1264e7644fd5b92e855f250cb337e01c3", size = 149628, upload-time = "2025-10-04T14:38:45.16Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/96/a0/22b018287f4ff7a36cdb79745c196f28897184d27e18b90177f5dfc2a0f4/pytest_operator-0.43.2-py3-none-any.whl", hash = "sha256:d7d01ffe35d14b75577fd80a07c34f0a9f4835cfc6d373b8e2f995bcb4146bda", size = 48322, upload-time = "2025-10-04T14:38:43.763Z" }, -] - [[package]] name = "python-dateutil" version = "2.9.0.post0" @@ -2144,15 +1673,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" }, ] -[[package]] -name = "pytz" -version = "2026.6" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f5/b0/168030b0bfcc334cf09fa3313afdb888d892c8a0027324683d1de0ec277e/pytz-2026.6.tar.gz", hash = "sha256:3b0fc2727707663d6e517936f444fd8a8b240f1fc32f4bf7ee03274245945284", size = 318520, upload-time = "2026-10-29T09:05:47.011Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b6/25/564f3fc5b70c1398d706c51f2b1470d0ea0b1b2f96fee67877b6f5bdf3b6/pytz-2026.6-py2.py3-none-any.whl", hash = "sha256:7fed3fee8fd6bd4a2b7b75a8d56021d0624127bf69bd5691f115db929ac570b3", size = 506321, upload-time = "2026-10-29T09:05:45.14Z" }, -] - [[package]] name = "pyyaml" version = "6.0.3" @@ -2469,20 +1989,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, ] -[[package]] -name = "stack-data" -version = "0.6.3" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "asttokens" }, - { name = "executing" }, - { name = "pure-eval" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/28/e3/55dcc2cfbc3ca9c29519eb6884dd1415ecb53b0e934862d3559ddcb7e20b/stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9", size = 44707, upload-time = "2023-09-30T13:58:05.479Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f1/7b/ce1eafaf1a76852e2ec9b22edecf1daa58175c090266e9f6c64afcd81d91/stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695", size = 24521, upload-time = "2023-09-30T13:58:03.53Z" }, -] - [[package]] name = "tenacity" version = "9.0.0" @@ -2585,24 +2091,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c7/18/c86eb8e0202e32dd3df50d43d7ff9854f8e0603945ff398974c1d91ac1ef/tomli_w-1.2.0-py3-none-any.whl", hash = "sha256:188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90", size = 6675, upload-time = "2025-01-15T12:07:22.074Z" }, ] -[[package]] -name = "toposort" -version = "1.10" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/69/19/8e955d90985ecbd3b9adb2a759753a6840da2dff3c569d412b2c9217678b/toposort-1.10.tar.gz", hash = "sha256:bfbb479c53d0a696ea7402601f4e693c97b0367837c8898bc6471adfca37a6bd", size = 11132, upload-time = "2023-02-27T13:59:51.834Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f6/17/57b444fd314d5e1593350b9a31d000e7411ba8e17ce12dc7ad54ca76b810/toposort-1.10-py3-none-any.whl", hash = "sha256:cbdbc0d0bee4d2695ab2ceec97fe0679e9c10eab4b2a87a9372b929e70563a87", size = 8500, upload-time = "2023-02-25T20:07:06.538Z" }, -] - -[[package]] -name = "traitlets" -version = "5.16.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/2c/2e/a7fbfe268c8a3b32546930c0297c101d65a4a14c304ad5790a9f478f0e4e/traitlets-5.16.1.tar.gz", hash = "sha256:ed900c2b631aa3a112811139fa97b8d2c3bad5e989656bba4b7e52c7852c18c1", size = 166137, upload-time = "2026-08-03T08:32:36.848Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ad/66/0d785f0bc5e4315a96c989bb476d0fc07ea4f85132550c7b156ca2035d52/traitlets-5.16.1-py3-none-any.whl", hash = "sha256:f775618166caa0396c8e337099240f2bd3e5e917d203b2e6fbe21a58d3cb1f6b", size = 86211, upload-time = "2026-08-03T08:32:34.48Z" }, -] - [[package]] name = "truststore" version = "0.10.4" @@ -2646,19 +2134,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, ] -[[package]] -name = "typing-inspect" -version = "0.9.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "mypy-extensions" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/dc/74/1789779d91f1961fa9438e9a8710cdae6bd138c80d7303996933d117264a/typing_inspect-0.9.0.tar.gz", hash = "sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78", size = 13825, upload-time = "2023-05-24T20:25:47.612Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/65/f3/107a22063bf27bdccf2024833d3445f4eea42b2e598abfbd46f6a63b6cb0/typing_inspect-0.9.0-py3-none-any.whl", hash = "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f", size = 8827, upload-time = "2023-05-24T20:25:45.287Z" }, -] - [[package]] name = "typing-inspection" version = "0.4.4" @@ -2680,42 +2155,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717, upload-time = "2026-09-15T19:29:34.577Z" }, ] -[[package]] -name = "wcwidth" -version = "0.9.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ea/01/e5ac23733628a6bbb91913a765fcf55ee8070d8d991bc88fdaaf805052c7/wcwidth-0.9.4.tar.gz", hash = "sha256:fd8d57d3cdfe570e3265c8fab1885c24e34ef40889c0759c0c304a19e9835954", size = 970051, upload-time = "2026-10-24T18:11:44.954Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/bf/b8/d251589a100250b71a7b8e83fedfcabfd8bd60e78cd1e3329372f63bcc93/wcwidth-0.9.4-cp310-abi3-macosx_10_9_x86_64.whl", hash = "sha256:b7969c9aa258d536df54c8ac8af5cad0c74a6268c9972e1fb60a5f29feffb66d", size = 612952, upload-time = "2026-10-24T18:10:55.925Z" }, - { url = "https://files.pythonhosted.org/packages/04/e9/dfdca30ca36c472de3e260406dee29fc108499ec590c63b3fe279887ee9d/wcwidth-0.9.4-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:f279f32c8e206a9092fa350e53ca0c2bd8072e45b1c9fd31bb6d476b59b591c4", size = 618904, upload-time = "2026-10-24T18:11:02.008Z" }, - { url = "https://files.pythonhosted.org/packages/5d/b6/d7416f38054a107d2fb17c2b73b68723c6c334f69c4e29545fb9e6df81eb/wcwidth-0.9.4-cp310-abi3-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:a1526cd25c6420e5153bb7d764c7509e692215ee3ad9b725db1ad665d47eae09", size = 778780, upload-time = "2026-10-24T18:11:17.299Z" }, - { url = "https://files.pythonhosted.org/packages/7d/5b/42bdf9a4b0e4f9126584af2ec73642de495f3bd8add907430f13c3bb98d2/wcwidth-0.9.4-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:093469e01d881bff3db93ff3f56c364dc87c441ea01f9f41c22de0c0bdf5c6ef", size = 789012, upload-time = "2026-10-24T18:11:07.829Z" }, - { url = "https://files.pythonhosted.org/packages/fa/e8/0485850748dfdba9443f4151c7b2442cfa4987ba6cd871038eb5d6b8eca9/wcwidth-0.9.4-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b185c8b927b23af2721be1783499d1cfa5c028b098b0858951b4ae224477f1c2", size = 785946, upload-time = "2026-10-24T18:11:18.748Z" }, - { url = "https://files.pythonhosted.org/packages/e9/11/dd3d0379c6094524df6585b76ae3d9727161ff29c003177e3661c36437c1/wcwidth-0.9.4-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:17619066f95c10f44d7ae08ee456602456bc66cc9d5e91966ec73d799acebc5f", size = 795348, upload-time = "2026-10-24T18:11:09.931Z" }, - { url = "https://files.pythonhosted.org/packages/3c/48/1b5299983d9ec084be897162b7cc6014622dfe62847224fa3272b6d79ea5/wcwidth-0.9.4-cp310-abi3-musllinux_1_2_i686.whl", hash = "sha256:b52f265a694dda6b3ad9050c8bd89158ad519109ef7c5eb110b906cc49f25763", size = 793420, upload-time = "2026-10-24T18:11:20.551Z" }, - { url = "https://files.pythonhosted.org/packages/7a/be/e3097d859b075344a7be57774a58d468eafb0ca88e02aad93eb31d69f6ba/wcwidth-0.9.4-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:d8905f1390d828d745fdd1904374c90386d902d3cfa9ee88e9875099f75a4e17", size = 796192, upload-time = "2026-10-24T18:11:22.552Z" }, - { url = "https://files.pythonhosted.org/packages/5e/cd/739710c8cf0de461239db5bb6ee678c9a33d30aaa22beff55cc356781818/wcwidth-0.9.4-cp310-abi3-win32.whl", hash = "sha256:4831662c396dd4c59a016ec53c0ac96738006d653a00482777d9a2e2ea323d62", size = 593229, upload-time = "2026-10-24T18:11:35.609Z" }, - { url = "https://files.pythonhosted.org/packages/d6/f1/c123f902bc2ff9e9c2ab66241b8872204df87cbb18ecdf035e120860fedc/wcwidth-0.9.4-cp310-abi3-win_amd64.whl", hash = "sha256:f28d77153303450ee13ebbe888297e75cf532c754555b6cabafc9bdda16c421c", size = 597780, upload-time = "2026-10-24T18:11:36.952Z" }, - { url = "https://files.pythonhosted.org/packages/4b/88/1cb5ddaf5510b918e01aa95fc4b68df91dead784b63e4931037c5673e85f/wcwidth-0.9.4-cp310-abi3-win_arm64.whl", hash = "sha256:2b58fc8cf2de1bf9cdb68b8beaa5be198742414a7c8cd97aa51ec039783ffa49", size = 598786, upload-time = "2026-10-24T18:11:30.886Z" }, - { url = "https://files.pythonhosted.org/packages/b0/cc/46a31c12b4cdad04f546a3c0aca5d000d77aa5069ae88b4db24525cc29c4/wcwidth-0.9.4-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:87e4101789415a6cf55ec4c53eceeb4782c2654c88692941cb588f19dca1959f", size = 613805, upload-time = "2026-10-24T18:10:58.887Z" }, - { url = "https://files.pythonhosted.org/packages/18/f6/5a8327af9a65153ea9823d6a12fc182f325264050aa25c05a5deadc189c9/wcwidth-0.9.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ab1e5190fb82476e75fbf963e9d59b4fb1c1e1f4ced82069a0c989016aa959f7", size = 619936, upload-time = "2026-10-24T18:11:04.073Z" }, - { url = "https://files.pythonhosted.org/packages/1f/d3/bb8a7f4aa9b915e56e09841b07636ba49c82ec987ad3d2022e1696c038d9/wcwidth-0.9.4-cp314-cp314t-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:8f892713ab5795d3abae181e9c02db0eb24de4084f9ee080535369d3d98d7bb5", size = 794563, upload-time = "2026-10-24T18:11:24.4Z" }, - { url = "https://files.pythonhosted.org/packages/12/0c/986acadef534688a57502d484a40e0f30bdca2d39514fe0a311f7d575f70/wcwidth-0.9.4-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:befbf46467100e43fd8c8cc0c031a0105f13f5418c3be95fdcf0c47214487967", size = 806565, upload-time = "2026-10-24T18:11:14.297Z" }, - { url = "https://files.pythonhosted.org/packages/9b/1d/66a94b9ac07037d7cf2c1f1288867c9932215d467893eaa5ec8d548c7f2f/wcwidth-0.9.4-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9c4b0dd04cca520792100f6110d10be262c94b285a281d1759c551f159214633", size = 802372, upload-time = "2026-10-24T18:11:26.275Z" }, - { url = "https://files.pythonhosted.org/packages/d1/00/1d50b8e8b45a8330b582695bf8196081a609317928a3718cf21b3d14a899/wcwidth-0.9.4-cp314-cp314t-win32.whl", hash = "sha256:14410eb73178cc492aa9bf22f7c12e3bf930e5470b7220cf6f530efbfa2e03f3", size = 598917, upload-time = "2026-10-24T18:11:38.369Z" }, - { url = "https://files.pythonhosted.org/packages/b4/fc/3e39a33fc8f5c4e07611578710275039c9d4a6655e2be7cf3459401a30cc/wcwidth-0.9.4-cp314-cp314t-win_amd64.whl", hash = "sha256:c36954849aafae1092d6f9de9548c5280c1d6841637a27ca288b2241c802c4ab", size = 603536, upload-time = "2026-10-24T18:11:39.922Z" }, - { url = "https://files.pythonhosted.org/packages/e1/8c/b1f399fd2f8449e42978192967ab6df441d7cf894b10117983c36c062b18/wcwidth-0.9.4-cp314-cp314t-win_arm64.whl", hash = "sha256:79e09e9824c88f5e275ca99e921685567a5c5c1bb6165c16e27ddd1adab33a95", size = 605127, upload-time = "2026-10-24T18:11:32.367Z" }, - { url = "https://files.pythonhosted.org/packages/04/46/839780e772e9068580619d4d691348b7a5f9c4fa5ffe501e522eefeb27cc/wcwidth-0.9.4-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:a8c9ce14c6b4a499e61de6de7e9e456de11be8bc991554e2ab2ed4feb40b9664", size = 613850, upload-time = "2026-10-24T18:11:00.725Z" }, - { url = "https://files.pythonhosted.org/packages/d2/66/b2559c7012bbd4268f5b5c0288cb793c78235d354e306871a55893aa9d1a/wcwidth-0.9.4-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:d68f09093c9bec9226a52edc47487042ed4f64c5df91d06f00419495071c0279", size = 620207, upload-time = "2026-10-24T18:11:05.975Z" }, - { url = "https://files.pythonhosted.org/packages/d1/fe/7d2c39e28924b2430b20099e36276f14e00e75c7bbe4ba5b1ed44d1d465a/wcwidth-0.9.4-cp315-cp315t-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:d76b7c715c5ca0103b28915f699f1020ae21f06f1d22cdd85a7a97f7b1536eed", size = 797056, upload-time = "2026-10-24T18:11:27.911Z" }, - { url = "https://files.pythonhosted.org/packages/2b/d7/f4f9967a411e02b89b74df2f49f44977c4badccf29738f3ae6941619e27c/wcwidth-0.9.4-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:29c0685f5f5f8815b88308fdcbe2cd12a92996a21a5b1e18352d165174ef7a6d", size = 806169, upload-time = "2026-10-24T18:11:15.724Z" }, - { url = "https://files.pythonhosted.org/packages/ac/bb/e2b40c6522f3aa1222558487dda3551d297e07e245761b4816f6caeebc29/wcwidth-0.9.4-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e05458491759aa42b7b85f36345b3e6df082d6d2d9bf616299668fd598e0209d", size = 803462, upload-time = "2026-10-24T18:11:29.269Z" }, - { url = "https://files.pythonhosted.org/packages/a8/f2/ab69009f2dd0d3772d3e07f025fa046b33c60c195e4f2e5f000297d23547/wcwidth-0.9.4-cp315-cp315t-win32.whl", hash = "sha256:9e5090d253f5df99659cddfd3ed90dd21f6ff51989b0421331a63fb2681cbe27", size = 598931, upload-time = "2026-10-24T18:11:41.659Z" }, - { url = "https://files.pythonhosted.org/packages/63/6f/b321f10c2298e7d16cffc1a5f05f3d7e5231b45f9e68af5ee378e23bb2e5/wcwidth-0.9.4-cp315-cp315t-win_amd64.whl", hash = "sha256:12786620375dc83fabf4b2b2aa52416fef2bc6094522ea29c8a53c75b0dfe9b6", size = 603485, upload-time = "2026-10-24T18:11:43.052Z" }, - { url = "https://files.pythonhosted.org/packages/4e/cc/7eeb28059186cae72a770df79e744f232ef068192a5a588b718473e35bb4/wcwidth-0.9.4-cp315-cp315t-win_arm64.whl", hash = "sha256:2cca7b5d0b9d0ae49068d3ce806e965326a987f555b62eaa322223396e10d01b", size = 605198, upload-time = "2026-10-24T18:11:33.75Z" }, - { url = "https://files.pythonhosted.org/packages/6f/0c/309b1813b230d1dbbd6f2c2ab2bb21ef68992358977605d9ef289bbfedcc/wcwidth-0.9.4-py3-none-any.whl", hash = "sha256:901eace6d2dd25ebb917d0ce5db18e5c537e1504c905cf32f0d006c12098b05d", size = 301806, upload-time = "2026-10-24T18:10:52.651Z" }, -] - [[package]] name = "websocket-client" version = "1.9.0" @@ -2725,167 +2164,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/34/db/b10e48aa8fff7407e67470363eac595018441cf32d5e1001567a7aeba5d2/websocket_client-1.9.0-py3-none-any.whl", hash = "sha256:af248a825037ef591efbf6ed20cc5faa03d3b47b9e5a2230a529eeee1c1fc3ef", size = 82616, upload-time = "2025-10-07T21:16:34.951Z" }, ] -[[package]] -name = "websockets" -version = "17.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/75/79/590c5f0cc7d1661195aeefccb0e342b79f4c77d368d526d028821a390332/websockets-17.4.tar.gz", hash = "sha256:09d3939b70df0c8ad2da145ebd50978bccaee1d565e838b0e7921a34d38571eb", size = 191391, upload-time = "2026-10-30T15:10:35.873Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e7/d8/2d4ec550208432538d152a41f0c36dc6728cfae0050c6b1442605456d3bd/websockets-17.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:06ea46717553cdd10f2682126cf7a66e91c8ed17b6969f4a95e94b4e01d06188", size = 218746, upload-time = "2026-10-30T15:06:39.361Z" }, - { url = "https://files.pythonhosted.org/packages/56/99/3090fc0e2e343cc7ee60d532b67a2d413830c8fbb0be9ec3bcfbe3371f2e/websockets-17.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:75b32cf33ea40f945f226f97bc1d43151e1a5adff21f420b5e63c468b1a28114", size = 216437, upload-time = "2026-10-30T15:06:41.324Z" }, - { url = "https://files.pythonhosted.org/packages/3c/e9/3d4fb98e5d8aecc7bdbc59c4edf6380fdeddf935445e7f4a205466682991/websockets-17.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b8451f31ae24620cc9372acd2728d87922f2bb0cae3fa57aed68b152844cdf08", size = 216709, upload-time = "2026-10-30T15:06:42.995Z" }, - { url = "https://files.pythonhosted.org/packages/0c/4d/5c7d4f53cc0d7c6f268bbd93865b185e05f65f37f84712a41ab311118f8f/websockets-17.4-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:3b76837cd051d8875913f3934b27205f7a592f78b8a4f4a1f3abc36a2420c5bc", size = 225773, upload-time = "2026-10-30T15:06:44.607Z" }, - { url = "https://files.pythonhosted.org/packages/57/70/80f870701f8610e88649d3cd173a0e7ce66433913da3683035a4370063ad/websockets-17.4-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:cebad8f4796248b91fc2168515e507e5cb6b663a32befd09f3b1e7920acdcb1a", size = 226041, upload-time = "2026-10-30T15:06:46.224Z" }, - { url = "https://files.pythonhosted.org/packages/a2/bc/f2e84b5a933c86d52184814d38b0f9d51fc90fd3205cb7af0d9417ebbff2/websockets-17.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:954d43574f72be244b65f0fa61e2f814214b024f2ec849f487aa2f553f7c6e71", size = 227279, upload-time = "2026-10-30T15:06:47.619Z" }, - { url = "https://files.pythonhosted.org/packages/34/7e/4710475f46afbfe5390b4139556aa4fa0692d3d31878a25a1b26e8a6d78a/websockets-17.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b529ad6c81ad21db2f4e3d6e33db78ce3b9f272066b438b5d673361f9282898d", size = 230592, upload-time = "2026-10-30T15:06:49.357Z" }, - { url = "https://files.pythonhosted.org/packages/bd/10/cca6dc2316dd8c3b1a62fbf7f8986926ad8c4b2ae3d3be7888059a96b142/websockets-17.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:799c5a23126c9589cb10b6c6b54f9087246940dad20cd74bf3f06fc9ae3bbab5", size = 227837, upload-time = "2026-10-30T15:06:51.015Z" }, - { url = "https://files.pythonhosted.org/packages/68/21/ac1c3d7781d756bd40fbe501890b54a0205b1f0528a559fdcabcede0bd54/websockets-17.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f01a680d4b66fd15cc7513fae55c673cc8cc340d41340305b7f9a782abdbefed", size = 226613, upload-time = "2026-10-30T15:06:52.556Z" }, - { url = "https://files.pythonhosted.org/packages/b8/a0/bd122578f2765fb3714eeef80bd66074e355ff80e0a6de7fefa10de5f36a/websockets-17.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0e51546a3bedadd80dfa5c2efaed840ac51b8632d8db7f9f502175f5349382a9", size = 223893, upload-time = "2026-10-30T15:06:54.106Z" }, - { url = "https://files.pythonhosted.org/packages/51/50/a5214db6b778995b7fe1bfaab6228ba967cb6fd523d4b7af83154aa0ac66/websockets-17.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6686d29eaafddeeab9e48af92103dc0d26161035faa4be083b8b488f1ab47219", size = 226768, upload-time = "2026-10-30T15:06:55.889Z" }, - { url = "https://files.pythonhosted.org/packages/fb/41/5d62d4889ff8a400cf32c8ad35e58b18e92b0e936db0bae785307cd1b105/websockets-17.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:7b23db4b469d9e051ac74d96db9bf61e27c9054de64f8263fefa32bf72867ba1", size = 225358, upload-time = "2026-10-30T15:06:57.706Z" }, - { url = "https://files.pythonhosted.org/packages/b4/94/c344744fad06ae721a6ec69f728a3dd4bd1b94beb7bb64400a8cd0efc644/websockets-17.4-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:0132e3cbd3f5cfc1ec77588961b302d72a02e2603b82c2c23fd5fb59dc4fa206", size = 226125, upload-time = "2026-10-30T15:06:59.125Z" }, - { url = "https://files.pythonhosted.org/packages/0d/00/90d66792bf1ce315fabe18f838eb2090ebad3425139047ed4c4ad354a90c/websockets-17.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:98f16db5e79f2605194c0f899d0532005bb12269e698bf96f62a5635bcf33010", size = 227169, upload-time = "2026-10-30T15:07:00.687Z" }, - { url = "https://files.pythonhosted.org/packages/24/7f/c069129b20504c35bd22abb276a6562e92dccb69c974ca93021a23fb00ce/websockets-17.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:ee48728a07566c32e097d267f4d4d01b85123c9ae748a42da02185b908cbedc4", size = 224750, upload-time = "2026-10-30T15:07:02.077Z" }, - { url = "https://files.pythonhosted.org/packages/4e/3a/0fcb37d6da690aa2512faadb0e9cb5e1043fff659fd415dc8b518883789e/websockets-17.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:2103982762460a764a7ef0021443bb471f46d45ecc6858276e4fe699ebac6b94", size = 225782, upload-time = "2026-10-30T15:07:03.783Z" }, - { url = "https://files.pythonhosted.org/packages/49/61/422745448862b18b8d373347bb73debcd440330f21dd899feac5f920d531/websockets-17.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:648adde345cfd13335342e23cfe94871c7f7f55a43fb254f3b95acb071072968", size = 226021, upload-time = "2026-10-30T15:07:05.237Z" }, - { url = "https://files.pythonhosted.org/packages/96/74/3ea38c6758b497a5d1b7bd953542e9e6446b84aa075a061e9a47e24ceb75/websockets-17.4-cp311-cp311-win32.whl", hash = "sha256:679eef0123861ca381dd8fd9bdc1920e87636ac55eae6cff875c53dcb05fbcf8", size = 219255, upload-time = "2026-10-30T15:07:06.871Z" }, - { url = "https://files.pythonhosted.org/packages/55/66/00ca8b75a634c9fcf70579f9a242b96a7f7a3abeb21a02e2380fff491d2c/websockets-17.4-cp311-cp311-win_amd64.whl", hash = "sha256:e4beaef2f4796558e738e15ca0b8802e35f419a9fa374a978e41706f43c48b26", size = 219556, upload-time = "2026-10-30T15:07:08.538Z" }, - { url = "https://files.pythonhosted.org/packages/4b/7b/c8ccb313439f4803779f186b8133563e6c49c023467a265ae52da7b7e25d/websockets-17.4-cp311-cp311-win_arm64.whl", hash = "sha256:ddab54dc0ec46ed09ef9ac131252cb5740ed21fbe6fc145f3c6fed0b575a8f15", size = 219487, upload-time = "2026-10-30T15:07:09.94Z" }, - { url = "https://files.pythonhosted.org/packages/af/71/b020221345ea6c012dcf7496827a48a744b58696470b2b07fef95a32905a/websockets-17.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:3d512e3a6c528c42ce220ed9c3caff83c6fdcd98a1b98249f08ccfc66ad111b1", size = 218779, upload-time = "2026-10-30T15:07:11.522Z" }, - { url = "https://files.pythonhosted.org/packages/8e/84/1c372ae7c032021a84e5c9e9b76b0dddefb354e9b4af783a97efd4d80ab3/websockets-17.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7390e060f830b3d132f484b21ac2783a2d227b682ef62bb8146e1c1b4ca0e45a", size = 216457, upload-time = "2026-10-30T15:07:13Z" }, - { url = "https://files.pythonhosted.org/packages/74/b6/cff249107473f149c6c916a49cba967379fa63b0a7d2dce6896d6848f0a3/websockets-17.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bcad49104711f88b2b7c3ba166de172857d837248205e541b044a552558fecc3", size = 216726, upload-time = "2026-10-30T15:07:14.468Z" }, - { url = "https://files.pythonhosted.org/packages/77/5d/aff8ecbf1c55c4d96f6dacc46a52102895f58b85bb284c8d325aaf31606a/websockets-17.4-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cf99debb17227a50620aee16647bb33a0387f5fa5418d628666c0f05745e0d2a", size = 226043, upload-time = "2026-10-30T15:07:15.937Z" }, - { url = "https://files.pythonhosted.org/packages/cb/18/6229d6583031ca81d092a0cd887a13a57b402fb555acc323d39b45967eb7/websockets-17.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9ae1429ee9e52b139167ed0169757806a27ed7307e942e8c62037a9184e9843b", size = 226321, upload-time = "2026-10-30T15:07:17.563Z" }, - { url = "https://files.pythonhosted.org/packages/b8/61/7aba018fd53873e792a25afe1f4c005518133477b727d7455f2f7550c425/websockets-17.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:51adfc30f467077293a6695d8149bcef501c0728386f3a491054f835dadb60b2", size = 227559, upload-time = "2026-10-30T15:07:18.998Z" }, - { url = "https://files.pythonhosted.org/packages/fb/66/37b207df9cdacaa017aa4487f3a9f2fcd668f6f7cfbafdac5b95ea258ee0/websockets-17.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c564d1e6531611bf87078c28780456ecc75459dcca189629fff2fe7c020d8e67", size = 230386, upload-time = "2026-10-30T15:07:20.431Z" }, - { url = "https://files.pythonhosted.org/packages/ad/f6/87507e11fbae53817a435945273953b5b020589e309fac4fd60527ee5999/websockets-17.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4c792e6cce24d08f92199d907785c9e64f74c357deeed3dbaf7d699ed5930b64", size = 228193, upload-time = "2026-10-30T15:07:22.112Z" }, - { url = "https://files.pythonhosted.org/packages/2f/3d/90a04f0aa989b68fbd2efcd38237420afe2abe5a1cab0b5d7c2aa4f0dbb6/websockets-17.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c44776f82b04e623eb9e1b81fcd17ac6e9808ae1ba5cdf8edce1f7c869a95a9b", size = 226952, upload-time = "2026-10-30T15:07:23.643Z" }, - { url = "https://files.pythonhosted.org/packages/ad/3e/50952af22b8e3e2d03f7e83f0e335851c6b484c3fd88586626fb1c2a34b3/websockets-17.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4d2636a5b61c69e32db0e74b57073dd4a66f1ad195e9398c5f01bba41090deea", size = 224183, upload-time = "2026-10-30T15:07:25.507Z" }, - { url = "https://files.pythonhosted.org/packages/c4/73/2a4a5d9c6bca1127f24af7bf08f406a69052d7f341bc81f08d9e8eb446b4/websockets-17.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:cfbbba4597f19ad717f79fd3f2a67ae7efae647bd6a61e14554e1b5ad242a5bf", size = 226991, upload-time = "2026-10-30T15:07:27.355Z" }, - { url = "https://files.pythonhosted.org/packages/68/de/90d96a579839bfe541ef214315df81d2bd519d952847c303328518ffdd02/websockets-17.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:c7b996c02de5e032cb63dc65482b73693b7ecaa586654126be2749ddea239c40", size = 225600, upload-time = "2026-10-30T15:07:28.973Z" }, - { url = "https://files.pythonhosted.org/packages/91/17/12c15ed446d842e40918cd16e79b56ee4422d6fbf210258cb8882f50bbd5/websockets-17.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a920e99155d75d1b1c08172da8aaa7200e7b30871fb628d1631d7891a333e30e", size = 226366, upload-time = "2026-10-30T15:07:30.472Z" }, - { url = "https://files.pythonhosted.org/packages/9d/73/cb4c927e806a73a0377696e031ef3c0db409028cdb2373f96ee863e8df8e/websockets-17.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8c00c5c49f80a588a2c4f99d519d2abed4ce26cdca11273041bc8b7e60af60de", size = 227470, upload-time = "2026-10-30T15:07:32.122Z" }, - { url = "https://files.pythonhosted.org/packages/33/b3/e682b3ea069933044f4bf4809eea0cd83e3a5bdbdff601d1777a9ae90795/websockets-17.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:52c31d123f5adf14dec694c2a4036bf42c523df7cefc641d31cd05653de56e49", size = 225026, upload-time = "2026-10-30T15:07:33.544Z" }, - { url = "https://files.pythonhosted.org/packages/2d/e9/d039757260705e5a265a31c9fff36b0d4567b842ce2b54e5d14369f200bd/websockets-17.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:d0acd8191c0e5a61d1c27bfa33b6ec8431982299f5d71c02129aa4f16f182ad0", size = 226007, upload-time = "2026-10-30T15:07:34.954Z" }, - { url = "https://files.pythonhosted.org/packages/db/e7/cb9907fac6f9b28f93beded6efda2953960cd02b633d432acf3451590859/websockets-17.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2a9cb5bbfc33b4ebd3c8d3714d6e09805437f60a14977774e4bd11b5ace46c23", size = 226286, upload-time = "2026-10-30T15:07:36.292Z" }, - { url = "https://files.pythonhosted.org/packages/39/99/85f6f4dd104a5d9a33a1ef272f501d0f2e8527ddf66be1b383d51f90ce56/websockets-17.4-cp312-cp312-win32.whl", hash = "sha256:c63c0d7832956d5f3bb77888b93c854569d13f806289ff75c43926d25c6e5fd2", size = 219256, upload-time = "2026-10-30T15:07:37.686Z" }, - { url = "https://files.pythonhosted.org/packages/59/31/d1636ba67ee9232a60033d90483e48686aa3856014e59110f29015f97bd2/websockets-17.4-cp312-cp312-win_amd64.whl", hash = "sha256:dde9cd67f18803949ebf96de8aba12b8ec5ee3115e34c75a2db85a3b0a6c20d5", size = 219561, upload-time = "2026-10-30T15:07:39.19Z" }, - { url = "https://files.pythonhosted.org/packages/23/aa/e3859d52188f041a5a05c9f3ac005a9c829723f521f0fe60e2c5f9c93bb9/websockets-17.4-cp312-cp312-win_arm64.whl", hash = "sha256:c634053459278cf31fb404ddb5ecd38124e4609e8b609166da621edc2d5796db", size = 219487, upload-time = "2026-10-30T15:07:41.161Z" }, - { url = "https://files.pythonhosted.org/packages/cd/58/eaf27fce59e3f5b9997cd7c77749ef214e077daeffac95479be6ff9f5cfa/websockets-17.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f24bed98595b9d854da8d6debaf82754abf3e8fe63ec90505ef560566814df7e", size = 218769, upload-time = "2026-10-30T15:07:42.558Z" }, - { url = "https://files.pythonhosted.org/packages/13/8e/287eca6d399a953253492189153976676994dfba1b7e82f0f992d14c1404/websockets-17.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:156221ad7638b5abccefd6f798916bf3f8ffd6ac51480eb4ba5b05df914ccbf3", size = 216454, upload-time = "2026-10-30T15:07:43.874Z" }, - { url = "https://files.pythonhosted.org/packages/b3/65/098fd4d221d691395492fcba88c895dde19a51d371b06b8d0be71d3f781b/websockets-17.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:74e46409666c358b93fce0d8c6f4cb107d8dd7cba1302a38d49adf6fa8193c7e", size = 216715, upload-time = "2026-10-30T15:07:45.409Z" }, - { url = "https://files.pythonhosted.org/packages/e9/29/9f9833bc83c1bf2e5597d1ef374d3ccd6467b9b45400cff399c85331ef6c/websockets-17.4-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:e3e80cad85ba68c07c1e8d4ccc9cf51e63bf6a73d6bf631640be947bd72b6b63", size = 226096, upload-time = "2026-10-30T15:07:46.929Z" }, - { url = "https://files.pythonhosted.org/packages/ef/75/6a95f93661bba2f1a4ec82eb26c6d30e6ba253569ecabb7a675139db6051/websockets-17.4-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:25eb661d8ba7e2b85ebb4e7a1bb9f6a3280910ed10b84330a7abfb5ed32d2764", size = 226382, upload-time = "2026-10-30T15:07:48.332Z" }, - { url = "https://files.pythonhosted.org/packages/80/b0/b0d9427dde0609e2727a9a966fb5fc5c6ef6aa7eba4cfc98791f8b7f1b75/websockets-17.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c74954409ea5789f7a60daa5f94580c00ad0b60b20751c47b35c4784877b5057", size = 227617, upload-time = "2026-10-30T15:07:49.799Z" }, - { url = "https://files.pythonhosted.org/packages/3b/00/fb1016d850d61676d1732434e2361d116c1de369078e59d21f4713115a19/websockets-17.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:47beedf07a706140b50786457e082497ee6b5970c41e49bcd1572ee3f4c73f80", size = 229054, upload-time = "2026-10-30T15:07:51.258Z" }, - { url = "https://files.pythonhosted.org/packages/77/c4/bb666e196541e42237fdb625303ad099005cc835c4e2e0a5d97bb9c4185c/websockets-17.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9e282f35ece8895b9fa5af406fc6a4cb42f01e1009525cf46641de584781c83b", size = 228243, upload-time = "2026-10-30T15:07:52.975Z" }, - { url = "https://files.pythonhosted.org/packages/6d/f1/32ae0f45d8464e1606ef3f6a54318d8754b27889de18bb1b2176a19bea39/websockets-17.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:361f9a21a33191d5287e7a75f508fc3b9bf47aaffb0241198d6b7be3384f294e", size = 226995, upload-time = "2026-10-30T15:07:54.574Z" }, - { url = "https://files.pythonhosted.org/packages/f8/9f/5680151ef10e0bfb6f3bf09a992ce6c3e93bbb84fc8ec5d03ad570ac6532/websockets-17.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4073ab7cefe5a2e7dc368c1f01eb27716dc8ea8f1c69e9b7725ebce05aa53cf7", size = 224244, upload-time = "2026-10-30T15:07:56.158Z" }, - { url = "https://files.pythonhosted.org/packages/e2/66/409117b6882b91960598d62b95fac33d70a7aa2e1e1e854c6b64e76712f6/websockets-17.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a50bd9b44dd9b7b845802030b4d88610c01c7f95571b4cbd3a1aeec17a34c9fd", size = 227058, upload-time = "2026-10-30T15:07:57.539Z" }, - { url = "https://files.pythonhosted.org/packages/35/e6/34cab5913bea9d011ae2592a7672340179ff14fb98e889e5e41b071d8134/websockets-17.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:ad2e9e152bec6c4f7e4cdb4adcea6b708400090eec04bfe5ee5b30d368ffd721", size = 225654, upload-time = "2026-10-30T15:07:59.044Z" }, - { url = "https://files.pythonhosted.org/packages/a6/b0/6cfe18e12f23618a3d69723c828037c1282fee7ffce006ae7b5cc0e58ca4/websockets-17.4-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:5830f94a7190a33e55d06d89242ea951ee2009c3a27fc31538f3ac9386b27edd", size = 226425, upload-time = "2026-10-30T15:08:00.492Z" }, - { url = "https://files.pythonhosted.org/packages/c9/71/14d31ea34bafc07c6d96b362a44b301b9a0f2fb260490a8a6cb7db682bc4/websockets-17.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c0cc2cb47face4dae64bd70a9268dbebddb3e48c1b48cf6d7b6ac1471609fd88", size = 227532, upload-time = "2026-10-30T15:08:01.932Z" }, - { url = "https://files.pythonhosted.org/packages/28/69/df3398ca1320a8b76e57ee41053d5c09955383cf60888ffa5771f51a4cc8/websockets-17.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:d0b6a9bd86f865ebc9d847a1eb0a655a0e2b447cbcde743dda97c4298415cc0b", size = 225090, upload-time = "2026-10-30T15:08:03.328Z" }, - { url = "https://files.pythonhosted.org/packages/d6/94/06afe778cf9893e9ac10209c0d4c70aaf0b72289245a8b7efb92cc80927c/websockets-17.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:7a7e9321822ca59ba56fa8744c3e3f01ef74d547aafe0d383d000d7a4d11eb79", size = 226041, upload-time = "2026-10-30T15:08:04.714Z" }, - { url = "https://files.pythonhosted.org/packages/c6/7a/28e9822dbf0bc63341dc45d8d5f1f1f7f375991fc8895bc731105fbde371/websockets-17.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:de29795f23833cdfb68ba45c8a5cc0ec49778ea5deb670188f4465bba5930d25", size = 226323, upload-time = "2026-10-30T15:08:06.103Z" }, - { url = "https://files.pythonhosted.org/packages/5a/d8/606c9c404e82731e4520f6397c8c16549e9cbd39ac583e7ea7d8972a6ae7/websockets-17.4-cp313-cp313-win32.whl", hash = "sha256:37ed7782972545e67d97ef9a172e9499d25459b1e32cb99d1c2a30c572f2441b", size = 219248, upload-time = "2026-10-30T15:08:07.617Z" }, - { url = "https://files.pythonhosted.org/packages/60/a1/17e507dadbfccb755758ba977b165fec92924dfc4a8d2573b4fc1561b0cd/websockets-17.4-cp313-cp313-win_amd64.whl", hash = "sha256:203e42eb77e06f85778a908b34c5ad032f34e98a68ef33920d6685c1e65a9420", size = 219560, upload-time = "2026-10-30T15:08:09.108Z" }, - { url = "https://files.pythonhosted.org/packages/01/ba/4f51fe8db73889ea3ecfdeee283d4ac3b7ad7a609c0e4c1fc6de04078021/websockets-17.4-cp313-cp313-win_arm64.whl", hash = "sha256:d8255971f6789cf0cb365e3e22b9b166eba978548a26241eaa5b7af0440d885a", size = 219496, upload-time = "2026-10-30T15:08:10.574Z" }, - { url = "https://files.pythonhosted.org/packages/1f/5b/085530961668661300de7248f9bf3ba84e98f47875f0fcc87637d024f82b/websockets-17.4-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:d0f943b53bb1d7389d72a5380078670e5fcc34a1328142148b72d20fd82031c7", size = 218810, upload-time = "2026-10-30T15:08:12.14Z" }, - { url = "https://files.pythonhosted.org/packages/f2/fb/5a29e9569f74988822b7bc076287dd7f9f5b68a2070cf5eb4cfada5863d8/websockets-17.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:2fd562372d4afaf18d1c7f1c68e39bd32818bb16d5f57f778a4a4ed88eedcaae", size = 216506, upload-time = "2026-10-30T15:08:13.561Z" }, - { url = "https://files.pythonhosted.org/packages/df/73/eb8544367c13cd87df39d41b74853741fb7182e2a4bb659ad7d36f9066c8/websockets-17.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:a0457561e8a87a6a3b509e21c35084d7d207ced262139de3f738e9676a476bbd", size = 216719, upload-time = "2026-10-30T15:08:15.08Z" }, - { url = "https://files.pythonhosted.org/packages/24/fe/c3707e426d9bd779dfad9f319b2b431e5e60d563d7547d3780cbd1646028/websockets-17.4-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7b4ee34acefa9ba1333f02b817982f1e4127f6f9b975017a707c4e738d7f9fb9", size = 226098, upload-time = "2026-10-30T15:08:16.581Z" }, - { url = "https://files.pythonhosted.org/packages/c1/24/d203439f909ffbf37260ca28a3432381412d2e79912ebf98be572e63055e/websockets-17.4-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:ef03fb4b3685df0ed9dc6a074a090f030345cad2c23c61818da3e08e693a9caa", size = 226449, upload-time = "2026-10-30T15:08:18.29Z" }, - { url = "https://files.pythonhosted.org/packages/4b/17/3ae5d9486a170a222dd0437b4f2bc02ecf324177498a942dcac200e65d05/websockets-17.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c5e970d3996c597186c9dbb6e77a8048737a834ac03cb13186a54999e0e1c31e", size = 227695, upload-time = "2026-10-30T15:08:19.692Z" }, - { url = "https://files.pythonhosted.org/packages/34/37/1307a8e30a961726f2350982fc01b0b3498db29b030c78c566e65ba64487/websockets-17.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6afc32a7a1a40b071070419537df3559d26907086556769683fa97b7b6e90fd5", size = 229069, upload-time = "2026-10-30T15:08:21.682Z" }, - { url = "https://files.pythonhosted.org/packages/9c/bd/4c6167744e202d20a3c770bcde8fae5d427317b1885712c2e02718cd8133/websockets-17.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5da7f7f1ecf866186f195f7ecc374c915e1838496b86f2f3b41da27c798a25c3", size = 228296, upload-time = "2026-10-30T15:08:23.371Z" }, - { url = "https://files.pythonhosted.org/packages/14/b3/3438eee41b39afb44c3c6e45dd686b88a7f8d742b96877b77de4fe0e0255/websockets-17.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:043945a43873c7c11a3f75238d475c95f902e967de329eb8763704546cfaa6b6", size = 227045, upload-time = "2026-10-30T15:08:24.749Z" }, - { url = "https://files.pythonhosted.org/packages/46/39/0bac9052d402efaad1b202ff2f1a57b6334aa624d20f509312765601b507/websockets-17.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:927d602fb8fb595a69e6b1ae998a6ec19851d0fb9391759456e6425090996647", size = 224297, upload-time = "2026-10-30T15:08:26.275Z" }, - { url = "https://files.pythonhosted.org/packages/a1/7f/5809f6ba5a7d1065301800daf605bdb661a9db5ef868ed189dbf691122ac/websockets-17.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:769e4f7b090e10cae4c082e3e39b9458ec2444505df84953c16c0468b16539c4", size = 227169, upload-time = "2026-10-30T15:08:27.703Z" }, - { url = "https://files.pythonhosted.org/packages/fc/f7/c8f6771e7cc2a038cf78bb12d04d29dbbbabf2a84d76999bcc94532f3020/websockets-17.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:03ddf4eb76ced8725dcbb000ff60b0fb8d7330ed011f6dc725a1925c5fe02051", size = 225632, upload-time = "2026-10-30T15:08:29.441Z" }, - { url = "https://files.pythonhosted.org/packages/2c/2f/9104786d952978ca2d011321109e35c05be24c3937ef2a62b4d6e25f7515/websockets-17.4-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:94622cf24e80d03054ceb69a06a86c950e12fe993ed06b933f7895232cacbc3e", size = 226415, upload-time = "2026-10-30T15:08:30.962Z" }, - { url = "https://files.pythonhosted.org/packages/ae/a7/2e1606b3d616b86bb6c70a62d5f87fc9a3dbd81f0bbe24c4706ace76751d/websockets-17.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:bc581579885728bb54ef15000295c20e6a64a200b1b73d5cfca71879a3eb3e1f", size = 227594, upload-time = "2026-10-30T15:08:32.443Z" }, - { url = "https://files.pythonhosted.org/packages/67/2d/78ca44e2be6d397aee63a4e68d3a99a33bb14bb3405e94688bc5a2160db5/websockets-17.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:f42671900e0b602d05a074c52fd3d757c2f8e5c4f73f771794dae1aa4aea5f0e", size = 225146, upload-time = "2026-10-30T15:08:33.888Z" }, - { url = "https://files.pythonhosted.org/packages/d9/b6/6dad684e54fc8e09d70c9a095506db5c836207d8e846e3cb1e79424e3492/websockets-17.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:2b23dacf7a8a88afe92f77bcdbf4cf043a84692bac2f2da02f4011c687e19b48", size = 226095, upload-time = "2026-10-30T15:08:35.285Z" }, - { url = "https://files.pythonhosted.org/packages/d9/e5/7b04bad7c11c1f92238429352defbac1406743338049afe1328c7a7f95c0/websockets-17.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d48795c7d64ca1c42e3d61fcc6478cb15a19b6ad3f9c882bc8d8dee49d4a420f", size = 226395, upload-time = "2026-10-30T15:08:36.8Z" }, - { url = "https://files.pythonhosted.org/packages/b1/16/4eb29c4b12f77b3139470063308ae1e6a0860b9073b1d27d56e8ce19c512/websockets-17.4-cp314-cp314-win32.whl", hash = "sha256:8588edf317fbe4f16a949bc5a6ccdd22b6e6fd5b4745d128bc40bccf31024ce5", size = 218784, upload-time = "2026-10-30T15:08:38.263Z" }, - { url = "https://files.pythonhosted.org/packages/6d/85/2496a24de80c215b55a15f037bc368a2ed0ce7ecb1e909039ff4e76395de/websockets-17.4-cp314-cp314-win_amd64.whl", hash = "sha256:70293c25d79d1f084fdd665894481547575e429d2a75e8d72caec2f6b6b07af8", size = 219137, upload-time = "2026-10-30T15:08:40.112Z" }, - { url = "https://files.pythonhosted.org/packages/9a/a3/cfe95d4eb569035e5a1d2e5cbeb4ccf0eb15a19e1ef2ad819a85960bf375/websockets-17.4-cp314-cp314-win_arm64.whl", hash = "sha256:adc30e5d064c9e33049e825408fa4e952f4e8a0cf4c329dc2ded72e1bb5bae08", size = 219017, upload-time = "2026-10-30T15:08:41.778Z" }, - { url = "https://files.pythonhosted.org/packages/2b/dd/4143048a2b27303e7de8ef53d7d0ee3987734fbf93e09491d5a1b0a55187/websockets-17.4-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:bbb6bed49f083e2ec8ae0bb21c00c7c5171ab8e08a8b008c61a43fc6c944fdac", size = 219141, upload-time = "2026-10-30T15:08:43.184Z" }, - { url = "https://files.pythonhosted.org/packages/a8/3e/a63b5f3a5c24be2898eb22a3093a56d4ac4cd24ae79e7ab7a1b971ed4611/websockets-17.4-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:c7a56140fcbf4662cb263754a754c651a16fe2196cae1fd232d18f89acd30c83", size = 216675, upload-time = "2026-10-30T15:08:44.682Z" }, - { url = "https://files.pythonhosted.org/packages/d6/80/f238a10f0b23853c665c602a42784023995ac26674e480252c21af39f4f8/websockets-17.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:18d3710becc612ec6f0229425bd6495133dfcbf30f7b6569585acc8ed2f1b452", size = 216880, upload-time = "2026-10-30T15:08:46.304Z" }, - { url = "https://files.pythonhosted.org/packages/d1/b1/899b69aba1e8d65ac5bfe90b97ada22a815f1dcd3840bf188104738aac33/websockets-17.4-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:00ad98e4bb0df7a6711c645eec16d5a9fdf99f0692bd4f5b6cb85a68677ba8df", size = 226462, upload-time = "2026-10-30T15:08:47.723Z" }, - { url = "https://files.pythonhosted.org/packages/28/a8/598c2b2a22dfe14d352400df804db8b78a68c1498b3f775a658f07f21618/websockets-17.4-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7849a096d6fdba3f2bdf849eb89f2d233a24400c92faa3efb25fa8dc615b706c", size = 226741, upload-time = "2026-10-30T15:08:49.314Z" }, - { url = "https://files.pythonhosted.org/packages/6e/ad/84a6de3cc3dd4ee336428c31f89a82e002299f83e10d967f0e9a5cbaf591/websockets-17.4-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e30550965c78223439815dbdf40c93eb8931dfbf12427110dcfcaeebef76feb6", size = 227914, upload-time = "2026-10-30T15:08:50.746Z" }, - { url = "https://files.pythonhosted.org/packages/69/ab/1e191b97d60a934c071b7b73c39c5db39721a925cc53acd929c615f85550/websockets-17.4-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:725be1aff55f1c873a79cea0f612df9dff21a9d2c2e05783665b824b8aa7c24e", size = 230059, upload-time = "2026-10-30T15:08:52.596Z" }, - { url = "https://files.pythonhosted.org/packages/f2/57/ef8a64732ef4367091ab05f9b22c1ee4c28657d4a0d088a644198eb5ded6/websockets-17.4-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b6c7f91520c29420639925fd1cecceac9ca07366b50c09ea24eac1cd116b4866", size = 228486, upload-time = "2026-10-30T15:08:53.967Z" }, - { url = "https://files.pythonhosted.org/packages/48/1f/dbad3afcacf2c52d1fdf83b611d849598f0a047d7333ff476266532877b8/websockets-17.4-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6531540aa63e6864cb0615a3a5da70ae03191334507852a5385320bb7916df3f", size = 227216, upload-time = "2026-10-30T15:08:55.687Z" }, - { url = "https://files.pythonhosted.org/packages/5b/47/59e325d6ca3e04ba5cc7a139d891ef83cad3fb460a183c8f359f378b69a9/websockets-17.4-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0a57b99f2e28922b5a2434317580fd23fdf118caff4c5b752f5452836426205a", size = 224755, upload-time = "2026-10-30T15:08:57.203Z" }, - { url = "https://files.pythonhosted.org/packages/b8/b6/28a471318dfb0060b58c47d0a252cb5078528a1aa1fdf5e6e88e2a61cf18/websockets-17.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8fd30d217a4275107667fe1d4f601e2d50c797d0727148cfbb384536d65f04d3", size = 227508, upload-time = "2026-10-30T15:08:58.597Z" }, - { url = "https://files.pythonhosted.org/packages/ee/29/7485ac6fc4b342b43964811381f56276fec967cae6a851ae4b815613b10c/websockets-17.4-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:cc0cd4065a65ac98f3e2742ee9f314da9d224db49b07dc17d3a20cef0d79658d", size = 225961, upload-time = "2026-10-30T15:09:00.414Z" }, - { url = "https://files.pythonhosted.org/packages/95/a6/520e1f7aa9644ddf58f5a51fc37f46e15293a68cd35b70d5b81b7331ca1e/websockets-17.4-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:71f76bb8e59be847330b8a8d3753f85397677e128f9f9692c215f8cf721cefc7", size = 226851, upload-time = "2026-10-30T15:09:01.979Z" }, - { url = "https://files.pythonhosted.org/packages/e5/0d/444799abe7418f361da8c201c6858b64b4e8d47265f90851e5cb68b4d90f/websockets-17.4-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:c2db7b9e2d726f7e051bedb67abcf460b84b11437b2f9fdacda7e6931dace85b", size = 227869, upload-time = "2026-10-30T15:09:03.405Z" }, - { url = "https://files.pythonhosted.org/packages/cb/86/6da20322a07364a0ab0787a2b0d4367770f59404fdab6e35122413a7f63e/websockets-17.4-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:332b88022d0acd47c44158bcd43f47f14eaddcd979247f242b1a33291c45cdd1", size = 225562, upload-time = "2026-10-30T15:09:04.891Z" }, - { url = "https://files.pythonhosted.org/packages/2a/da/53e44d96238dc207011ad5d93b0540c58e1c680a86f48dc3fa8e5138b343/websockets-17.4-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:5cec3e7fbc911ff4fcf43b24aaf1b96906381ad36030f42897def3ff4b78729e", size = 226334, upload-time = "2026-10-30T15:09:06.42Z" }, - { url = "https://files.pythonhosted.org/packages/18/08/82cea972a87f229ee1903e9adf74c17d1e6c4371d581ebb11ccbed4e3a7b/websockets-17.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:cbdf4b42f4514422051889424fd03bc269be8c5d751bf39ec29ad761590bd10d", size = 226767, upload-time = "2026-10-30T15:09:07.837Z" }, - { url = "https://files.pythonhosted.org/packages/96/f3/ee6afff802e39e8d6ef29ee4bdc30f8272aaa38295c19a911fad91fe95fc/websockets-17.4-cp314-cp314t-win32.whl", hash = "sha256:16550e24ac22c27e0a728100d8de196b5f054bab6748ef9f0b168fb8b3c32e35", size = 218918, upload-time = "2026-10-30T15:09:09.31Z" }, - { url = "https://files.pythonhosted.org/packages/11/56/b0b07917f9c85a4d24a37300f4ae888bfa7c20f08902dd6a5c61a0d1b26f/websockets-17.4-cp314-cp314t-win_amd64.whl", hash = "sha256:5ec906bb21b35e66cfdcc2ea0133f249f52b7d89e3e45ec8d2bd2d84a0255d7d", size = 219260, upload-time = "2026-10-30T15:09:10.832Z" }, - { url = "https://files.pythonhosted.org/packages/19/a6/a63113909ea602d3d22b0f32a7a9950d8d18b725cfdce735eab9b5f5d198/websockets-17.4-cp314-cp314t-win_arm64.whl", hash = "sha256:c00f0c45851a2c61efffd03dde8fb4d594026b5cc18196c94e15460f1225f2ed", size = 219176, upload-time = "2026-10-30T15:09:12.444Z" }, - { url = "https://files.pythonhosted.org/packages/ee/be/4032fde05e62d1c52edd250fda475e910cac0cd180e377690bff24147b5e/websockets-17.4-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:8c51ac7b31578a7275650f580aac985940985b6d2e57247ac6d5e07f2c936cd6", size = 218740, upload-time = "2026-10-30T15:09:13.833Z" }, - { url = "https://files.pythonhosted.org/packages/74/1c/b47f5786eb45599072411571651606fb22f6e825d522d627daad974ea636/websockets-17.4-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:023dc13bdc42a55e152acc81c39c90ec6cc4159ed17d23c6d73460fa2a73ab16", size = 216470, upload-time = "2026-10-30T15:09:15.394Z" }, - { url = "https://files.pythonhosted.org/packages/70/98/0021f55de633617b4a8390cca17e700c9ba5d99323103128412dc2c15aca/websockets-17.4-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:6fd8cac4907fec8302726d49e6969acfffaf720bc39b1cee23f473b81f4dce01", size = 216695, upload-time = "2026-10-30T15:09:17.185Z" }, - { url = "https://files.pythonhosted.org/packages/28/56/2c67389b47c4b9e9e9318d9b3e4bb52a2fef3749ff00b0b151a342c4d42d/websockets-17.4-cp315-cp315-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:4441d655a53185ef1b01b1d42ad9b3a96b905110a9219043e3fdaec855ba3b6e", size = 226134, upload-time = "2026-10-30T15:09:19.156Z" }, - { url = "https://files.pythonhosted.org/packages/75/bd/ee3a679a10741a0cdd7aa8bdd6d03999069672826aa7a6495fdf589ed961/websockets-17.4-cp315-cp315-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:3acc45494c08a4d27375a2c28474537f68910219f42624a08011221b04623d04", size = 226569, upload-time = "2026-10-30T15:09:20.587Z" }, - { url = "https://files.pythonhosted.org/packages/c4/42/b293a5d07099549797138d09fda5bf878d302b4980e61678981c8dfdc98f/websockets-17.4-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3b78b39377630a70aa2198e5f03be416e690364a046b1d8af80a9263733083d0", size = 227726, upload-time = "2026-10-30T15:09:22.015Z" }, - { url = "https://files.pythonhosted.org/packages/2d/81/d048ff83c4d0fc386f6008529d12690d0dcb410f73570430f13fe4d543f0/websockets-17.4-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6cf4c002268da5c11cae9083aec71ac943bce9d95e0f83c8bf9a95a3ce421fbb", size = 229426, upload-time = "2026-10-30T15:09:23.444Z" }, - { url = "https://files.pythonhosted.org/packages/e6/21/1df51f94047dfb76c32fd7508036e4b55352d0f04fd0e3bee525a2122225/websockets-17.4-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ed7fe197b8bb66eef4f62c052e33752d456d2fdda74805469d4bd954950ab339", size = 228211, upload-time = "2026-10-30T15:09:24.902Z" }, - { url = "https://files.pythonhosted.org/packages/cf/13/33d6a28471da4c30a98a2313c76f984be2056a703c5c532225dc28f5dba3/websockets-17.4-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f0494d3d97502e270282cc6a1f8648cd7335b4fe8d5c452006e5b7f9d62b8892", size = 227106, upload-time = "2026-10-30T15:09:26.315Z" }, - { url = "https://files.pythonhosted.org/packages/4a/86/ff8441e56ca677e51f9c826868fccde2a82bafe0ffa337fd38823b64253a/websockets-17.4-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ab9e4bd60796866c578e3afa0a17c98636887827a39c2e238a61989c18fd8e7b", size = 224499, upload-time = "2026-10-30T15:09:28.116Z" }, - { url = "https://files.pythonhosted.org/packages/da/91/470d7a619ce4aa837ff5b6a5836227c43bdfdc42ef837cce48f508992438/websockets-17.4-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:8d148b4b295224d3a19e7bd9f02ebe7344de254b3b2c4d0628ce42ade0bca119", size = 227213, upload-time = "2026-10-30T15:09:29.847Z" }, - { url = "https://files.pythonhosted.org/packages/a4/ba/55ed1422d6c73b5b81996ca195f2a256a339b26c553f5686afc2a926bc2b/websockets-17.4-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:6597a1f7413189b4bc58437babcdf39b79da416e5c477ae98323a88ecc108188", size = 225876, upload-time = "2026-10-30T15:09:31.249Z" }, - { url = "https://files.pythonhosted.org/packages/e9/59/f133d260e7a48d3e231c3a495eeb6114b880c1e96bfc781a949c1f73991c/websockets-17.4-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:a9b0026538719f7a532998d84640ab2e91ca1a051ce4b8d924fdcb607307e921", size = 226403, upload-time = "2026-10-30T15:09:33.199Z" }, - { url = "https://files.pythonhosted.org/packages/45/16/bb3355453ffdc31d3a14ddc0b50e058f13a97d2ed019ba6c380e03456169/websockets-17.4-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:a703f23ca15a51251fc94f1774683f5aa511588a7ad6bbb83960cdb2a4dcd978", size = 227558, upload-time = "2026-10-30T15:09:34.703Z" }, - { url = "https://files.pythonhosted.org/packages/0c/ab/f3d55a83c2a4daa8bf62594b00a721dc8767518ccb833f932b0178eb6c19/websockets-17.4-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:6b061ea7ca94966af7cd7a87cb189ff15972c103244611a2b1e8408c04f1dbe6", size = 225369, upload-time = "2026-10-30T15:09:36.204Z" }, - { url = "https://files.pythonhosted.org/packages/88/66/3a320bfb718d9ae1eff15ba7790979c0e6fdec74e388430f426e6647d7f4/websockets-17.4-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:e6d2a185ec4ff0478089305abd833da3a9fda8803eb77325b89ebeae5585a3b7", size = 226268, upload-time = "2026-10-30T15:09:37.565Z" }, - { url = "https://files.pythonhosted.org/packages/da/ee/1f9cdeeaaa2d5e158b7a40f971e74b641b35f977674b46229a5bb14e270a/websockets-17.4-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:9a4e95d56994a45ac76541853796720436ffe462957d0b1b89e87ff3d3b1627e", size = 226530, upload-time = "2026-10-30T15:09:39.171Z" }, - { url = "https://files.pythonhosted.org/packages/da/28/506406ef09e6e168796f0187bdac0767f38a560e6785c4ee26e583aaaf76/websockets-17.4-cp315-cp315-win32.whl", hash = "sha256:b7ea61af293a153f2d67430038cf0efc10140caa623f2bdf5a9f5a457ff20f57", size = 218751, upload-time = "2026-10-30T15:09:40.748Z" }, - { url = "https://files.pythonhosted.org/packages/25/a6/818647a9a9b3ee8bf131e9ab4fa1f2db9c6539f08e7084dd57549e0bd49d/websockets-17.4-cp315-cp315-win_amd64.whl", hash = "sha256:8b45d40f07081b377f0b837ddbfba4a9ab4a89a7b569d3c095436564e767a27b", size = 219045, upload-time = "2026-10-30T15:09:42.251Z" }, - { url = "https://files.pythonhosted.org/packages/3d/b2/0338a9abec3df8556627af987352657ce1c8456f2060b54741570b174122/websockets-17.4-cp315-cp315-win_arm64.whl", hash = "sha256:29b615c2d5dd883f89c107a782681b73a7aa8b2bd894130310e45eb09b143913", size = 218957, upload-time = "2026-10-30T15:09:43.866Z" }, - { url = "https://files.pythonhosted.org/packages/68/92/22e83d003cdbd22be5d35e28c260203e9fbb6c73b17a8e1509f4ad49e74d/websockets-17.4-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:c568e72f5425a74616daeb824afe28da460cbeea036432f41c6af5380b83300d", size = 219056, upload-time = "2026-10-30T15:09:45.528Z" }, - { url = "https://files.pythonhosted.org/packages/2f/ca/071d38e7237f6ada4f577b74f7cbf5bc2ff7e1f9360ebd2837e74a22dfd4/websockets-17.4-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:bfc86dff091104eec770c29ea1831dbe191968a70aa2d8ae8eda3240d863970a", size = 216630, upload-time = "2026-10-30T15:09:46.951Z" }, - { url = "https://files.pythonhosted.org/packages/fa/76/22d4523f92d88b8f5ebfd3df7ab5e825146af100f7e2caeae7d359ae51ea/websockets-17.4-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:f5f06f59e19aa0770aaf651ce91c196fa620b35aed49a7e6c36e7335f3f83db7", size = 216841, upload-time = "2026-10-30T15:09:48.285Z" }, - { url = "https://files.pythonhosted.org/packages/87/29/bc94be4a8bc19ef518e9efecd90a992f2991b7cfc6eb8a7430c4e2dc097c/websockets-17.4-cp315-cp315t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:8f32a6cb0b101170abc2d8053af1473a2a29ef2a06d7130994ee8455a50f5dbf", size = 226992, upload-time = "2026-10-30T15:09:49.776Z" }, - { url = "https://files.pythonhosted.org/packages/fa/25/58f69b5fec064764ddf5b88045397433cdb028f5b17c82fbe047fd31fff7/websockets-17.4-cp315-cp315t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:72d0a731eccf482d5661c6711abfcd5921f3dbfbbb0789061e1918ef4bc89c70", size = 227258, upload-time = "2026-10-30T15:09:51.172Z" }, - { url = "https://files.pythonhosted.org/packages/21/7c/bc932a54c5f1bd78461574aea539fc562fd2de494738a2c0675c4de860be/websockets-17.4-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:48c83103f82fce36191a9e3a8a80731d4340e2da544eae8c5aaaf6a45280e7d0", size = 228589, upload-time = "2026-10-30T15:09:52.628Z" }, - { url = "https://files.pythonhosted.org/packages/c4/92/57ec83066d0bfa8a9b9f594bc61951073c4a86e34c562a5292604118dab6/websockets-17.4-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c8052c3058c402d53602583da5ddcf1a15a63ab1efe0222f47c7be59944e6463", size = 230217, upload-time = "2026-10-30T15:09:54.058Z" }, - { url = "https://files.pythonhosted.org/packages/6e/fc/0f2fe533b5b4dc22ac704b3357f5c99fa60a3837218b3c6c6ad63a60120e/websockets-17.4-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0c22a9c6b2349204f56123dd0ca7779e989d68e336d0dc02ad823485d44925de", size = 229026, upload-time = "2026-10-30T15:09:55.727Z" }, - { url = "https://files.pythonhosted.org/packages/7c/cc/ed28307835106a9a2dbd1a5efc597e8befa3d0a5f2b46a4c1e466b2f4759/websockets-17.4-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0dcce83837328e6795225ead920d3aa8d867cc9d6922aa558b0e9111599fdbb9", size = 227904, upload-time = "2026-10-30T15:09:57.221Z" }, - { url = "https://files.pythonhosted.org/packages/39/4d/24ad7deddc7b31c3e430acc1c00c7b384ae42f1f973e9cc01aa42d19628f/websockets-17.4-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4b79ea31cf277c72d2307c6cb8bd32a2c151959e80a2f24fa85df620c5f2860c", size = 225253, upload-time = "2026-10-30T15:09:58.624Z" }, - { url = "https://files.pythonhosted.org/packages/93/f6/9c92230ebfab42fee482b236c45c32ed34b24f7360080b400cce6cfcac11/websockets-17.4-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:3d27153a0413696767b98b5d96173a2a7e27cbfca02000a6069cea7b977765a7", size = 228089, upload-time = "2026-10-30T15:10:00.308Z" }, - { url = "https://files.pythonhosted.org/packages/fe/7a/f523830e562da9b1d7a610174752753720c5e47e84b59b5fc47721d416bd/websockets-17.4-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:e0feb03a338f8f5e819ae23a73aabb7b46fd3b73f15f7df782dd12d99e2b02ad", size = 226743, upload-time = "2026-10-30T15:10:01.744Z" }, - { url = "https://files.pythonhosted.org/packages/2c/e6/d1a56495cb7b1a0a4688145131be38cfd0c1342bde8125e136a6e6ee494e/websockets-17.4-cp315-cp315t-musllinux_1_2_i686.whl", hash = "sha256:9ff89e36451a19775e7556d95ebfa4a0b24b84cc87565d6b5d0ec8ea82bf3f2c", size = 227237, upload-time = "2026-10-30T15:10:03.417Z" }, - { url = "https://files.pythonhosted.org/packages/44/41/c4e53f7ad63838d7eba6e82c5d743827e91dafe5e48c88a58f7e90043945/websockets-17.4-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:ee6c4e0085bff5f6621bf9c53452584dcb91ebd993ce841e1f4061ac12b6b556", size = 228348, upload-time = "2026-10-30T15:10:05.149Z" }, - { url = "https://files.pythonhosted.org/packages/ca/01/f6f78c3edeb8ad2b3c35a8c4117ec2cf9346215afaed8155af1e7933818b/websockets-17.4-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:1962f3bfde085af18878f1bb1aafb300c9a6ac33da886d0b0d97e33c9ce7a222", size = 226099, upload-time = "2026-10-30T15:10:06.588Z" }, - { url = "https://files.pythonhosted.org/packages/8d/01/d8c11740231b63d1aba6bad6b1d4e72e8384b26c5448801da238ebe82c92/websockets-17.4-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:42d7a6e818214336cf7af9a3aae5c6923f94f09fa07ac5aab98268ba2a98a6d5", size = 226956, upload-time = "2026-10-30T15:10:08.141Z" }, - { url = "https://files.pythonhosted.org/packages/99/87/dbfd43ae01ea8fdb7478a1b3d58b32aca83bb9c4aa61ebe187d1e188ac8e/websockets-17.4-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:c9f8fdb7bbefc4907c2bb3593f810f2b67a2d5329e1d38724a1aa3d763cf63eb", size = 227253, upload-time = "2026-10-30T15:10:09.533Z" }, - { url = "https://files.pythonhosted.org/packages/bf/8e/fbd968a75428063560ada02d564de8d6c49ca34ec29dfb78e5d900f4b0ef/websockets-17.4-cp315-cp315t-win32.whl", hash = "sha256:506623128d7a55b726a5a46e4c9a8eae4c9dd0f04ff60b041fe7df85b9d034fe", size = 218877, upload-time = "2026-10-30T15:10:10.925Z" }, - { url = "https://files.pythonhosted.org/packages/f9/53/8f37a3943517bba77fc86f7c4162c455018c5b6d760c5e9c9a11de9e37f7/websockets-17.4-cp315-cp315t-win_amd64.whl", hash = "sha256:6e6558efbb256b532c9f06a21ba42bcac729718e365c505819f181f25e5c0eca", size = 219195, upload-time = "2026-10-30T15:10:12.336Z" }, - { url = "https://files.pythonhosted.org/packages/69/35/cf33cba7248fcd80cfe5911ffe67aa2637f50c2bfaada123b1e9d2aeca90/websockets-17.4-cp315-cp315t-win_arm64.whl", hash = "sha256:fcac44d917672ad6257ad64b80b5168306f168a78cab5c0612e4c699caed18cf", size = 219117, upload-time = "2026-10-30T15:10:13.771Z" }, - { url = "https://files.pythonhosted.org/packages/a0/80/78c580302991d229ac5ad0a00c361916f7f84deaf6dd76370034dd8e7383/websockets-17.4-pp311-pypy311_pp80-macosx_10_15_x86_64.whl", hash = "sha256:73b00645316121105274fd266ed54a20e6514650126d399cdea39876ab1e7b04", size = 216364, upload-time = "2026-10-30T15:10:15.472Z" }, - { url = "https://files.pythonhosted.org/packages/d9/27/7d18d381994c7c27a855131ae064ff43ec00ded636b7c6ead4abb4cec841/websockets-17.4-pp311-pypy311_pp80-macosx_11_0_arm64.whl", hash = "sha256:02f380df26de14999ecace203fe1396ac14d1c6132afc7924eb6f8c8b646c69d", size = 216642, upload-time = "2026-10-30T15:10:17.153Z" }, - { url = "https://files.pythonhosted.org/packages/fc/91/43e73997fbdc7ef3cb434148888329113a07b66d97a8ea6aa2f93e574028/websockets-17.4-pp311-pypy311_pp80-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f5b1d315a615cec81a79e2ce3a94221dc5c23e7fd4012897085d3b5e5a5638d0", size = 217587, upload-time = "2026-10-30T15:10:19.123Z" }, - { url = "https://files.pythonhosted.org/packages/a8/17/5e3e6be945512aff7351c9f60134803902ccb07cd7d6c9becdfa349a32d5/websockets-17.4-pp311-pypy311_pp80-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:046ed16d3d83d64594e4a40655fef061ccf36059d8c30a01feca8a9481fe13b8", size = 217478, upload-time = "2026-10-30T15:10:20.665Z" }, - { url = "https://files.pythonhosted.org/packages/7d/5f/0a1ee98aeff04c200492a479a386ff106d1ef6d5c9d6613959b3e3d79469/websockets-17.4-pp311-pypy311_pp80-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f772007dfba8941873dbd276b6a6845428cc740888b5c6c37bf483b1ea34b42", size = 218371, upload-time = "2026-10-30T15:10:22.35Z" }, - { url = "https://files.pythonhosted.org/packages/17/97/acb333fa9a54bb1ad616c1add65185f9ab580c3c76366a3d1abc1090979b/websockets-17.4-pp311-pypy311_pp80-win_amd64.whl", hash = "sha256:accb5e9492b9bc9c9aeec5b72ea8f2ddcbefc6143d1c626fba960ecbdc89807e", size = 306811, upload-time = "2026-10-30T15:10:23.76Z" }, - { url = "https://files.pythonhosted.org/packages/e9/a3/d8fbc72c5c0e78905caf2d6dcf806e532451e3f48e2a09a8ebe1de9ad412/websockets-17.4-pp312-pypy312_pp80-macosx_10_15_x86_64.whl", hash = "sha256:c7f66a53e9b7ec831abb15e3d9b6cee8f52d6a24cd0a374786bf46c3ec218bc6", size = 216397, upload-time = "2026-10-30T15:10:25.255Z" }, - { url = "https://files.pythonhosted.org/packages/d3/de/1bf313cd0f4662df4884a7602932cd13347090e59dd6047865eee2bb5aa5/websockets-17.4-pp312-pypy312_pp80-macosx_11_0_arm64.whl", hash = "sha256:4fb2db1f649b6464711846b5bb9c1611bd906ce939d9460cbd1fa419552cd6c3", size = 216664, upload-time = "2026-10-30T15:10:27.016Z" }, - { url = "https://files.pythonhosted.org/packages/30/e2/7912bd417511b54907853bd495aef2daee111062dbafd43d133a3f7253a7/websockets-17.4-pp312-pypy312_pp80-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:32110d954d9d0e51f36edb0396673bf4d35193a0a80ba7013bf7f7d58a33ca07", size = 217603, upload-time = "2026-10-30T15:10:28.475Z" }, - { url = "https://files.pythonhosted.org/packages/56/6f/2e8d5610f6184a2e1720bf8ce256402ed99ad30ea87c461fba5bc4d651d9/websockets-17.4-pp312-pypy312_pp80-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:88ba8a439b2bad97bb69c38db5bf0ec16a061ee834cf0f244089186ee803e899", size = 217489, upload-time = "2026-10-30T15:10:29.999Z" }, - { url = "https://files.pythonhosted.org/packages/29/3a/a05bc57eadcd7e8e072d917888128e6d22e1203984afb21a8da3198982fe/websockets-17.4-pp312-pypy312_pp80-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:868744c68e9342768888c7326604da2228c19bb6946aa46b5f9e1ac32ea8d40b", size = 218356, upload-time = "2026-10-30T15:10:31.432Z" }, - { url = "https://files.pythonhosted.org/packages/b2/49/eed86bfb8863093a82cbaa52c9159be1ce2374d5ace6fe1f8e8031567e7d/websockets-17.4-pp312-pypy312_pp80-win_amd64.whl", hash = "sha256:829bcaa90be8737c132d9515d6a466e8528e3b3d050d3f3466f36ea94d3beb48", size = 306838, upload-time = "2026-10-30T15:10:32.954Z" }, - { url = "https://files.pythonhosted.org/packages/eb/27/9db924cb0dbf22eade78d98fbae77790f9bf6bc729e6ab29aef9d68e4156/websockets-17.4-py3-none-any.whl", hash = "sha256:c6bd2c9781915592b209160d0f017d4c7c82ad53075e6b0c24d2a89299e7f9e9", size = 212900, upload-time = "2026-10-30T15:10:34.482Z" }, -] - [[package]] name = "wsproto" version = "1.3.2" From 2e0e8af30c9375027d0f74c6ab14cdd3d988071e Mon Sep 17 00:00:00 2001 From: xavipg003 Date: Fri, 20 Nov 2026 05:52:45 -0500 Subject: [PATCH 2/5] Changed substrate type for already existing enum --- tests/integration/charm/backup_helpers.py | 14 +++--- tests/integration/charm/conftest.py | 18 +++---- tests/integration/charm/helpers.py | 30 +++++------ .../charm/high_availability/conftest.py | 18 +++---- .../test_async_replication.py | 16 +++--- .../test_async_replication_upgrade_edge.py | 10 ++-- .../test_async_replication_upgrade_stable.py | 14 +++--- .../test_logical_replication.py | 50 ++++++++++--------- .../test_logical_replication_circular.py | 30 +++++------ .../high_availability/test_patroni_reinit.py | 6 +-- .../high_availability/test_replication.py | 16 +++--- .../charm/high_availability/test_restart.py | 6 +-- .../high_availability/test_self_healing_1.py | 14 +++--- .../high_availability/test_self_healing_2.py | 22 ++++---- .../high_availability/test_self_healing_3.py | 36 ++++++------- .../charm/high_availability/test_smoke.py | 20 ++++---- .../test_synchronous_policy.py | 6 +-- .../charm/high_availability/test_upgrade.py | 16 +++--- .../test_upgrade_from_stable.py | 8 +-- .../test_upgrade_skip_pre_upgrade_check.py | 12 ++--- .../new_relations/test_new_relations_1.py | 16 +++--- .../new_relations/test_relations_coherence.py | 6 +-- tests/integration/charm/test_audit.py | 8 +-- tests/integration/charm/test_backups_aws.py | 4 +- tests/integration/charm/test_backups_ceph.py | 4 +- tests/integration/charm/test_backups_gcp.py | 10 ++-- .../charm/test_backups_pitr_aws.py | 4 +- .../charm/test_backups_pitr_ceph.py | 4 +- .../charm/test_backups_pitr_gcp.py | 4 +- tests/integration/charm/test_charm.py | 26 +++++----- tests/integration/charm/test_config.py | 6 +-- .../charm/test_invalid_database.py | 6 +-- .../charm/test_invalid_extra_user_roles.py | 6 +-- .../integration/charm/test_ipv6_deployment.py | 4 +- tests/integration/charm/test_ldap.py | 6 +-- .../charm/test_password_rotation.py | 10 ++-- tests/integration/charm/test_pg_hba.py | 6 +-- tests/integration/charm/test_plugins.py | 6 +-- .../charm/test_predefined_roles.py | 10 ++-- tests/integration/charm/test_storage.py | 8 +-- tests/integration/charm/test_subordinates.py | 6 +-- tests/integration/charm/test_tls.py | 24 ++++----- .../integration/charm/test_username_prefix.py | 16 +++--- tests/integration/charm/test_wrong_arch.py | 17 +++---- tests/integration/conftest.py | 25 +++++----- tests/integration/types.py | 13 ----- 46 files changed, 302 insertions(+), 315 deletions(-) delete mode 100644 tests/integration/types.py diff --git a/tests/integration/charm/backup_helpers.py b/tests/integration/charm/backup_helpers.py index cd51e2e4..669fcd88 100644 --- a/tests/integration/charm/backup_helpers.py +++ b/tests/integration/charm/backup_helpers.py @@ -17,6 +17,7 @@ import jubilant import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from single_kernel_postgresql.utils.backup import CANNOT_RESTORE_PITR from tenacity import Retrying, stop_after_attempt, wait_exponential @@ -29,7 +30,6 @@ wait_for_apps_status, ) from tests.integration.helpers.postgresql import db_connect -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -273,7 +273,7 @@ def backup_deploy( charm: str, app_name: str, charm_resources: dict[str, str] | None, - substrate: Substrate, + substrate: Substrates, s3_integrator_app_name: str, tls_certificates_app_name: str | None, tls_channel: str | None, @@ -299,7 +299,7 @@ def backup_deploy( config={"profile": "testing"}, num_units=2, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) if use_tls: @@ -328,7 +328,7 @@ def backup_operations( charm: str, app_name: str, charm_resources: dict[str, str] | None, - substrate: Substrate, + substrate: Substrates, s3_integrator_app_name: str, tls_certificates_app_name: str | None, tls_channel: str | None, @@ -400,7 +400,7 @@ def backup_operations( # Scale down to be able to restore (on K8s only the last pod can be removed). with fast_forward(juju): - if substrate == Substrate.vm: + if substrate == Substrates.VM: juju.remove_unit(replica) juju.wait( lambda status: len(status.get_units(database_app_name)) == 1, timeout=10 * 60 @@ -448,7 +448,7 @@ def pitr_backup_operations( charm: str, app_name: str, charm_resources: dict[str, str] | None, - substrate: Substrate, + substrate: Substrates, s3_integrator_app_name: str, tls_certificates_app_name: str | None, tls_channel: str | None, @@ -513,7 +513,7 @@ def pitr_backup_operations( logger.info("1: scaling down to do restore") # On K8s only the last pod can be removed. with fast_forward(juju, "60s"): - if substrate == Substrate.vm: + if substrate == Substrates.VM: juju.remove_unit(replica) juju.wait( lambda status: ( diff --git a/tests/integration/charm/conftest.py b/tests/integration/charm/conftest.py index b10d9b96..be275b03 100644 --- a/tests/integration/charm/conftest.py +++ b/tests/integration/charm/conftest.py @@ -9,6 +9,7 @@ import pytest import yaml +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.backup_helpers import ( AWS, @@ -18,39 +19,38 @@ setup_microceph, ) from tests.integration.charm.helpers import RoleAttributeValue -from tests.integration.types import Substrate TEST_CHARMS_PATH = Path(__file__).parents[2] / "charms" -def _metadata(substrate: Substrate) -> dict: - path = TEST_CHARMS_PATH / f"postgresql_{substrate}_test_charm" / "metadata.yaml" +def _metadata(substrate: Substrates) -> dict: + path = TEST_CHARMS_PATH / f"postgresql_{substrate.value}_test_charm" / "metadata.yaml" return yaml.safe_load(path.read_text()) @pytest.fixture(scope="session") -def app_name(substrate: Substrate) -> str: +def app_name(substrate: Substrates) -> str: """Application name of the test charm (postgresql or postgresql-k8s).""" return _metadata(substrate)["name"] @pytest.fixture(scope="session") -def charm(substrate: Substrate, app_name: str, architecture: str) -> str: +def charm(substrate: Substrates, app_name: str, architecture: str) -> str: """Path to the test charm built by scripts/build_charm.sh.""" - charm_dir = TEST_CHARMS_PATH / f"postgresql_{substrate}_test_charm" + charm_dir = TEST_CHARMS_PATH / f"postgresql_{substrate.value}_test_charm" path = charm_dir / f"{app_name}_ubuntu@24.04-{architecture}.charm" if not path.exists(): pytest.fail( f"{path} not found, build it with:" - f" scripts/build_charm.sh -c tests/charms/postgresql_{substrate}_test_charm" + f" scripts/build_charm.sh -c tests/charms/postgresql_{substrate.value}_test_charm" ) return str(path) @pytest.fixture(scope="session") -def charm_resources(substrate: Substrate) -> dict[str, str] | None: +def charm_resources(substrate: Substrates) -> dict[str, str] | None: """Resources to deploy the test charm with (the OCI image on K8s, none on VM).""" - if substrate == Substrate.vm: + if substrate == Substrates.VM: return None resources = _metadata(substrate)["resources"] return {name: resource["upstream-source"] for name, resource in resources.items()} diff --git a/tests/integration/charm/helpers.py b/tests/integration/charm/helpers.py index 3e715356..e54d0899 100644 --- a/tests/integration/charm/helpers.py +++ b/tests/integration/charm/helpers.py @@ -30,6 +30,7 @@ from lightkube.core.client import GlobalResource from lightkube.core.exceptions import ApiError from lightkube.resources.core_v1 import PersistentVolume, PersistentVolumeClaim, Pod, Service +from single_kernel_postgresql.config.enums import Substrates from single_kernel_postgresql.config.literals import PEER_RELATION, SYSTEM_USERS_PASSWORD_CONFIG from tenacity import ( RetryError, @@ -51,7 +52,6 @@ wait_for_idle, ) from tests.integration.helpers.postgresql import db_connect, execute_query -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -218,7 +218,7 @@ def get_cluster_roles(juju: jubilant.Juju, unit_name: str) -> dict[str, list[str return members -def check_cluster_members(juju: jubilant.Juju, app_name: str, substrate: Substrate) -> None: +def check_cluster_members(juju: jubilant.Juju, app_name: str, substrate: Substrates) -> None: """Check that the Patroni cluster members are the application units. On VM the member hosts are also checked against the unit addresses. @@ -237,14 +237,14 @@ def check_cluster_members(juju: jubilant.Juju, app_name: str, substrate: Substra assert [member["name"] for member in members] == [ name.replace("/", "-") for name in units ] - if substrate == Substrate.vm: + if substrate == Substrates.VM: assert [member["host"] for member in members] == [ unit.public_address for unit in units.values() ] def scale_application( - juju: jubilant.Juju, app_name: str, count: int, substrate: Substrate + juju: jubilant.Juju, app_name: str, count: int, substrate: Substrates ) -> None: """Scale an application to a number of units and wait for it to be active. @@ -255,7 +255,7 @@ def scale_application( if change > 0: juju.add_unit(app_name, num_units=change) elif change < 0: - if substrate == Substrate.vm: + if substrate == Substrates.VM: juju.remove_unit(*units[:-change], destroy_storage=True) else: juju.remove_unit(app_name, num_units=-change) @@ -296,10 +296,10 @@ def switchover( def run_command_on_unit( - juju: jubilant.Juju, unit_name: str, command: str, substrate: Substrate + juju: jubilant.Juju, unit_name: str, command: str, substrate: Substrates ) -> str: """Run a shell command on the workload of a unit (the postgresql container on K8s).""" - if substrate == Substrate.vm: + if substrate == Substrates.VM: return juju.exec(command, unit=unit_name).stdout return juju.ssh(unit_name, command, container="postgresql") @@ -357,7 +357,7 @@ def build_connection_string( juju: jubilant.Juju, application_name: str, relation_name: str, - substrate: Substrate, + substrate: Substrates, *, relation_id: int | None = None, relation_alias: str | None = None, @@ -391,7 +391,7 @@ def build_connection_string( relation_alias, ) host = endpoints.split(",")[0].split(":")[0] - if substrate == Substrate.k8s: + if substrate == Substrates.K8S: # The endpoint is the service hostname: use its cluster IP. client = Client(namespace=(juju.model or "").split(":")[-1]) host = client.get(Service, name=host.split(".")[0]).spec.clusterIP @@ -525,7 +525,7 @@ def check_tls_replication(juju: jubilant.Juju, unit_name: str, enabled: bool) -> def check_tls_patroni_api( - juju: jubilant.Juju, unit_name: str, enabled: bool, substrate: Substrate + juju: jubilant.Juju, unit_name: str, enabled: bool, substrate: Substrates ) -> bool: """Return whether the Patroni REST API of a unit answers through TLS. @@ -533,11 +533,11 @@ def check_tls_patroni_api( it isn't, since the unit IP doesn't match the certificate hostname (a k8s hostname). """ unit_address = get_unit_address(juju, unit_name) - tls_ca = get_tls_ca(juju, unit_name, "peer") if substrate == Substrate.vm else "" + tls_ca = get_tls_ca(juju, unit_name, "peer") if substrate == Substrates.VM else "" # If there is no TLS CA in the relation, something is wrong in # the relation between the TLS Certificates Operator and PostgreSQL. - if substrate == Substrate.vm and enabled and not tls_ca: + if substrate == Substrates.VM and enabled and not tls_ca: return False try: @@ -547,7 +547,7 @@ def check_tls_patroni_api( with attempt, tempfile.NamedTemporaryFile() as temp_ca_file: temp_ca_file.write(tls_ca.encode("utf-8")) temp_ca_file.seek(0) - verify = temp_ca_file.name if substrate == Substrate.vm and enabled else False + verify = temp_ca_file.name if substrate == Substrates.VM and enabled else False health_info = requests.get(f"https://{unit_address}:8008/health", verify=verify) return health_info.status_code == 200 except RetryError: @@ -654,7 +654,7 @@ def run_upgrade( juju: jubilant.Juju, app_name: str, charm: str, - substrate: Substrate, + substrate: Substrates, resources: dict[str, str] | None, ) -> None: """Refresh an application to the charm under test and wait for the refresh to finish. @@ -663,7 +663,7 @@ def run_upgrade( resume-refresh runs on the second unit; on K8s the highest numbered pod is refreshed first and resume-refresh runs on the leader. """ - if substrate == Substrate.vm: + if substrate == Substrates.VM: _run_upgrade_vm(juju, app_name, charm) else: _run_upgrade_k8s(juju, app_name, charm, resources) diff --git a/tests/integration/charm/high_availability/conftest.py b/tests/integration/charm/high_availability/conftest.py index 623099fb..79c3e2f0 100644 --- a/tests/integration/charm/high_availability/conftest.py +++ b/tests/integration/charm/high_availability/conftest.py @@ -7,6 +7,7 @@ import jubilant import pytest +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_attempt, stop_after_delay, wait_fixed from tests.integration.charm import helpers @@ -16,7 +17,6 @@ get_postgresql_app_name, ) from tests.integration.helpers.juju import fast_forward, get_app_leader, wait_for_idle -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -51,9 +51,9 @@ def juju_primary_start_timeout(juju: jubilant.Juju) -> None: @pytest.fixture() -def juju_restart_policy(juju: jubilant.Juju, substrate: Substrate) -> None: +def juju_restart_policy(juju: jubilant.Juju, substrate: Substrates) -> None: """Set the same Pebble restart policy on all units (K8s only).""" - if substrate == Substrate.vm: + if substrate == Substrates.VM: yield return @@ -88,9 +88,9 @@ def juju_loop_wait(juju: jubilant.Juju) -> None: @pytest.fixture() -def juju_reset_restart_condition(juju: jubilant.Juju, substrate: Substrate): +def juju_reset_restart_condition(juju: jubilant.Juju, substrate: Substrates): """Set and restore the systemd restart condition concurrently on all VM units.""" - if substrate == Substrate.k8s: + if substrate == Substrates.K8S: yield return @@ -144,9 +144,9 @@ def continuous_writes(juju): @pytest.fixture() -def juju_chaos_mesh(juju: jubilant.Juju, substrate: Substrate) -> None: +def juju_chaos_mesh(juju: jubilant.Juju, substrate: Substrates) -> None: """Deploy and remove Chaos Mesh exactly like the async fixture (K8s only).""" - if substrate == Substrate.vm: + if substrate == Substrates.VM: yield return @@ -157,7 +157,7 @@ def juju_chaos_mesh(juju: jubilant.Juju, substrate: Substrate) -> None: @pytest.fixture() -def juju_wal_settings(juju: jubilant.Juju, substrate: Substrate) -> None: +def juju_wal_settings(juju: jubilant.Juju, substrate: Substrates) -> None: """Restore the same WAL settings on each unit as the async fixture.""" initial_max_wal_size = helpers.get_postgresql_parameter(juju, "max_wal_size") initial_min_wal_size = helpers.get_postgresql_parameter(juju, "min_wal_size") @@ -165,7 +165,7 @@ def juju_wal_settings(juju: jubilant.Juju, substrate: Substrate) -> None: yield app = helpers.get_postgresql_app_name(juju) for unit in juju.status().apps[app].units: - if substrate == Substrate.vm: + if substrate == Substrates.VM: helpers.run_ha_command_on_unit(juju, unit, "snap start charmed-postgresql.patroni") patroni_password = helpers.get_password( juju, helpers.get_postgresql_app_name(juju), "patroni" diff --git a/tests/integration/charm/high_availability/test_async_replication.py b/tests/integration/charm/high_availability/test_async_replication.py index fe2e549c..ff152864 100644 --- a/tests/integration/charm/high_availability/test_async_replication.py +++ b/tests/integration/charm/high_availability/test_async_replication.py @@ -9,6 +9,7 @@ import jubilant import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_attempt, stop_after_delay, wait_fixed from tests.integration.charm.helpers import ( @@ -23,7 +24,6 @@ split_model, wait_for_apps_status, ) -from tests.integration.types import Substrate DB_APP_1 = "db1" DB_APP_2 = "db2" @@ -94,7 +94,7 @@ def test_deploy( charm: str, charm_resources, architecture: str, - substrate: Substrate, + substrate: Substrates, ) -> None: """Simple test to ensure that the database application charms get deployed.""" configuration = {"profile": "testing"} @@ -110,7 +110,7 @@ def test_deploy( constraints=constraints, resources=charm_resources, num_units=3, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) model_2 = Juju(model=second_model) model_2.deploy( @@ -121,7 +121,7 @@ def test_deploy( constraints=constraints, resources=charm_resources, num_units=3, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) logging.info("Deploying test application") @@ -343,7 +343,7 @@ def test_unrelate_and_relate(first_model: str, second_model: str) -> None: def test_failover_in_main_cluster( - first_model: str, second_model: str, substrate: Substrate + first_model: str, second_model: str, substrate: Substrates ) -> None: """Test that async replication fails over correctly.""" model_1 = Juju(model=first_model) @@ -353,7 +353,7 @@ def test_failover_in_main_cluster( # Machine units can be removed by name; K8s always removes the highest numbered pod. primary = None - if substrate == Substrate.vm: + if substrate == Substrates.VM: primary = get_db_primary_unit(model_1, DB_APP_1) retry_if_cli_error(lambda: model_1.remove_unit(primary)) else: @@ -385,7 +385,7 @@ def test_failover_in_main_cluster( def test_failover_in_standby_cluster( - first_model: str, second_model: str, substrate: Substrate + first_model: str, second_model: str, substrate: Substrates ) -> None: """Test that async replication fails over correctly.""" model_1 = Juju(model=first_model) @@ -395,7 +395,7 @@ def test_failover_in_standby_cluster( # Machine units can be removed by name; K8s always removes the highest numbered pod. standby = None - if substrate == Substrate.vm: + if substrate == Substrates.VM: standby = get_db_standby_leader_unit(model_2, DB_APP_2) retry_if_cli_error(lambda: model_2.remove_unit(standby)) else: diff --git a/tests/integration/charm/high_availability/test_async_replication_upgrade_edge.py b/tests/integration/charm/high_availability/test_async_replication_upgrade_edge.py index 7962ebbe..f94bc9ed 100644 --- a/tests/integration/charm/high_availability/test_async_replication_upgrade_edge.py +++ b/tests/integration/charm/high_availability/test_async_replication_upgrade_edge.py @@ -9,6 +9,7 @@ import jubilant import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_attempt from tests.integration.charm.helpers import ( @@ -23,7 +24,6 @@ split_model, wait_for_apps_status, ) -from tests.integration.types import Substrate DB_APP_1 = "db1" DB_APP_2 = "db2" @@ -93,7 +93,7 @@ def test_deploy( second_model: str, app_name: str, architecture: str, - substrate: Substrate, + substrate: Substrates, ) -> None: """Simple test to ensure that the PostgreSQL application charms get deployed.""" configuration = {"profile": "testing"} @@ -109,7 +109,7 @@ def test_deploy( config=configuration, constraints=constraints, num_units=3, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) model_2 = Juju(model=second_model) model_2.deploy( @@ -120,7 +120,7 @@ def test_deploy( config=configuration, constraints=constraints, num_units=3, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) logging.info("Deploying the test application") @@ -212,7 +212,7 @@ def test_upgrade_from_edge( second_model: str, charm: str, charm_resources, - substrate: Substrate, + substrate: Substrates, first_model_continuous_writes, ) -> None: """Upgrade the two PostgreSQL clusters and assert the shared secret id is stable.""" diff --git a/tests/integration/charm/high_availability/test_async_replication_upgrade_stable.py b/tests/integration/charm/high_availability/test_async_replication_upgrade_stable.py index b11da77f..c960ece5 100644 --- a/tests/integration/charm/high_availability/test_async_replication_upgrade_stable.py +++ b/tests/integration/charm/high_availability/test_async_replication_upgrade_stable.py @@ -9,6 +9,7 @@ import jubilant import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_attempt from tests.integration.charm.helpers import ( @@ -23,7 +24,6 @@ split_model, wait_for_apps_status, ) -from tests.integration.types import Substrate DB_APP_1 = "db1" DB_APP_2 = "db2" @@ -93,7 +93,7 @@ def test_deploy( second_model: str, app_name: str, architecture: str, - substrate: Substrate, + substrate: Substrates, ) -> None: """Simple test to ensure that the PostgreSQL application charms get deployed.""" configuration = {"profile": "testing"} @@ -106,11 +106,11 @@ def test_deploy( app=DB_APP_1, base="ubuntu@24.04", # TODO revert to stable when https://github.com/canonical/postgresql-single-kernel-library/pull/331 gets released - channel="16/stable" if substrate == Substrate.k8s else "16/edge", + channel="16/stable" if substrate == Substrates.K8S else "16/edge", config=configuration, constraints=constraints, num_units=3, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) model_2 = Juju(model=second_model) model_2.deploy( @@ -118,11 +118,11 @@ def test_deploy( app=DB_APP_2, base="ubuntu@24.04", # TODO revert to stable when https://github.com/canonical/postgresql-single-kernel-library/pull/331 gets released - channel="16/stable" if substrate == Substrate.k8s else "16/edge", + channel="16/stable" if substrate == Substrates.K8S else "16/edge", config=configuration, constraints=constraints, num_units=3, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) logging.info("Deploying the test application") @@ -214,7 +214,7 @@ def test_upgrade_from_edge( second_model: str, charm: str, charm_resources, - substrate: Substrate, + substrate: Substrates, first_model_continuous_writes, ) -> None: """Upgrade the two PostgreSQL clusters and assert the shared secret id is stable.""" diff --git a/tests/integration/charm/high_availability/test_logical_replication.py b/tests/integration/charm/high_availability/test_logical_replication.py index e01b8c49..22cb4b5a 100644 --- a/tests/integration/charm/high_availability/test_logical_replication.py +++ b/tests/integration/charm/high_availability/test_logical_replication.py @@ -6,6 +6,7 @@ import jubilant import psycopg2 import pytest +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_delay, wait_fixed from tests.integration.charm.helpers import CHARM_BASE, build_connection_string, get_cluster_roles @@ -15,7 +16,6 @@ remove_application, wait_for_apps_status, ) -from tests.integration.types import Substrate DATABASE_APP_NAME = "postgresql" SECOND_DATABASE_APP_NAME = "postgresql2" @@ -35,7 +35,7 @@ @pytest.mark.abort_on_fail -def test_deploy(juju: jubilant.Juju, charm, charm_resources, substrate: Substrate): +def test_deploy(juju: jubilant.Juju, charm, charm_resources, substrate: Substrates): juju.deploy( charm, app=DATABASE_APP_NAME, @@ -43,7 +43,7 @@ def test_deploy(juju: jubilant.Juju, charm, charm_resources, substrate: Substrat base=CHARM_BASE, config=DATABASE_APP_CONFIG.copy(), resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.deploy( charm, @@ -52,7 +52,7 @@ def test_deploy(juju: jubilant.Juju, charm, charm_resources, substrate: Substrat base=CHARM_BASE, config=DATABASE_APP_CONFIG.copy(), resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.deploy( charm, @@ -61,7 +61,7 @@ def test_deploy(juju: jubilant.Juju, charm, charm_resources, substrate: Substrat base=CHARM_BASE, config=DATABASE_APP_CONFIG.copy(), resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.deploy( DATA_INTEGRATOR_APP_NAME, @@ -94,7 +94,7 @@ def test_deploy(juju: jubilant.Juju, charm, charm_resources, substrate: Substrat ), timeout=2500, ) - if substrate == Substrate.vm: + if substrate == Substrates.VM: with fast_forward(juju, interval=FAST_INTERVAL): juju.integrate(DATABASE_APP_NAME, DATA_INTEGRATOR_APP_NAME) juju.integrate(SECOND_DATABASE_APP_NAME, SECOND_DATA_INTEGRATOR_APP_NAME) @@ -118,7 +118,7 @@ def test_deploy(juju: jubilant.Juju, charm, charm_resources, substrate: Substrat @pytest.mark.abort_on_fail -def test_pg2_publisher_error(juju: jubilant.Juju, substrate: Substrate): +def test_pg2_publisher_error(juju: jubilant.Juju, substrate: Substrates): _create_test_table(juju, SECOND_DATA_INTEGRATOR_APP_NAME, substrate) pg2_config = DATABASE_APP_CONFIG.copy() @@ -152,7 +152,7 @@ def test_pg3_local_error(juju: jubilant.Juju): @pytest.mark.abort_on_fail -def test_resolve_errors(juju: jubilant.Juju, substrate: Substrate): +def test_resolve_errors(juju: jubilant.Juju, substrate: Substrates): _create_test_table(juju, DATA_INTEGRATOR_APP_NAME, substrate) _create_test_table(juju, DATA_INTEGRATOR_APP_NAME, substrate, "test_table2") _create_test_table(juju, THIRD_DATA_INTEGRATOR_APP_NAME, substrate, "test_table2") @@ -160,7 +160,7 @@ def test_resolve_errors(juju: jubilant.Juju, substrate: Substrate): @pytest.mark.abort_on_fail -def test_replication(juju: jubilant.Juju, substrate: Substrate): +def test_replication(juju: jubilant.Juju, substrate: Substrates): _insert_test_data(juju, DATA_INTEGRATOR_APP_NAME, substrate, "first") _insert_test_data(juju, DATA_INTEGRATOR_APP_NAME, substrate, "first", "test_table2") _check_test_data(juju, SECOND_DATA_INTEGRATOR_APP_NAME, substrate, "first") @@ -168,7 +168,7 @@ def test_replication(juju: jubilant.Juju, substrate: Substrate): @pytest.mark.abort_on_fail -def test_switchover(juju: jubilant.Juju, substrate: Substrate): +def test_switchover(juju: jubilant.Juju, substrate: Substrates): publisher_leader = get_app_leader(juju, DATABASE_APP_NAME) publisher_roles = get_cluster_roles(juju, publisher_leader) publisher_candidate = publisher_roles["sync_standbys"][0] @@ -182,7 +182,7 @@ def test_switchover(juju: jubilant.Juju, substrate: Substrate): @pytest.mark.abort_on_fail -def test_replication_after_switchover(juju: jubilant.Juju, substrate: Substrate): +def test_replication_after_switchover(juju: jubilant.Juju, substrate: Substrates): _insert_test_data(juju, DATA_INTEGRATOR_APP_NAME, substrate, "second") _insert_test_data(juju, DATA_INTEGRATOR_APP_NAME, substrate, "second", "test_table2") _check_test_data(juju, SECOND_DATA_INTEGRATOR_APP_NAME, substrate, "second") @@ -190,7 +190,7 @@ def test_replication_after_switchover(juju: jubilant.Juju, substrate: Substrate) @pytest.mark.abort_on_fail -def test_pg3_extend_subscription(juju: jubilant.Juju, substrate: Substrate): +def test_pg3_extend_subscription(juju: jubilant.Juju, substrate: Substrates): _create_test_table(juju, THIRD_DATA_INTEGRATOR_APP_NAME, substrate) pg3_config = DATABASE_APP_CONFIG.copy() pg3_config["logical-replication-subscription-request"] = json.dumps({ @@ -203,7 +203,7 @@ def test_pg3_extend_subscription(juju: jubilant.Juju, substrate: Substrate): @pytest.mark.abort_on_fail -def test_pg2_change_subscription(juju: jubilant.Juju, substrate: Substrate): +def test_pg2_change_subscription(juju: jubilant.Juju, substrate: Substrates): _create_test_table(juju, SECOND_DATA_INTEGRATOR_APP_NAME, substrate, "test_table2") pg2_config = DATABASE_APP_CONFIG.copy() pg2_config["logical-replication-subscription-request"] = json.dumps({ @@ -217,7 +217,7 @@ def test_pg2_change_subscription(juju: jubilant.Juju, substrate: Substrate): @pytest.mark.abort_on_fail -def test_replication_after_subscriptions_changes(juju: jubilant.Juju, substrate: Substrate): +def test_replication_after_subscriptions_changes(juju: jubilant.Juju, substrate: Substrates): _insert_test_data(juju, DATA_INTEGRATOR_APP_NAME, substrate, "third") _insert_test_data(juju, DATA_INTEGRATOR_APP_NAME, substrate, "third", "test_table2") _check_test_data(juju, SECOND_DATA_INTEGRATOR_APP_NAME, substrate, "second") @@ -237,7 +237,7 @@ def test_pg2_dynamic_error(juju: jubilant.Juju): @pytest.mark.abort_on_fail -def test_replication_during_dynamic_error(juju: jubilant.Juju, substrate: Substrate): +def test_replication_during_dynamic_error(juju: jubilant.Juju, substrate: Substrates): _insert_test_data(juju, DATA_INTEGRATOR_APP_NAME, substrate, "fourth") _insert_test_data(juju, DATA_INTEGRATOR_APP_NAME, substrate, "fourth", "test_table2") _check_test_data(juju, SECOND_DATA_INTEGRATOR_APP_NAME, substrate, "second") @@ -247,7 +247,7 @@ def test_replication_during_dynamic_error(juju: jubilant.Juju, substrate: Substr @pytest.mark.abort_on_fail -def test_pg2_resolve_dynamic_error(juju: jubilant.Juju, substrate: Substrate): +def test_pg2_resolve_dynamic_error(juju: jubilant.Juju, substrate: Substrates): connection_string = build_connection_string( juju, SECOND_DATA_INTEGRATOR_APP_NAME, @@ -263,7 +263,7 @@ def test_pg2_resolve_dynamic_error(juju: jubilant.Juju, substrate: Substrate): @pytest.mark.abort_on_fail -def test_pg2_remove(juju: jubilant.Juju, substrate: Substrate): +def test_pg2_remove(juju: jubilant.Juju, substrate: Substrates): remove_application(juju, SECOND_DATA_INTEGRATOR_APP_NAME) remove_application(juju, SECOND_DATABASE_APP_NAME) _wait_for_active(juju, substrate, vm_timeout=1000) @@ -282,7 +282,7 @@ def test_pg2_remove(juju: jubilant.Juju, substrate: Substrate): @pytest.mark.abort_on_fail -def test_replication_after_pg2_removal(juju: jubilant.Juju, substrate: Substrate): +def test_replication_after_pg2_removal(juju: jubilant.Juju, substrate: Substrates): _insert_test_data(juju, DATA_INTEGRATOR_APP_NAME, substrate, "fifth") _insert_test_data(juju, DATA_INTEGRATOR_APP_NAME, substrate, "fifth", "test_table2") _check_test_data(juju, THIRD_DATA_INTEGRATOR_APP_NAME, substrate, "fifth") @@ -290,7 +290,7 @@ def test_replication_after_pg2_removal(juju: jubilant.Juju, substrate: Substrate @pytest.mark.abort_on_fail -def test_pg3_remove_relation(juju: jubilant.Juju, substrate: Substrate): +def test_pg3_remove_relation(juju: jubilant.Juju, substrate: Substrates): juju.remove_relation( f"{DATABASE_APP_NAME}:logical-replication-offer", f"{THIRD_DATABASE_APP_NAME}:logical-replication", @@ -310,8 +310,10 @@ def test_pg3_remove_relation(juju: jubilant.Juju, substrate: Substrate): ) -def _wait_for_active(juju: jubilant.Juju, substrate: Substrate, vm_timeout: int = TIMEOUT) -> None: - if substrate == Substrate.vm: +def _wait_for_active( + juju: jubilant.Juju, substrate: Substrates, vm_timeout: int = TIMEOUT +) -> None: + if substrate == Substrates.VM: with fast_forward(juju, interval=FAST_INTERVAL): juju.wait(wait_for_apps_status(jubilant.all_active), timeout=vm_timeout) else: @@ -329,7 +331,7 @@ def _wait_for_leader_on_blocked(juju: jubilant.Juju, app_name: str) -> None: def _create_test_table( juju: jubilant.Juju, data_integrator_app_name: str, - substrate: Substrate, + substrate: Substrates, table_name: str = "test_table", ) -> None: connection_string = build_connection_string( @@ -355,7 +357,7 @@ def _create_test_table( def _insert_test_data( juju: jubilant.Juju, data_integrator_app_name: str, - substrate: Substrate, + substrate: Substrates, data: str, table_name: str = "test_table", ) -> None: @@ -382,7 +384,7 @@ def _insert_test_data( def _check_test_data( juju: jubilant.Juju, data_integrator_app_name: str, - substrate: Substrate, + substrate: Substrates, data: str, table_name: str = "test_table", ) -> bool: diff --git a/tests/integration/charm/high_availability/test_logical_replication_circular.py b/tests/integration/charm/high_availability/test_logical_replication_circular.py index 95e41064..64911366 100644 --- a/tests/integration/charm/high_availability/test_logical_replication_circular.py +++ b/tests/integration/charm/high_availability/test_logical_replication_circular.py @@ -12,11 +12,11 @@ import jubilant import psycopg2 import pytest +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_delay, wait_fixed from tests.integration.charm.helpers import CHARM_BASE, build_connection_string from tests.integration.helpers.juju import fast_forward, get_app_leader, wait_for_apps_status -from tests.integration.types import Substrate APP_NAME_A = "postgresql-a" APP_NAME_B = "postgresql-b" @@ -32,7 +32,7 @@ @pytest.mark.abort_on_fail -def test_deploy_clusters(juju: jubilant.Juju, charm, charm_resources, substrate: Substrate): +def test_deploy_clusters(juju: jubilant.Juju, charm, charm_resources, substrate: Substrates): """Deploy three PostgreSQL clusters for testing circular replication.""" juju.deploy( charm, @@ -41,7 +41,7 @@ def test_deploy_clusters(juju: jubilant.Juju, charm, charm_resources, substrate: base=CHARM_BASE, config=APP_CONFIG.copy(), resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.deploy( charm, @@ -50,7 +50,7 @@ def test_deploy_clusters(juju: jubilant.Juju, charm, charm_resources, substrate: base=CHARM_BASE, config=APP_CONFIG.copy(), resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.deploy( charm, @@ -59,7 +59,7 @@ def test_deploy_clusters(juju: jubilant.Juju, charm, charm_resources, substrate: base=CHARM_BASE, config=APP_CONFIG.copy(), resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.deploy( "data-integrator", @@ -96,7 +96,7 @@ def test_deploy_clusters(juju: jubilant.Juju, charm, charm_resources, substrate: @pytest.mark.abort_on_fail -def test_setup_tables(juju: jubilant.Juju, substrate: Substrate): +def test_setup_tables(juju: jubilant.Juju, substrate: Substrates): """Create test tables in all clusters.""" _create_test_table(juju, DATA_INTEGRATOR_A, substrate, "users") _create_test_table(juju, DATA_INTEGRATOR_A, substrate, "orders") @@ -107,7 +107,7 @@ def test_setup_tables(juju: jubilant.Juju, substrate: Substrate): @pytest.mark.abort_on_fail -def test_bidirectional_same_table_blocked(juju: jubilant.Juju, substrate: Substrate): +def test_bidirectional_same_table_blocked(juju: jubilant.Juju, substrate: Substrates): """Test that bidirectional replication of the same table is blocked. Scenario: Cluster A <-> Cluster B (both trying to replicate public.users) @@ -162,7 +162,7 @@ def test_bidirectional_same_table_blocked(juju: jubilant.Juju, substrate: Substr @pytest.mark.abort_on_fail -def test_bidirectional_different_tables_allowed(juju: jubilant.Juju, substrate: Substrate): +def test_bidirectional_different_tables_allowed(juju: jubilant.Juju, substrate: Substrates): """Test that bidirectional replication of different tables is allowed. Scenario: Cluster A -> B (public.users), Cluster B -> A (public.orders) @@ -188,7 +188,7 @@ def test_bidirectional_different_tables_allowed(juju: jubilant.Juju, substrate: @pytest.mark.abort_on_fail -def test_cleanup_ab_relations(juju: jubilant.Juju, substrate: Substrate): +def test_cleanup_ab_relations(juju: jubilant.Juju, substrate: Substrates): """Clean up A-B relations before testing multi-hop scenario.""" juju.remove_relation( f"{APP_NAME_A}:logical-replication-offer", f"{APP_NAME_B}:logical-replication" @@ -215,7 +215,7 @@ def test_cleanup_ab_relations(juju: jubilant.Juju, substrate: Substrate): @pytest.mark.abort_on_fail -def test_multihop_circular_blocked(juju: jubilant.Juju, substrate: Substrate): +def test_multihop_circular_blocked(juju: jubilant.Juju, substrate: Substrates): """Test that multi-hop circular replication is blocked. Scenario: Cluster A -> B -> C -> A (all for public.users) @@ -288,7 +288,7 @@ def test_multihop_circular_blocked(juju: jubilant.Juju, substrate: Substrate): @pytest.mark.abort_on_fail -def test_multihop_different_table_allowed(juju: jubilant.Juju, substrate: Substrate): +def test_multihop_different_table_allowed(juju: jubilant.Juju, substrate: Substrates): """Test that multi-hop replication of different table works. Scenario: A -> B -> C (public.users), C -> A (public.orders) @@ -316,7 +316,7 @@ def test_multihop_different_table_allowed(juju: jubilant.Juju, substrate: Substr def _create_test_table( - juju: jubilant.Juju, data_integrator_app_name: str, substrate: Substrate, table_name: str + juju: jubilant.Juju, data_integrator_app_name: str, substrate: Substrates, table_name: str ) -> None: """Create a test table in the specified database.""" connection_string = build_connection_string( @@ -340,7 +340,7 @@ def _create_test_table( def _truncate_table( - juju: jubilant.Juju, data_integrator_app_name: str, substrate: Substrate, table_name: str + juju: jubilant.Juju, data_integrator_app_name: str, substrate: Substrates, table_name: str ) -> None: """Truncate a table in the specified database.""" connection_string = build_connection_string( @@ -366,7 +366,7 @@ def _truncate_table( def _insert_test_data( juju: jubilant.Juju, data_integrator_app_name: str, - substrate: Substrate, + substrate: Substrates, data: str, table_name: str, ) -> None: @@ -394,7 +394,7 @@ def _insert_test_data( def _check_test_data( juju: jubilant.Juju, data_integrator_app_name: str, - substrate: Substrate, + substrate: Substrates, data: str, table_name: str, ) -> bool: diff --git a/tests/integration/charm/high_availability/test_patroni_reinit.py b/tests/integration/charm/high_availability/test_patroni_reinit.py index ca0afb50..a6554ead 100644 --- a/tests/integration/charm/high_availability/test_patroni_reinit.py +++ b/tests/integration/charm/high_availability/test_patroni_reinit.py @@ -11,6 +11,7 @@ import requests from jubilant import Juju from single_kernel_postgresql.config import literals +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, retry_if_exception, stop_after_delay, wait_fixed from tests.integration.charm.helpers import ( @@ -23,7 +24,6 @@ get_unit_address, wait_for_apps_status, ) -from tests.integration.types import Substrate logging.getLogger("jubilant.wait").setLevel(logging.WARNING) logger = logging.getLogger(__name__) @@ -71,7 +71,7 @@ def _grep_patroni_logs(juju: Juju, unit: str, pattern: str) -> str: def test_deploy( - juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrate + juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrates ) -> None: """Deploy a 3-unit PostgreSQL cluster and the continuous-writes test application.""" logger.info("Deploying PostgreSQL cluster (%s, 3 units)", app_name) @@ -82,7 +82,7 @@ def test_deploy( config={"profile": "testing"}, resources=charm_resources, num_units=3, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) logger.info("Deploying test application (%s)", DB_TEST_APP_NAME) diff --git a/tests/integration/charm/high_availability/test_replication.py b/tests/integration/charm/high_availability/test_replication.py index c30037eb..533d68d5 100644 --- a/tests/integration/charm/high_availability/test_replication.py +++ b/tests/integration/charm/high_availability/test_replication.py @@ -6,6 +6,7 @@ import pytest from lightkube.core.client import Client from lightkube.resources.core_v1 import Pod +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, retry_if_exception_type, stop_after_delay, wait_fixed from tests.integration.charm.helpers import ( @@ -22,12 +23,11 @@ ) from tests.integration.helpers.juju import fast_forward, get_unit_address, wait_for_idle from tests.integration.helpers.postgresql import db_connect -from tests.integration.types import Substrate @pytest.mark.abort_on_fail def test_build_and_deploy( - juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrate + juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrates ) -> None: """Build and deploy three unit of PostgreSQL.""" wait_for_apps = False @@ -43,7 +43,7 @@ def test_build_and_deploy( base=CHARM_BASE, config={"profile": "testing"}, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) # Deploy the continuous writes application charm if it wasn't already deployed. if APPLICATION_NAME not in juju.status().apps: @@ -65,7 +65,7 @@ def test_build_and_deploy( def test_reelection( juju: jubilant.Juju, app_name: str, - substrate: Substrate, + substrate: Substrates, juju_continuous_writes, juju_primary_start_timeout, ) -> None: @@ -78,7 +78,7 @@ def test_reelection( start_ha_continuous_writes(juju, app) primary_name = get_primary_from_app(juju, app) - if substrate == Substrate.vm: + if substrate == Substrates.VM: # Remove the primary unit. juju.remove_unit(primary_name) else: @@ -99,7 +99,7 @@ def test_reelection( new_primary_name = get_primary_from_app(juju, app, down_unit=primary_name) assert new_primary_name != primary_name, "primary reelection hasn't happened" - if substrate == Substrate.vm: + if substrate == Substrates.VM: # Verify that all units are part of the same cluster. member_ips = fetch_cluster_members(juju) app = primary_name.split("/")[0] @@ -135,7 +135,7 @@ def test_no_data_replicated_between_clusters( charm, app_name: str, charm_resources, - substrate: Substrate, + substrate: Substrates, juju_continuous_writes, ) -> None: """Check that writes in one cluster are not replicated to another cluster.""" @@ -154,7 +154,7 @@ def test_no_data_replicated_between_clusters( base=CHARM_BASE, config={"profile": "testing"}, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) wait_for_idle(juju, apps=[new_cluster_app], status="active", timeout=1500) diff --git a/tests/integration/charm/high_availability/test_restart.py b/tests/integration/charm/high_availability/test_restart.py index c6ac628a..286e2b02 100644 --- a/tests/integration/charm/high_availability/test_restart.py +++ b/tests/integration/charm/high_availability/test_restart.py @@ -8,6 +8,7 @@ import requests from kubernetes import config, dynamic from kubernetes.client import api_client +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.helpers import ( APPLICATION_NAME, @@ -19,7 +20,6 @@ start_ha_continuous_writes, ) from tests.integration.helpers.juju import fast_forward, get_unit_address, wait_for_idle -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -31,7 +31,7 @@ @pytest.mark.abort_on_fail def test_build_and_deploy( - juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrate + juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrates ) -> None: """Build and deploy three unit of PostgreSQL.""" # It is possible for users to provide their own cluster for HA testing. Hence, check if there @@ -45,7 +45,7 @@ def test_build_and_deploy( base=CHARM_BASE, config={"profile": "testing"}, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) # Deploy the continuous writes application charm if it wasn't already deployed. if APPLICATION_NAME not in juju.status().apps: diff --git a/tests/integration/charm/high_availability/test_self_healing_1.py b/tests/integration/charm/high_availability/test_self_healing_1.py index c347d33c..27488f18 100644 --- a/tests/integration/charm/high_availability/test_self_healing_1.py +++ b/tests/integration/charm/high_availability/test_self_healing_1.py @@ -6,6 +6,7 @@ import jubilant import pytest +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_delay, wait_fixed from tests.integration.charm.helpers import ( @@ -26,13 +27,12 @@ storage_type, ) from tests.integration.helpers.juju import fast_forward, wait_for_idle -from tests.integration.types import Substrate logger = logging.getLogger(__name__) PATRONI_PROCESS = { - Substrate.vm: "/snap/charmed-postgresql/[0-9]*/usr/bin/patroni", - Substrate.k8s: "/usr/bin/patroni", + Substrates.VM: "/snap/charmed-postgresql/[0-9]*/usr/bin/patroni", + Substrates.K8S: "/usr/bin/patroni", } POSTGRESQL_PROCESS = "postgres" # The Patroni path depends on the substrate, so the tests are parametrized by name. @@ -49,7 +49,7 @@ @pytest.mark.abort_on_fail def test_build_and_deploy( - juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrate + juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrates ) -> None: """Build and deploy three unit of PostgreSQL.""" wait_for_apps = False @@ -63,10 +63,10 @@ def test_build_and_deploy( app=app_name, num_units=3, base=CHARM_BASE, - storage=VM_STORAGE if substrate == Substrate.vm else None, + storage=VM_STORAGE if substrate == Substrates.VM else None, config={"profile": "testing"}, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) # Deploy the continuous writes application charm if it wasn't already deployed. if APPLICATION_NAME not in juju.status().apps: @@ -145,7 +145,7 @@ def test_storage_re_use(juju: jubilant.Juju, app_name: str, juju_continuous_writ def test_interruption_db_process( juju: jubilant.Juju, app_name: str, - substrate: Substrate, + substrate: Substrates, process: str, signal: str, juju_continuous_writes, diff --git a/tests/integration/charm/high_availability/test_self_healing_2.py b/tests/integration/charm/high_availability/test_self_healing_2.py index 5e1d7b83..9ba5e118 100644 --- a/tests/integration/charm/high_availability/test_self_healing_2.py +++ b/tests/integration/charm/high_availability/test_self_healing_2.py @@ -7,6 +7,7 @@ import jubilant import pytest +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_delay, wait_fixed from tests.integration.charm.helpers import ( @@ -30,13 +31,12 @@ update_restart_condition, ) from tests.integration.helpers.juju import fast_forward, get_unit_address, wait_for_idle -from tests.integration.types import Substrate logger = logging.getLogger(__name__) PATRONI_PROCESS = { - Substrate.vm: "/snap/charmed-postgresql/[0-9]*/usr/bin/patroni", - Substrate.k8s: "/usr/bin/patroni", + Substrates.VM: "/snap/charmed-postgresql/[0-9]*/usr/bin/patroni", + Substrates.K8S: "/usr/bin/patroni", } POSTGRESQL_PROCESS = "postgres" # The Patroni path depends on the substrate, so the tests are parametrized by name. @@ -53,7 +53,7 @@ @pytest.mark.abort_on_fail def test_build_and_deploy( - juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrate + juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrates ) -> None: """Build and deploy three unit of PostgreSQL.""" wait_for_apps = False @@ -67,10 +67,10 @@ def test_build_and_deploy( app=app_name, num_units=3, base=CHARM_BASE, - storage=VM_STORAGE if substrate == Substrate.vm else None, + storage=VM_STORAGE if substrate == Substrates.VM else None, config={"profile": "testing"}, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) # Deploy the continuous writes application charm if it wasn't already deployed. if APPLICATION_NAME not in juju.status().apps: @@ -100,7 +100,7 @@ def test_build_and_deploy( def test_freeze_db_process( juju: jubilant.Juju, app_name: str, - substrate: Substrate, + substrate: Substrates, process: str, juju_continuous_writes, juju_primary_start_timeout, @@ -154,7 +154,7 @@ def test_freeze_db_process( def test_full_cluster_restart( juju: jubilant.Juju, app_name: str, - substrate: Substrate, + substrate: Substrates, process: str, signal: str, juju_continuous_writes, @@ -175,7 +175,7 @@ def test_full_cluster_restart( # Change the loop wait setting to make Patroni wait more time before restarting PostgreSQL. initial_loop_wait = get_patroni_setting(juju, "loop_wait") - if substrate == Substrate.vm: + if substrate == Substrates.VM: initial_ttl = get_patroni_setting(juju, "ttl") # loop_wait parameter is limited by ttl value, thus we should increase it first change_ha_patroni_setting(juju, "ttl", 600, patroni_password, use_random_unit=True) @@ -202,7 +202,7 @@ def test_full_cluster_restart( "Not all units down at the same time." ) finally: - if substrate == Substrate.vm: + if substrate == Substrates.VM: if process == PATRONI_PROCESS[substrate]: # Preserve the concurrent systemd restoration of the original asyncio.gather. units = list(juju.status().apps[app].units) @@ -226,7 +226,7 @@ def test_full_cluster_restart( change_ha_patroni_setting( juju, "loop_wait", initial_loop_wait, patroni_password, use_random_unit=True ) - if substrate == Substrate.vm: + if substrate == Substrates.VM: change_ha_patroni_setting( juju, "ttl", initial_ttl, patroni_password, use_random_unit=True ) diff --git a/tests/integration/charm/high_availability/test_self_healing_3.py b/tests/integration/charm/high_availability/test_self_healing_3.py index 55fa9fea..a1586883 100644 --- a/tests/integration/charm/high_availability/test_self_healing_3.py +++ b/tests/integration/charm/high_availability/test_self_healing_3.py @@ -6,6 +6,7 @@ import jubilant import pytest +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_delay, wait_fixed from tests.integration.charm.helpers import ( @@ -37,15 +38,14 @@ ) from tests.integration.helpers.juju import fast_forward, get_unit_address, wait_for_idle from tests.integration.helpers.postgresql import db_connect -from tests.integration.types import Substrate logger = logging.getLogger(__name__) MEDIAN_ELECTION_TIME = 10 CLEAN_DATA_DIR_SCRIPT = { - Substrate.vm: "tests/integration/charm/ha_tests/clean-data-dir-vm.sh", - Substrate.k8s: "tests/integration/charm/ha_tests/clean-data-dir-k8s.sh", + Substrates.VM: "tests/integration/charm/ha_tests/clean-data-dir-vm.sh", + Substrates.K8S: "tests/integration/charm/ha_tests/clean-data-dir-k8s.sh", } VM_STORAGE = { @@ -58,7 +58,7 @@ @pytest.mark.abort_on_fail def test_build_and_deploy( - juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrate + juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrates ) -> None: """Build and deploy three unit of PostgreSQL.""" wait_for_apps = False @@ -72,10 +72,10 @@ def test_build_and_deploy( app=app_name, num_units=3, base=CHARM_BASE, - storage=VM_STORAGE if substrate == Substrate.vm else None, + storage=VM_STORAGE if substrate == Substrates.VM else None, config={"profile": "testing"}, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) # Deploy the continuous writes application charm if it wasn't already deployed. if APPLICATION_NAME not in juju.status().apps: @@ -104,13 +104,13 @@ def test_build_and_deploy( def test_forceful_restart_without_data_and_transaction_logs( juju: jubilant.Juju, app_name: str, - substrate: Substrate, + substrate: Substrates, juju_continuous_writes, juju_primary_start_timeout, juju_wal_settings, ) -> None: """A forceful restart with deleted data and without transaction logs (forced clone).""" - if substrate == Substrate.vm: + if substrate == Substrates.VM: pytest.skip("Unstable") # Locate primary unit. @@ -126,10 +126,10 @@ def test_forceful_restart_without_data_and_transaction_logs( # Halts the execution of `update-status` hook so the pebble service doesn't get restarted # (on K8s). - with fast_forward(juju, "24h" if substrate == Substrate.k8s else "10s"): + with fast_forward(juju, "24h" if substrate == Substrates.K8S else "10s"): # Stop the systemd service on the primary unit. logger.info(f"stopping database from {primary_name}") - if substrate == Substrate.vm: + if substrate == Substrates.VM: run_ha_command_on_unit(juju, primary_name, "snap stop charmed-postgresql.patroni") else: run_ha_command_on_unit(juju, primary_name, "/charm/bin/pebble stop postgresql") @@ -138,7 +138,7 @@ def test_forceful_restart_without_data_and_transaction_logs( logger.info(f"removing data from {primary_name}") juju.ssh( primary_name, - "sudo" if substrate == Substrate.vm else "bash", + "sudo" if substrate == Substrates.VM else "bash", "/tmp/clean-data-dir.sh", ) @@ -186,7 +186,7 @@ def test_forceful_restart_without_data_and_transaction_logs( # Database service in old primary should recover (after update-status run on K8s). with fast_forward(juju, "10s"): - if substrate == Substrate.vm: + if substrate == Substrates.VM: # Start the systemd service in the old primary. run_ha_command_on_unit(juju, primary_name, "snap start charmed-postgresql.patroni") @@ -200,14 +200,14 @@ def test_forceful_restart_without_data_and_transaction_logs( def test_network_cut( juju: jubilant.Juju, app_name: str, - substrate: Substrate, + substrate: Substrates, architecture: str, juju_continuous_writes, juju_primary_start_timeout, juju_chaos_mesh, ): """Completely cut and restore network.""" - if substrate == Substrate.k8s and architecture != "amd64": + if substrate == Substrates.K8S and architecture != "amd64": pytest.skip("Chaos Mesh is only deployed on amd64") # Locate primary unit. @@ -217,7 +217,7 @@ def test_network_cut( # Start an application that continuously writes data to the database. start_ha_continuous_writes(juju, app) - if substrate == Substrate.vm: + if substrate == Substrates.VM: # Get unit hostname and IP. primary_hostname = get_machine_from_unit(juju, primary_name) primary_ip = get_unit_ip(juju, primary_name) @@ -226,7 +226,7 @@ def test_network_cut( logger.info("checking whether the connectivity to the database is working") assert is_connection_possible(juju, primary_name), f"Connection {primary_name} is not possible" - if substrate == Substrate.vm: + if substrate == Substrates.VM: logger.info(f"Cutting network for {primary_name}") cut_network_from_unit(primary_hostname) @@ -271,7 +271,7 @@ def test_network_cut( new_primary_name = get_primary_from_app(juju, app, down_unit=primary_name) assert new_primary_name != primary_name - if substrate == Substrate.vm: + if substrate == Substrates.VM: logger.info(f"Restoring network for {primary_name}") restore_network_for_unit(primary_hostname) @@ -301,7 +301,7 @@ def test_network_cut( remove_instance_isolation(juju) # The unit IP changes on VM, so it's retrieved from inside the unit. - use_ip_from_inside = substrate == Substrate.vm + use_ip_from_inside = substrate == Substrates.VM # Verify that the database service got restarted and is ready in the old primary. logger.info(f"waiting for the database service to be ready on {primary_name}") diff --git a/tests/integration/charm/high_availability/test_smoke.py b/tests/integration/charm/high_availability/test_smoke.py index 793f6c06..ce69f0ef 100644 --- a/tests/integration/charm/high_availability/test_smoke.py +++ b/tests/integration/charm/high_availability/test_smoke.py @@ -9,6 +9,7 @@ from lightkube.core.client import Client from lightkube.core.exceptions import ApiError from lightkube.resources.core_v1 import PersistentVolumeClaim +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_delay, wait_fixed from tests.integration.charm.helpers import ( @@ -33,7 +34,6 @@ scale_ha_application, ) from tests.integration.helpers.juju import fast_forward, wait_for_idle -from tests.integration.types import Substrate TEST_DATABASE_NAME = "test_database" DUP_DATABASE_APP_NAME = "postgres-test-dup" @@ -50,7 +50,7 @@ @pytest.mark.abort_on_fail def test_app_force_removal( - juju: jubilant.Juju, charm: str, app_name: str, charm_resources, substrate: Substrate + juju: jubilant.Juju, charm: str, app_name: str, charm_resources, substrate: Substrates ): """Remove unit with force while storage is alive.""" global primary_pvs, primary_pvcs @@ -62,10 +62,10 @@ def test_app_force_removal( app=app_name, num_units=1, base=CHARM_BASE, - storage=VM_STORAGE if substrate == Substrate.vm else None, + storage=VM_STORAGE if substrate == Substrates.VM else None, config={"profile": "testing"}, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) logger.info("waiting for idle") @@ -82,7 +82,7 @@ def test_app_force_removal( with attempt: assert is_postgresql_ready(juju, primary_name) - if substrate == Substrate.k8s: + if substrate == Substrates.K8S: logger.info(f"get pvc for {primary_name}") primary_pvcs = get_pvcs(juju, primary_name) @@ -116,7 +116,7 @@ def test_app_force_removal( assert check_db(juju, app_name, TEST_DATABASE_NAME) # Force remove unit without storage removal - if substrate == Substrate.vm: + if substrate == Substrates.VM: logger.info("force removing charm") juju.remove_unit(primary_name, force=True, destroy_storage=False) else: @@ -134,7 +134,7 @@ def test_app_force_removal( @pytest.mark.abort_on_fail -def test_app_garbage_ignorance(juju: jubilant.Juju, app_name: str, substrate: Substrate): +def test_app_garbage_ignorance(juju: jubilant.Juju, app_name: str, substrate: Substrates): """Test charm deploy in dirty environment with garbage storage.""" global primary_pvs, primary_pvcs with fast_forward(juju): @@ -143,11 +143,11 @@ def test_app_garbage_ignorance(juju: jubilant.Juju, app_name: str, substrate: Su for attempt in Retrying(stop=stop_after_delay(30 * 3), wait=wait_fixed(3), reraise=True): with attempt: garbage_storages = get_detached_storages(juju) - if substrate == Substrate.vm: + if substrate == Substrates.VM: assert len(garbage_storages) == 4 logger.info(f"Collected storages: {garbage_storages}") - if substrate == Substrate.vm: + if substrate == Substrates.VM: logger.info("add unit with attached storage") add_unit_with_storage(juju, app_name, garbage_storages) else: @@ -190,7 +190,7 @@ def test_app_garbage_ignorance(juju: jubilant.Juju, app_name: str, substrate: Su logger.info("checking db") assert check_db(juju, app_name, TEST_DATABASE_NAME) - if substrate == Substrate.vm: + if substrate == Substrates.VM: logger.info("removing charm") juju.remove_unit(primary_name) else: diff --git a/tests/integration/charm/high_availability/test_synchronous_policy.py b/tests/integration/charm/high_availability/test_synchronous_policy.py index a859f88c..25403f81 100644 --- a/tests/integration/charm/high_availability/test_synchronous_policy.py +++ b/tests/integration/charm/high_availability/test_synchronous_policy.py @@ -3,16 +3,16 @@ # See LICENSE file for licensing details. import jubilant import pytest +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_attempt, wait_fixed from tests.integration.charm.helpers import CHARM_BASE, get_cluster_roles from tests.integration.helpers.juju import fast_forward, wait_for_apps_status -from tests.integration.types import Substrate @pytest.mark.abort_on_fail def test_build_and_deploy( - juju: jubilant.Juju, charm: str, app_name: str, charm_resources, substrate: Substrate + juju: jubilant.Juju, charm: str, app_name: str, charm_resources, substrate: Substrates ) -> None: """Build and deploy three units of PostgreSQL.""" with fast_forward(juju): @@ -23,7 +23,7 @@ def test_build_and_deploy( base=CHARM_BASE, config={"profile": "testing"}, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.wait(wait_for_apps_status(jubilant.all_active, app_name), timeout=1500) diff --git a/tests/integration/charm/high_availability/test_upgrade.py b/tests/integration/charm/high_availability/test_upgrade.py index 0d4e73a7..0666fbec 100644 --- a/tests/integration/charm/high_availability/test_upgrade.py +++ b/tests/integration/charm/high_availability/test_upgrade.py @@ -10,6 +10,7 @@ import jubilant import tomli_w from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, retry_if_exception_type, stop_after_delay, wait_fixed from tests.integration.charm.helpers import ( @@ -27,7 +28,6 @@ wait_for_apps_status, ) from tests.integration.helpers.postgresql import db_connect -from tests.integration.types import Substrate DB_TEST_APP_NAME = "postgresql-test-app" @@ -36,7 +36,7 @@ logging.getLogger("jubilant.wait").setLevel(logging.WARNING) -def test_deploy_latest(juju: Juju, app_name: str, substrate: Substrate) -> None: +def test_deploy_latest(juju: Juju, app_name: str, substrate: Substrates) -> None: """Simple test to ensure that the PostgreSQL and application charms get deployed.""" logging.info("Deploying PostgreSQL cluster") juju.deploy( @@ -46,7 +46,7 @@ def test_deploy_latest(juju: Juju, app_name: str, substrate: Substrate) -> None: channel="16/edge", config={"profile": "testing"}, num_units=3, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.deploy( charm=DB_TEST_APP_NAME, @@ -92,7 +92,7 @@ def test_upgrade_from_edge( app_name: str, charm: str, charm_resources, - substrate: Substrate, + substrate: Substrates, continuous_writes, ) -> None: """Update the second cluster.""" @@ -135,7 +135,7 @@ def test_fail_and_rollback( app_name: str, charm: str, charm_resources, - substrate: Substrate, + substrate: Substrates, tmp_path: Path, continuous_writes, ) -> None: @@ -157,7 +157,7 @@ def test_fail_and_rollback( logging.info("Refresh the charm") juju.refresh(app=app_name, path=fault_charm, resources=charm_resources) - if substrate == Substrate.vm: + if substrate == Substrates.VM: logging.info("Wait for upgrade to fail on leader") juju.wait( ready=wait_for_apps_status(jubilant.any_blocked, app_name), @@ -201,12 +201,12 @@ def test_fail_and_rollback( check_db_units_writes_increment(juju, app_name, unit_names) -def inject_dependency_fault(substrate: Substrate, charm_file: Path) -> None: +def inject_dependency_fault(substrate: Substrates, charm_file: Path) -> None: """Inject a dependency fault into the PostgreSQL charm.""" versions = get_refresh_versions(str(charm_file)) versions["charm"] = "16/0.0.0" - if substrate == Substrate.vm: + if substrate == Substrates.VM: versions["snap"]["revisions"][platform.machine()] = "1" else: versions["workload"] = "16.14" diff --git a/tests/integration/charm/high_availability/test_upgrade_from_stable.py b/tests/integration/charm/high_availability/test_upgrade_from_stable.py index cfcc2919..0228e259 100644 --- a/tests/integration/charm/high_availability/test_upgrade_from_stable.py +++ b/tests/integration/charm/high_availability/test_upgrade_from_stable.py @@ -6,6 +6,7 @@ import jubilant import requests from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.helpers import ( check_db_units_writes_increment, @@ -17,7 +18,6 @@ get_unit_address, wait_for_apps_status, ) -from tests.integration.types import Substrate DB_TEST_APP_NAME = "postgresql-test-app" @@ -26,7 +26,7 @@ logging.getLogger("jubilant.wait").setLevel(logging.WARNING) -def test_deploy_stable(juju: Juju, app_name: str, substrate: Substrate) -> None: +def test_deploy_stable(juju: Juju, app_name: str, substrate: Substrates) -> None: """Simple test to ensure that the PostgreSQL and application charms get deployed.""" logging.info("Deploying PostgreSQL cluster") juju.deploy( @@ -36,7 +36,7 @@ def test_deploy_stable(juju: Juju, app_name: str, substrate: Substrate) -> None: channel="16/stable", config={"profile": "testing"}, num_units=3, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.deploy( charm=DB_TEST_APP_NAME, @@ -73,7 +73,7 @@ def test_upgrade_from_stable( app_name: str, charm: str, charm_resources, - substrate: Substrate, + substrate: Substrates, continuous_writes, ) -> None: """Update the second cluster.""" diff --git a/tests/integration/charm/high_availability/test_upgrade_skip_pre_upgrade_check.py b/tests/integration/charm/high_availability/test_upgrade_skip_pre_upgrade_check.py index 6b2b6ab1..45f96a92 100644 --- a/tests/integration/charm/high_availability/test_upgrade_skip_pre_upgrade_check.py +++ b/tests/integration/charm/high_availability/test_upgrade_skip_pre_upgrade_check.py @@ -6,6 +6,7 @@ import jubilant import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.helpers import ( check_db_units_writes_increment, @@ -13,7 +14,6 @@ run_upgrade, ) from tests.integration.helpers.juju import get_app_units, wait_for_apps_status -from tests.integration.types import Substrate DB_TEST_APP_NAME = "postgresql-test-app" @@ -22,7 +22,7 @@ logging.getLogger("jubilant.wait").setLevel(logging.WARNING) -def test_deploy_stable(juju: Juju, app_name: str, substrate: Substrate) -> None: +def test_deploy_stable(juju: Juju, app_name: str, substrate: Substrates) -> None: """Simple test to ensure that the PostgreSQL and application charms get deployed.""" logging.info("Deploying PostgreSQL cluster") juju.deploy( @@ -32,7 +32,7 @@ def test_deploy_stable(juju: Juju, app_name: str, substrate: Substrate) -> None: channel="16/stable", config={"profile": "testing"}, num_units=3, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.deploy( charm=DB_TEST_APP_NAME, @@ -59,7 +59,7 @@ def test_refresh_without_pre_refresh_check( app_name: str, charm: str, charm_resources, - substrate: Substrate, + substrate: Substrates, continuous_writes, ) -> None: """Test updating from stable channel.""" @@ -78,10 +78,10 @@ def test_refresh_without_pre_refresh_check( def test_rollback_without_pre_refresh_check( - juju: Juju, app_name: str, substrate: Substrate, continuous_writes + juju: Juju, app_name: str, substrate: Substrates, continuous_writes ) -> None: """Test refresh back to stable channel.""" - if substrate == Substrate.k8s: + if substrate == Substrates.K8S: pytest.skip("Unstable on K8s") # Early Jubilant 1.X.Y versions do not support the `switch` option diff --git a/tests/integration/charm/new_relations/test_new_relations_1.py b/tests/integration/charm/new_relations/test_new_relations_1.py index f9729b8f..a0f3be2e 100644 --- a/tests/integration/charm/new_relations/test_new_relations_1.py +++ b/tests/integration/charm/new_relations/test_new_relations_1.py @@ -6,6 +6,7 @@ import jubilant import psycopg2 import pytest +from single_kernel_postgresql.config.enums import Substrates from single_kernel_postgresql.config.literals import DATABASE_DEFAULT_NAME from tenacity import Retrying, stop_after_attempt, wait_fixed @@ -28,7 +29,6 @@ split_model, wait_for_idle, ) -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -85,7 +85,7 @@ def test_deploy_charms(juju: jubilant.Juju, charm): @pytest.mark.k8s_only @pytest.mark.abort_on_fail def test_database_relation_with_charm_libraries_k8s( - juju: jubilant.Juju, charm, charm_resources, substrate: Substrate + juju: jubilant.Juju, charm, charm_resources, substrate: Substrates ): """Test basic functionality of database relation interface.""" # Deploy both charms (multiple units for each application to test that later they correctly @@ -253,7 +253,7 @@ def test_read_only_endpoint_in_scaled_up_cluster_vm(juju: jubilant.Juju): @pytest.mark.vm_only -def test_database_relation_with_charm_libraries_vm(juju: jubilant.Juju, substrate: Substrate): +def test_database_relation_with_charm_libraries_vm(juju: jubilant.Juju, substrate: Substrates): """Test basic functionality of database relation interface.""" # Get the connection string to connect to the database using the read/write endpoint. connection_string = build_connection_string( @@ -331,7 +331,7 @@ def test_filter_out_degraded_replicas(juju: jubilant.Juju): def test_two_applications_doesnt_share_the_same_relation_data( - juju: jubilant.Juju, substrate: Substrate + juju: jubilant.Juju, substrate: Substrates ): """Test that two different application connect to the database with different credentials.""" # Set some variables to use in this test. @@ -390,7 +390,7 @@ def test_two_applications_doesnt_share_the_same_relation_data( def test_an_application_can_connect_to_multiple_database_clusters( - juju: jubilant.Juju, substrate: Substrate + juju: jubilant.Juju, substrate: Substrates ): """Test that an application can connect to different clusters of the same database.""" # Relate the application with both database clusters @@ -477,7 +477,7 @@ def test_an_application_can_connect_to_multiple_database_clusters( @pytest.mark.abort_on_fail -def test_an_application_can_request_multiple_databases(juju: jubilant.Juju, substrate: Substrate): +def test_an_application_can_request_multiple_databases(juju: jubilant.Juju, substrate: Substrates): """Test that an application can request additional databases using the same interface.""" # Relate the charms using another relation and wait for them exchanging some connection data. juju.integrate(f"{APPLICATION_APP_NAME}:{SECOND_DATABASE_RELATION_NAME}", DATABASE_APP_NAME) @@ -561,7 +561,7 @@ def test_relation_broken(juju: jubilant.Juju): @pytest.mark.k8s_only -def test_restablish_relation(juju: jubilant.Juju, substrate: Substrate): +def test_restablish_relation(juju: jubilant.Juju, substrate: Substrates): """Test that a previously broken relation would be functional if restored.""" # Relate the charms and wait for them exchanging some connection data. with fast_forward(juju): @@ -603,7 +603,7 @@ def test_restablish_relation(juju: jubilant.Juju, substrate: Substrate): @pytest.mark.vm_only @pytest.mark.abort_on_fail def test_relation_data_is_updated_correctly_when_scaling( - juju: jubilant.Juju, substrate: Substrate + juju: jubilant.Juju, substrate: Substrates ): """Test that relation data, like connection data, is updated correctly when scaling.""" # Retrieve the list of current database unit names. diff --git a/tests/integration/charm/new_relations/test_relations_coherence.py b/tests/integration/charm/new_relations/test_relations_coherence.py index 126ffb05..b3d748de 100644 --- a/tests/integration/charm/new_relations/test_relations_coherence.py +++ b/tests/integration/charm/new_relations/test_relations_coherence.py @@ -8,6 +8,7 @@ import jubilant import psycopg2 import pytest +from single_kernel_postgresql.config.enums import Substrates from single_kernel_postgresql.config.literals import DATABASE_DEFAULT_NAME from tests.integration.charm.helpers import ( @@ -16,7 +17,6 @@ build_connection_string, ) from tests.integration.helpers.juju import fast_forward, wait_for_apps_status -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -26,7 +26,7 @@ @pytest.mark.abort_on_fail def test_relations( - juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrate + juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrates ): """Test that check relation data.""" app_names = [app_name, DATA_INTEGRATOR_APP_NAME] @@ -38,7 +38,7 @@ def test_relations( base=CHARM_BASE, config={"profile": "testing"}, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) # Creating first time relation with user role. Base is ignored on K8s. juju.deploy(DATA_INTEGRATOR_APP_NAME, base=CHARM_BASE) diff --git a/tests/integration/charm/test_audit.py b/tests/integration/charm/test_audit.py index 3310e869..111fcd59 100644 --- a/tests/integration/charm/test_audit.py +++ b/tests/integration/charm/test_audit.py @@ -8,11 +8,11 @@ import pytest from jubilant import Juju from single_kernel_postgresql.config import literals +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_delay, wait_fixed from tests.integration.charm.helpers import build_connection_string, run_command_on_unit from tests.integration.helpers.juju import fast_forward, wait_for_apps_status -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -26,7 +26,7 @@ @pytest.mark.abort_on_fail def test_audit_plugin( - juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrate + juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrates ) -> None: """Test the audit plugin.""" juju.deploy( @@ -35,7 +35,7 @@ def test_audit_plugin( base="ubuntu@24.04", config={"profile": "testing"}, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.deploy(APPLICATION_NAME, base="ubuntu@24.04", channel="latest/edge") juju.integrate(f"{APPLICATION_NAME}:{RELATION_ENDPOINT}", app_name) @@ -62,7 +62,7 @@ def test_audit_plugin( if connection is not None: connection.close() unit_name = f"{app_name}/0" - logs_dir = VM_POSTGRESQL_LOGS_DIR if substrate == Substrate.vm else K8S_POSTGRESQL_LOGS_DIR + logs_dir = VM_POSTGRESQL_LOGS_DIR if substrate == Substrates.VM else K8S_POSTGRESQL_LOGS_DIR for attempt in Retrying(stop=stop_after_delay(90), wait=wait_fixed(10), reraise=True): with attempt: try: diff --git a/tests/integration/charm/test_backups_aws.py b/tests/integration/charm/test_backups_aws.py index a3e2b8ce..98be9bb4 100644 --- a/tests/integration/charm/test_backups_aws.py +++ b/tests/integration/charm/test_backups_aws.py @@ -6,6 +6,7 @@ import jubilant import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_attempt, wait_exponential from tests.integration.charm.backup_helpers import AWS, backup_operations @@ -23,7 +24,6 @@ wait_for_apps_status, ) from tests.integration.helpers.postgresql import db_connect -from tests.integration.types import Substrate S3_INTEGRATOR_APP_NAME = "s3-integrator" tls_certificates_app_name = "self-signed-certificates" @@ -38,7 +38,7 @@ def test_backup_aws( charm: str, app_name: str, charm_resources, - substrate: Substrate, + substrate: Substrates, aws_cloud_configs: tuple[dict, dict], ) -> None: """Build and deploy two units of PostgreSQL in AWS, test backup and restore actions.""" diff --git a/tests/integration/charm/test_backups_ceph.py b/tests/integration/charm/test_backups_ceph.py index 9766c594..5a29d4c8 100644 --- a/tests/integration/charm/test_backups_ceph.py +++ b/tests/integration/charm/test_backups_ceph.py @@ -2,9 +2,9 @@ # Copyright 2024 Canonical Ltd. # See LICENSE file for licensing details. from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.backup_helpers import CEPH, backup_operations -from tests.integration.types import Substrate S3_INTEGRATOR_APP_NAME = "s3-integrator" @@ -14,7 +14,7 @@ def test_backup_ceph( charm: str, app_name: str, charm_resources, - substrate: Substrate, + substrate: Substrates, ceph_cloud_configs: tuple[dict, dict], ) -> None: """Build and deploy two units of PostgreSQL in microceph, test backup and restore actions.""" diff --git a/tests/integration/charm/test_backups_gcp.py b/tests/integration/charm/test_backups_gcp.py index b1295836..5125e732 100644 --- a/tests/integration/charm/test_backups_gcp.py +++ b/tests/integration/charm/test_backups_gcp.py @@ -9,6 +9,7 @@ from jubilant import Juju from lightkube import Client from lightkube.resources.core_v1 import Pod +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_attempt, wait_exponential from tests.integration.charm.backup_helpers import GCP, backup_operations @@ -20,7 +21,6 @@ wait_for_apps_status, ) from tests.integration.helpers.postgresql import db_connect -from tests.integration.types import Substrate ANOTHER_CLUSTER_REPOSITORY_ERROR_MESSAGE = "the S3 repository has backups from another cluster" FAILED_TO_ACCESS_CREATE_BUCKET_ERROR_MESSAGE = ( @@ -40,7 +40,7 @@ def test_backup_gcp( charm: str, app_name: str, charm_resources, - substrate: Substrate, + substrate: Substrates, gcp_cloud_configs: tuple[dict, dict], ) -> None: """Build and deploy two units of PostgreSQL in GCP, test backup and restore actions.""" @@ -75,13 +75,13 @@ def test_restore_on_new_cluster( charm: str, app_name: str, charm_resources, - substrate: Substrate, + substrate: Substrates, gcp_cloud_configs: tuple[dict, dict], ) -> None: """Test that is possible to restore a backup to another PostgreSQL cluster.""" # VM reuses the name of the removed app (so its unit numbering continues at 2); # K8s uses a new name. - if substrate == Substrate.vm: + if substrate == Substrates.VM: previous_database_app_name = f"{app_name}-gcp" previous_unit_number = 2 else: @@ -95,7 +95,7 @@ def test_restore_on_new_cluster( base="ubuntu@24.04", config={"profile": "testing"}, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.integrate(previous_database_app_name, S3_INTEGRATOR_APP_NAME) juju.integrate(database_app_name, S3_INTEGRATOR_APP_NAME) diff --git a/tests/integration/charm/test_backups_pitr_aws.py b/tests/integration/charm/test_backups_pitr_aws.py index 66c42e63..fdf1ad35 100644 --- a/tests/integration/charm/test_backups_pitr_aws.py +++ b/tests/integration/charm/test_backups_pitr_aws.py @@ -3,9 +3,9 @@ # See LICENSE file for licensing details. import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.backup_helpers import AWS, pitr_backup_operations -from tests.integration.types import Substrate S3_INTEGRATOR_APP_NAME = "s3-integrator" TLS_CERTIFICATES_APP_NAME = "self-signed-certificates" @@ -18,7 +18,7 @@ def test_pitr_backup_aws( charm: str, app_name: str, charm_resources, - substrate: Substrate, + substrate: Substrates, aws_cloud_configs: tuple[dict, dict], ) -> None: """Build, deploy two units of PostgreSQL and do backup in AWS. Then, write new data into DB, switch WAL file and test point-in-time-recovery restore action.""" diff --git a/tests/integration/charm/test_backups_pitr_ceph.py b/tests/integration/charm/test_backups_pitr_ceph.py index bffc1a3c..c4883202 100644 --- a/tests/integration/charm/test_backups_pitr_ceph.py +++ b/tests/integration/charm/test_backups_pitr_ceph.py @@ -3,9 +3,9 @@ # See LICENSE file for licensing details. import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.backup_helpers import CEPH, pitr_backup_operations -from tests.integration.types import Substrate S3_INTEGRATOR_APP_NAME = "s3-integrator" @@ -16,7 +16,7 @@ def test_pitr_backup_ceph( charm: str, app_name: str, charm_resources, - substrate: Substrate, + substrate: Substrates, ceph_cloud_configs: tuple[dict, dict], ) -> None: """Build, deploy two units of PostgreSQL and do backup in microceph. Then, write new data into DB, switch WAL file and test point-in-time-recovery restore action.""" diff --git a/tests/integration/charm/test_backups_pitr_gcp.py b/tests/integration/charm/test_backups_pitr_gcp.py index 1597c1db..6df2e423 100644 --- a/tests/integration/charm/test_backups_pitr_gcp.py +++ b/tests/integration/charm/test_backups_pitr_gcp.py @@ -3,9 +3,9 @@ # See LICENSE file for licensing details. import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.backup_helpers import GCP, pitr_backup_operations -from tests.integration.types import Substrate S3_INTEGRATOR_APP_NAME = "s3-integrator" TLS_CERTIFICATES_APP_NAME = "self-signed-certificates" @@ -18,7 +18,7 @@ def test_pitr_backup_gcp( charm: str, app_name: str, charm_resources, - substrate: Substrate, + substrate: Substrates, gcp_cloud_configs: tuple[dict, dict], ) -> None: """Build, deploy two units of PostgreSQL and do backup in GCP. Then, write new data into DB, switch WAL file and test point-in-time-recovery restore action.""" diff --git a/tests/integration/charm/test_charm.py b/tests/integration/charm/test_charm.py index 9f82f194..db068325 100644 --- a/tests/integration/charm/test_charm.py +++ b/tests/integration/charm/test_charm.py @@ -15,6 +15,7 @@ from lightkube.resources.core_v1 import Endpoints, Pod, Service from psycopg2 import sql from single_kernel_postgresql.config import literals +from single_kernel_postgresql.config.enums import Substrates from single_kernel_postgresql.config.locales import K8S_LOCALES, SNAP_LOCALES from tenacity import Retrying, stop_after_attempt, stop_after_delay, wait_exponential, wait_fixed @@ -34,7 +35,6 @@ wait_for_apps_status, ) from tests.integration.helpers.postgresql import db_connect -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -119,7 +119,7 @@ def _wait_for_app_removal(juju: Juju, app_name: str) -> None: @pytest.mark.abort_on_fail def test_deploy( - juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrate + juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrates ) -> None: """Deploy the charm-under-test. @@ -132,7 +132,7 @@ def test_deploy( config={"profile": "testing"}, num_units=len(UNIT_IDS), resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) # Reducing the update status frequency to speed up the triggering of deferred events. @@ -185,7 +185,7 @@ def test_exporter_is_up(juju: Juju, app_name: str, unit_id: int): @pytest.mark.parametrize("unit_id", UNIT_IDS) -def test_settings_are_correct(juju: Juju, app_name: str, substrate: Substrate, unit_id: int): +def test_settings_are_correct(juju: Juju, app_name: str, substrate: Substrates, unit_id: int): password = get_password(juju, app_name) # Connect to PostgreSQL. @@ -229,7 +229,7 @@ def test_settings_are_correct(juju: Juju, app_name: str, substrate: Substrate, u connection.close() # Validate each configuration set by Patroni on PostgreSQL. - if substrate == Substrate.vm: + if substrate == Substrates.VM: assert settings["cluster_name"] == app_name assert settings["data_directory"] == VM_POSTGRESQL_DATA_DIR assert settings["listen_addresses"] == host @@ -260,21 +260,21 @@ def test_settings_are_correct(juju: Juju, app_name: str, substrate: Substrate, u assert settings["postgresql"]["use_pg_rewind"] is True assert settings["postgresql"]["remove_data_directory_on_rewind_failure"] is False assert settings["postgresql"]["remove_data_directory_on_diverged_timelines"] is False - if substrate == Substrate.vm: + if substrate == Substrates.VM: assert settings["loop_wait"] == 10 assert settings["retry_timeout"] == 10 assert settings["maximum_lag_on_failover"] == 1048576 - if substrate == Substrate.vm: + if substrate == Substrates.VM: logger.warning("Asserting port ranges") unit = get_app_units(juju, app_name)[unit_name] assert unit.open_ports assert unit.open_ports[0] == "5432/tcp" -def test_postgresql_locales(juju: Juju, app_name: str, substrate: Substrate) -> None: +def test_postgresql_locales(juju: Juju, app_name: str, substrate: Substrates) -> None: unit_name = _first_unit(juju, app_name) - if substrate == Substrate.vm: + if substrate == Substrates.VM: raw_locales = juju.exec( "ls", "/snap/charmed-postgresql/current/usr/lib/locale", unit=unit_name ).stdout @@ -293,9 +293,9 @@ def test_postgresql_locales(juju: Juju, app_name: str, substrate: Substrate) -> assert locales == sorted(expected_locales) -def test_postgresql_parameters_change(juju: Juju, app_name: str, substrate: Substrate) -> None: +def test_postgresql_parameters_change(juju: Juju, app_name: str, substrate: Substrates) -> None: """Test that's possible to change PostgreSQL parameters.""" - if substrate == Substrate.vm: + if substrate == Substrates.VM: # VM keeps the deprecated "_" options, whose defaults override the "-" ones # when rendering patroni.yml (e.g. response_lc_monetary="C"). juju.config( @@ -372,7 +372,7 @@ def test_cluster_is_stable_after_leader_deletion(juju: Juju, app_name: str) -> N get_primary(juju, replica) -def test_scale_down_and_up(juju: Juju, app_name: str, substrate: Substrate): +def test_scale_down_and_up(juju: Juju, app_name: str, substrate: Substrates): """Test data is replicated to new units after a scale up.""" # Ensure the initial number of units in the application. initial_scale = len(UNIT_IDS) @@ -393,7 +393,7 @@ def test_scale_down_and_up(juju: Juju, app_name: str, substrate: Substrate): # On K8s only the last pods can be removed, so the leader and primary # deletions are only tested on VM. - if substrate == Substrate.vm: + if substrate == Substrates.VM: # Test the deletion of the unit that is both the leader and the primary. any_unit_name = _first_unit(juju, app_name) primary = get_primary(juju, any_unit_name) diff --git a/tests/integration/charm/test_config.py b/tests/integration/charm/test_config.py index 1c5aedde..e59971f0 100644 --- a/tests/integration/charm/test_config.py +++ b/tests/integration/charm/test_config.py @@ -6,6 +6,7 @@ import jubilant import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.helpers import get_password from tests.integration.helpers.juju import ( @@ -15,14 +16,13 @@ wait_for_apps_status, ) from tests.integration.helpers.postgresql import execute_query -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @pytest.mark.abort_on_fail def test_config_parameters( - juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrate + juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrates ) -> None: """Build and deploy one unit of PostgreSQL and then test config with wrong parameters.""" # Build and deploy the PostgreSQL charm. @@ -34,7 +34,7 @@ def test_config_parameters( config={"profile": "testing"}, num_units=1, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.wait( lambda status: ( diff --git a/tests/integration/charm/test_invalid_database.py b/tests/integration/charm/test_invalid_database.py index b1d943b3..8250ef96 100644 --- a/tests/integration/charm/test_invalid_database.py +++ b/tests/integration/charm/test_invalid_database.py @@ -5,11 +5,11 @@ import jubilant import pytest +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_delay, wait_fixed from tests.integration.charm.helpers import DATA_INTEGRATOR_APP_NAME from tests.integration.helpers.juju import relations -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -32,7 +32,7 @@ def all_units_blocked(status: jubilant.Status) -> bool: @pytest.mark.abort_on_fail def test_deploy( - juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrate + juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrates ) -> None: """Deploy the charms.""" # Deploy the database charm if not already deployed. @@ -44,7 +44,7 @@ def test_deploy( config={"profile": "testing"}, num_units=1, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) # Deploy the data integrator if not already deployed. diff --git a/tests/integration/charm/test_invalid_extra_user_roles.py b/tests/integration/charm/test_invalid_extra_user_roles.py index 87aa3f21..a6c5640b 100644 --- a/tests/integration/charm/test_invalid_extra_user_roles.py +++ b/tests/integration/charm/test_invalid_extra_user_roles.py @@ -6,11 +6,11 @@ import jubilant import pytest +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_delay, wait_fixed from tests.integration.charm.helpers import DATA_INTEGRATOR_APP_NAME from tests.integration.helpers.juju import relations, retry_if_cli_error -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -33,7 +33,7 @@ def all_units_blocked(status: jubilant.Status) -> bool: @pytest.mark.abort_on_fail def test_deploy( - juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrate + juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrates ) -> None: """Deploy the charms.""" # Deploy the database charm if not already deployed. @@ -45,7 +45,7 @@ def test_deploy( config={"profile": "testing"}, num_units=1, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) # Deploy the data integrator if not already deployed. diff --git a/tests/integration/charm/test_ipv6_deployment.py b/tests/integration/charm/test_ipv6_deployment.py index ccb38f5d..8d625c0e 100644 --- a/tests/integration/charm/test_ipv6_deployment.py +++ b/tests/integration/charm/test_ipv6_deployment.py @@ -24,10 +24,10 @@ import jubilant import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.helpers import get_primary, run_command_on_unit from tests.integration.helpers.juju import wait_for_apps_status -from tests.integration.types import Substrate IP_FAMILY = os.environ.get("PG_IP_FAMILY", "ipv6") V6_SUBNET = os.environ.get("PG_IPV6_SUBNET", "fd42:1928:642::/64") @@ -65,7 +65,7 @@ def test_deploy(juju: Juju, charm: str, app_name: str): @pytest.mark.abort_on_fail -def test_peer_binding_address_family(juju: Juju, app_name: str, substrate: Substrate): +def test_peer_binding_address_family(juju: Juju, app_name: str, substrate: Substrates): """The peer relation binding must resolve to the selected family.""" output = run_command_on_unit( juju, f"{app_name}/0", "network-get database-peers --format json", substrate diff --git a/tests/integration/charm/test_ldap.py b/tests/integration/charm/test_ldap.py index c1ba9b71..7196cafe 100644 --- a/tests/integration/charm/test_ldap.py +++ b/tests/integration/charm/test_ldap.py @@ -6,11 +6,11 @@ import jubilant import pytest +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.helpers import CHARM_BASE, get_password from tests.integration.helpers.juju import fast_forward, get_unit_address, wait_for_apps_status from tests.integration.helpers.postgresql import execute_queries_on_unit -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -30,7 +30,7 @@ def require_juju3(juju: jubilant.Juju) -> None: @pytest.mark.abort_on_fail def test_build_and_deploy( - juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrate + juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrates ) -> None: """Build and deploy one unit of PostgreSQL.""" # It is possible for users to provide their own cluster for HA testing. Hence, check if there @@ -44,7 +44,7 @@ def test_build_and_deploy( base=CHARM_BASE, config={"profile": "testing"}, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.wait( lambda status: ( diff --git a/tests/integration/charm/test_password_rotation.py b/tests/integration/charm/test_password_rotation.py index 375fd93f..3311fb91 100644 --- a/tests/integration/charm/test_password_rotation.py +++ b/tests/integration/charm/test_password_rotation.py @@ -9,6 +9,7 @@ import pytest from jubilant import Juju from single_kernel_postgresql.config import literals +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_attempt, wait_exponential from tests.integration.charm.helpers import ( @@ -26,7 +27,6 @@ wait_for_apps_status, ) from tests.integration.helpers.postgresql import db_connect -from tests.integration.types import Substrate # Directory of the PostgreSQL logs on each substrate. VM_POSTGRESQL_LOGS_DIR = f"{literals.BASE_SNAP_DIR}/{literals.SNAP_COMMON}/{literals.VM_LOGS_PATH}" @@ -43,7 +43,7 @@ def _wait_for_active(juju: Juju, app_name: str, timeout: float = 1000) -> None: @pytest.mark.abort_on_fail def test_deploy( - juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrate + juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrates ) -> None: """Deploy three units of PostgreSQL.""" with fast_forward(juju): @@ -54,7 +54,7 @@ def test_deploy( config={"profile": "testing"}, num_units=3, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) _wait_for_active(juju, app_name, timeout=1500) @@ -118,9 +118,9 @@ def test_no_password_change_on_invalid_password(juju: Juju, app_name: str) -> No assert password1 == password2 -def test_no_password_exposed_on_logs(juju: Juju, app_name: str, substrate: Substrate) -> None: +def test_no_password_exposed_on_logs(juju: Juju, app_name: str, substrate: Substrates) -> None: """Test that passwords don't get exposed on postgresql logs.""" - logs_dir = VM_POSTGRESQL_LOGS_DIR if substrate == Substrate.vm else K8S_POSTGRESQL_LOGS_DIR + logs_dir = VM_POSTGRESQL_LOGS_DIR if substrate == Substrates.VM else K8S_POSTGRESQL_LOGS_DIR for unit_name in get_app_units(juju, app_name): try: logs = run_command_on_unit( diff --git a/tests/integration/charm/test_pg_hba.py b/tests/integration/charm/test_pg_hba.py index 42f17f60..e61e0639 100644 --- a/tests/integration/charm/test_pg_hba.py +++ b/tests/integration/charm/test_pg_hba.py @@ -9,6 +9,7 @@ import psycopg2 import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.helpers import get_primary, get_refresh_versions from tests.integration.helpers.juju import ( @@ -20,7 +21,6 @@ wait_for_apps_status, ) from tests.integration.helpers.postgresql import db_connect -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -34,7 +34,7 @@ @pytest.mark.abort_on_fail def test_pg_hba( - juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrate + juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrates ) -> None: with fast_forward(juju): logger.info("Deploying charms") @@ -46,7 +46,7 @@ def test_pg_hba( config={"profile": "testing"}, num_units=2, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) if DATA_INTEGRATOR_APP_NAME not in juju.status().apps: juju.deploy( diff --git a/tests/integration/charm/test_plugins.py b/tests/integration/charm/test_plugins.py index b5351ef7..45ccb323 100644 --- a/tests/integration/charm/test_plugins.py +++ b/tests/integration/charm/test_plugins.py @@ -9,12 +9,12 @@ import psycopg2 import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_delay, wait_fixed from tests.integration.charm.helpers import get_password, get_primary from tests.integration.helpers.juju import get_unit_address from tests.integration.helpers.postgresql import db_connect -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -109,7 +109,7 @@ def _wait_for_active(juju: Juju, app_name: str, timeout: float = 10 * 60) -> Non @pytest.mark.abort_on_fail def test_plugins( - juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrate + juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrates ) -> None: """Build and deploy one unit of PostgreSQL and then test the available plugins.""" # Build and deploy the PostgreSQL charm. @@ -121,7 +121,7 @@ def test_plugins( config={"profile": "testing"}, num_units=2, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) _wait_for_active(juju, app_name, timeout=1500) juju.model_config({"update-status-hook-interval": "5m"}) diff --git a/tests/integration/charm/test_predefined_roles.py b/tests/integration/charm/test_predefined_roles.py index f1a9222a..fc2dad97 100644 --- a/tests/integration/charm/test_predefined_roles.py +++ b/tests/integration/charm/test_predefined_roles.py @@ -8,6 +8,7 @@ import psycopg2 import pytest from psycopg2.sql import SQL, Identifier +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.helpers import ( DATA_INTEGRATOR_APP_NAME, @@ -18,7 +19,6 @@ ) from tests.integration.helpers.juju import get_credentials, get_unit_address, relations from tests.integration.helpers.postgresql import check_connected_user, db_connect -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -38,7 +38,7 @@ def test_deploy( charm, app_name: str, charm_resources, - substrate: Substrate, + substrate: Substrates, predefined_roles_combinations, ) -> None: """Deploy and relate the charms.""" @@ -51,7 +51,7 @@ def test_deploy( config={"profile": "testing"}, num_units=1, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) combinations = [*predefined_roles_combinations, (ROLE_BACKUP,), (ROLE_DBA,)] @@ -90,11 +90,11 @@ def test_deploy( def test_operations( # noqa: C901 - juju: jubilant.Juju, app_name: str, predefined_roles, substrate: Substrate + juju: jubilant.Juju, app_name: str, predefined_roles, substrate: Substrates ) -> None: """Check that the data integrator user can perform the expected operations in each database.""" # Prefix of the relation users (and of the schemas the test creates for them). - schema_prefix = "relation-" if substrate == Substrate.vm else "relation_id_" + schema_prefix = "relation-" if substrate == Substrates.VM else "relation_id_" primary = get_primary(juju, f"{app_name}/0") host = get_unit_address(juju, primary) operator_password = get_password(juju, app_name) diff --git a/tests/integration/charm/test_storage.py b/tests/integration/charm/test_storage.py index cd097691..3d0ff679 100644 --- a/tests/integration/charm/test_storage.py +++ b/tests/integration/charm/test_storage.py @@ -9,10 +9,10 @@ import pytest from jubilant import Juju from single_kernel_postgresql.config import literals +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.helpers import get_db_primary_unit, run_command_on_unit from tests.integration.helpers.juju import fast_forward, wait_for_apps_status -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -21,7 +21,7 @@ @pytest.mark.abort_on_fail -def test_storage(juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrate): +def test_storage(juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrates): """Build and deploy the charm and check its storage list.""" with fast_forward(juju): juju.deploy( @@ -31,7 +31,7 @@ def test_storage(juju: Juju, charm: str, app_name: str, charm_resources, substra config={"profile": "testing"}, num_units=1, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) juju.wait( wait_for_apps_status(jubilant.all_active, app_name), @@ -51,7 +51,7 @@ def test_storage(juju: Juju, charm: str, app_name: str, charm_resources, substra @pytest.mark.k8s_only def test_filling_and_emptying_pgdata_storage( - juju: Juju, app_name: str, architecture: str, substrate: Substrate + juju: Juju, app_name: str, architecture: str, substrate: Substrates ): """Saturate charm's pgdata volume.""" if architecture != "amd64": diff --git a/tests/integration/charm/test_subordinates.py b/tests/integration/charm/test_subordinates.py index 113c1b2e..bda573dc 100644 --- a/tests/integration/charm/test_subordinates.py +++ b/tests/integration/charm/test_subordinates.py @@ -8,12 +8,12 @@ import jubilant import pytest from jubilant import Juju +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.helpers import ( scale_application, ) from tests.integration.helpers.juju import wait_for_apps_status -from tests.integration.types import Substrate DATABASE_APP_NAME = "pg" LS_CLIENT = "landscape-client" @@ -73,7 +73,7 @@ def test_deploy(juju: Juju, charm: str, check_subordinate_env_vars): ) -def test_scale_up(juju: Juju, substrate: Substrate, check_subordinate_env_vars): +def test_scale_up(juju: Juju, substrate: Substrates, check_subordinate_env_vars): scale_application(juju, DATABASE_APP_NAME, 4, substrate) juju.wait( @@ -85,7 +85,7 @@ def test_scale_up(juju: Juju, substrate: Substrate, check_subordinate_env_vars): ) -def test_scale_down(juju: Juju, substrate: Substrate, check_subordinate_env_vars): +def test_scale_down(juju: Juju, substrate: Substrates, check_subordinate_env_vars): scale_application(juju, DATABASE_APP_NAME, 3, substrate) juju.wait( diff --git a/tests/integration/charm/test_tls.py b/tests/integration/charm/test_tls.py index 718b0315..1f301ba4 100644 --- a/tests/integration/charm/test_tls.py +++ b/tests/integration/charm/test_tls.py @@ -8,6 +8,7 @@ import pytest from jubilant import Juju from single_kernel_postgresql.config import literals +from single_kernel_postgresql.config.enums import Substrates from tenacity import Retrying, stop_after_attempt, stop_after_delay, wait_exponential, wait_fixed from tests.integration.charm.helpers import ( @@ -28,7 +29,6 @@ wait_for_apps_status, ) from tests.integration.helpers.postgresql import db_connect -from tests.integration.types import Substrate logger = logging.getLogger(__name__) @@ -50,9 +50,9 @@ REWIND_TLS_LOG = "connection authorized: user=rewind database=postgres SSL enabled" -def check_tls_rewind(juju: Juju, app_name: str, substrate: Substrate) -> None: +def check_tls_rewind(juju: Juju, app_name: str, substrate: Substrates) -> None: """Check that pg_rewind connected through TLS, looking at the logs of every unit.""" - logs_dir = VM_POSTGRESQL_LOGS_DIR if substrate == Substrate.vm else K8S_POSTGRESQL_LOGS_DIR + logs_dir = VM_POSTGRESQL_LOGS_DIR if substrate == Substrates.VM else K8S_POSTGRESQL_LOGS_DIR logs = "" for unit_name in get_app_units(juju, app_name): logger.info(f"checking if pg_rewind used TLS on {unit_name}") @@ -69,7 +69,7 @@ def check_tls_rewind(juju: Juju, app_name: str, substrate: Substrate) -> None: @pytest.mark.abort_on_fail def test_deploy( - juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrate + juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrates ) -> None: """Deploy three units of PostgreSQL.""" with fast_forward(juju): @@ -80,14 +80,14 @@ def test_deploy( config={"profile": "testing"}, num_units=DATABASE_UNITS, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) # No wait between deploying charms, since we can't guarantee users will wait. Furthermore, # bundles don't wait between deploying charms. @pytest.mark.abort_on_fail -def test_tls_enabled(juju: Juju, app_name: str, substrate: Substrate) -> None: +def test_tls_enabled(juju: Juju, app_name: str, substrate: Substrates) -> None: """Test that TLS is enabled when relating to the TLS Certificates Operator.""" with fast_forward(juju): # Deploy TLS Certificates operator. @@ -133,7 +133,7 @@ def test_tls_enabled(juju: Juju, app_name: str, substrate: Substrate) -> None: timeout=10 * 60, successes=30, ) - if substrate == Substrate.vm: + if substrate == Substrates.VM: # Make the fail-over happen faster. change_primary_start_timeout(juju, primary, 0, patroni_password) @@ -143,7 +143,7 @@ def test_tls_enabled(juju: Juju, app_name: str, substrate: Substrate) -> None: ) with fast_forward(juju, "24h"): - if substrate == Substrate.vm: + if substrate == Substrates.VM: promote_command = f"sudo charmed-postgresql.pg-ctl -D {VM_POSTGRESQL_DATA_DIR} promote" else: promote_command = ( @@ -183,7 +183,7 @@ def test_tls_enabled(juju: Juju, app_name: str, substrate: Substrate) -> None: # Stop the initial primary. logger.info(f"stopping database on {primary}") - if substrate == Substrate.vm: + if substrate == Substrates.VM: # Kill both Patroni and PostgreSQL OS processes (the snap restarts Patroni). run_command_on_unit( juju, @@ -208,7 +208,7 @@ def test_tls_enabled(juju: Juju, app_name: str, substrate: Substrate) -> None: ): with attempt: assert primary_changed(juju, primary), "primary not changed" - if substrate == Substrate.vm: + if substrate == Substrates.VM: change_primary_start_timeout(juju, primary, 300, patroni_password) # Check the logs to ensure TLS is being used by pg_rewind. @@ -230,10 +230,10 @@ def test_tls_enabled(juju: Juju, app_name: str, substrate: Substrate) -> None: ) -def test_remove_tls(juju: Juju, app_name: str, substrate: Substrate) -> None: +def test_remove_tls(juju: Juju, app_name: str, substrate: Substrates) -> None: with fast_forward(juju): # Remove the relation. - if substrate == Substrate.vm: + if substrate == Substrates.VM: juju.remove_relation( f"{app_name}:client-certificates", f"{tls_certificates_app_name}:certificates" ) diff --git a/tests/integration/charm/test_username_prefix.py b/tests/integration/charm/test_username_prefix.py index 06155165..da17bb42 100644 --- a/tests/integration/charm/test_username_prefix.py +++ b/tests/integration/charm/test_username_prefix.py @@ -6,6 +6,7 @@ import jubilant import psycopg2 import pytest +from single_kernel_postgresql.config.enums import Substrates from tests.integration.charm.helpers import DATA_INTEGRATOR_APP_NAME from tests.integration.helpers.juju import ( @@ -13,17 +14,16 @@ get_unit_address, wait_for_apps_status, ) -from tests.integration.types import Substrate MINUTE_SECS = 60 -def uris_host(juju: jubilant.Juju, app_name: str, substrate: Substrate) -> str: +def uris_host(juju: jubilant.Juju, app_name: str, substrate: Substrates) -> str: """Host the charm publishes in the relation URIs. The leader unit IP on VM, the primary service on K8s. """ - if substrate == Substrate.vm: + if substrate == Substrates.VM: return get_unit_address(juju, get_app_leader(juju, app_name)) # The K8s namespace is the model name, without the "controller:" prefix. namespace = juju.model.split(":")[-1] @@ -32,7 +32,7 @@ def uris_host(juju: jubilant.Juju, app_name: str, substrate: Substrate) -> str: @pytest.mark.abort_on_fail def test_deploy( - juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrate + juju: jubilant.Juju, charm, app_name: str, charm_resources, substrate: Substrates ) -> None: """Deploy the charms.""" logging.info("Deploying database charm") @@ -42,7 +42,7 @@ def test_deploy( config={"profile": "testing"}, num_units=1, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) # Deploy the data integrator if not already deployed. @@ -102,7 +102,7 @@ def test_prefix_too_short(juju: jubilant.Juju, app_name: str) -> None: juju.wait(jubilant.all_agents_idle, timeout=5 * MINUTE_SECS) -def test_get_prefix(juju: jubilant.Juju, app_name: str, substrate: Substrate) -> None: +def test_get_prefix(juju: jubilant.Juju, app_name: str, substrate: Substrates) -> None: db_ip = get_unit_address(juju, get_app_leader(juju, app_name)) logging.info("Setting prefix") @@ -135,7 +135,7 @@ def test_get_prefix(juju: jubilant.Juju, app_name: str, substrate: Substrate) -> psycopg2.connect(f"postgresql://tester:password@{db_ip}:5432/postgre2") -def test_remove_db_from_prefix(juju: jubilant.Juju, app_name: str, substrate: Substrate) -> None: +def test_remove_db_from_prefix(juju: jubilant.Juju, app_name: str, substrate: Substrates) -> None: db_ip = get_unit_address(juju, get_app_leader(juju, app_name)) juju.remove_relation(app_name, "di1") @@ -157,7 +157,7 @@ def test_remove_db_from_prefix(juju: jubilant.Juju, app_name: str, substrate: Su psycopg2.connect(f"postgresql://tester:password@{db_ip}:5432/postgre2") -def test_readd_db_from_prefix(juju: jubilant.Juju, app_name: str, substrate: Substrate) -> None: +def test_readd_db_from_prefix(juju: jubilant.Juju, app_name: str, substrate: Substrates) -> None: db_ip = get_unit_address(juju, get_app_leader(juju, app_name)) juju.integrate(app_name, "di1") diff --git a/tests/integration/charm/test_wrong_arch.py b/tests/integration/charm/test_wrong_arch.py index 5ff584fc..66977b54 100644 --- a/tests/integration/charm/test_wrong_arch.py +++ b/tests/integration/charm/test_wrong_arch.py @@ -7,21 +7,20 @@ import jubilant import pytest from jubilant import Juju - -from tests.integration.types import Substrate +from single_kernel_postgresql.config.enums import Substrates TEST_CHARMS_PATH = Path(__file__).parents[2] / "charms" -def fetch_charm(substrate: Substrate, architecture: str) -> str: +def fetch_charm(substrate: Substrates, architecture: str) -> str: """Fetch the packed test charm for a specific architecture, ignoring the host one.""" - charm_dir = TEST_CHARMS_PATH / f"postgresql_{substrate}_test_charm" + charm_dir = TEST_CHARMS_PATH / f"postgresql_{substrate.value}_test_charm" packed_charms = list(charm_dir.glob(f"*-{architecture}.charm")) if not packed_charms: pytest.fail( f"No {architecture} charm found in {charm_dir}, build it with:" f" scripts/build_charm.sh -p ubuntu@24.04:{architecture}" - f" -c tests/charms/postgresql_{substrate}_test_charm" + f" -c tests/charms/postgresql_{substrate.value}_test_charm" ) return str(packed_charms[0].resolve(strict=True)) @@ -35,7 +34,7 @@ def _unit_is_blocked(status: jubilant.Status, app_name: str) -> bool: def _deploy_and_wait_for_blocked( - juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrate + juju: Juju, charm: str, app_name: str, charm_resources, substrate: Substrates ) -> None: juju.deploy( charm, @@ -43,7 +42,7 @@ def _deploy_and_wait_for_blocked( base="ubuntu@24.04", config={"profile": "testing"}, resources=charm_resources, - trust=substrate == Substrate.k8s, + trust=substrate == Substrates.K8S, ) # The wrong-architecture charm sets BlockedStatus and exits on every hook, so # it never converges to a fully idle state (less so under slow CI machine @@ -52,7 +51,7 @@ def _deploy_and_wait_for_blocked( def test_arm_charm_on_amd_host( - juju: Juju, app_name: str, charm_resources, architecture: str, substrate: Substrate + juju: Juju, app_name: str, charm_resources, architecture: str, substrate: Substrates ) -> None: """Try deploying an arm64 charm on an amd64 host.""" if architecture != "amd64": @@ -62,7 +61,7 @@ def test_arm_charm_on_amd_host( def test_amd_charm_on_arm_host( - juju: Juju, app_name: str, charm_resources, architecture: str, substrate: Substrate + juju: Juju, app_name: str, charm_resources, architecture: str, substrate: Substrates ) -> None: """Try deploying an amd64 charm on an arm64 host.""" if architecture != "arm64": diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 4d9e2299..11b260e0 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -8,11 +8,10 @@ import jubilant import pytest - -from tests.integration.types import Substrate +from single_kernel_postgresql.config.enums import Substrates # Juju model type for each substrate, used to check the controller matches --substrate. -MODEL_TYPES = {Substrate.vm: "iaas", Substrate.k8s: "caas"} +MODEL_TYPES = {Substrates.VM: "iaas", Substrates.K8S: "caas"} # Stash key of a module whose abort_on_fail test failed (value: nodeid of that test). ABORTED_BY = pytest.StashKey[str]() @@ -41,7 +40,7 @@ def pytest_addoption(parser: pytest.Parser) -> None: ) parser.addoption( "--substrate", - choices=[substrate.value for substrate in Substrate], + choices=[substrate.value for substrate in Substrates], required=True, help="Substrate to run the integration tests on.", ) @@ -77,21 +76,21 @@ def pytest_runtest_setup(item: pytest.Item) -> None: def pytest_collection_modifyitems(config: pytest.Config, items: list[pytest.Item]) -> None: - substrate = Substrate(config.getoption("--substrate")) + substrate = Substrates(config.getoption("--substrate")) for item in items: - if substrate != Substrate.vm and item.get_closest_marker("vm_only"): + if substrate != Substrates.VM and item.get_closest_marker("vm_only"): item.add_marker(pytest.mark.skip(reason="VM only test")) - if substrate != Substrate.k8s and item.get_closest_marker("k8s_only"): + if substrate != Substrates.K8S and item.get_closest_marker("k8s_only"): item.add_marker(pytest.mark.skip(reason="K8s only test")) @pytest.fixture(scope="session", autouse=True) -def substrate(request: pytest.FixtureRequest) -> Substrate: +def substrate(request: pytest.FixtureRequest) -> Substrates: """The substrate selected with --substrate. Overrides the fixture in tests/conftest.py, which runs every test on both substrates. """ - return Substrate(request.config.getoption("--substrate")) + return Substrates(request.config.getoption("--substrate")) @pytest.fixture(scope="session") @@ -103,7 +102,7 @@ def architecture() -> str: @pytest.fixture(scope="module") -def juju(request: pytest.FixtureRequest, substrate: Substrate) -> Generator[jubilant.Juju]: +def juju(request: pytest.FixtureRequest, substrate: Substrates) -> Generator[jubilant.Juju]: """Juju model for the test module: --model if given, a temporary one otherwise.""" controller = request.config.getoption("--controller") model = request.config.getoption("--model") @@ -119,10 +118,10 @@ def juju(request: pytest.FixtureRequest, substrate: Substrate) -> Generator[jubi yield juju -def _check_model_type(juju: jubilant.Juju, substrate: Substrate) -> None: +def _check_model_type(juju: jubilant.Juju, substrate: Substrates) -> None: model_type = juju.status().model.type if model_type != MODEL_TYPES[substrate]: pytest.fail( - f"--substrate={substrate} needs a {MODEL_TYPES[substrate]} model, but the model is" - f" {model_type}: use --controller to pick a {substrate} controller" + f"--substrate={substrate.value} needs a {MODEL_TYPES[substrate]} model, but the model is" + f" {model_type}: use --controller to pick a {substrate.value} controller" ) diff --git a/tests/integration/types.py b/tests/integration/types.py deleted file mode 100644 index 43700012..00000000 --- a/tests/integration/types.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2026 Canonical Ltd. -# See LICENSE file for licensing details. - -"""Types shared by the integration tests.""" - -from enum import StrEnum - - -class Substrate(StrEnum): - """Substrate the integration tests run on (selected with --substrate).""" - - vm = "vm" - k8s = "k8s" From ae507ac23cc49b7553191d8233d8d557299ae46a Mon Sep 17 00:00:00 2001 From: xavipg003 Date: Fri, 20 Nov 2026 06:02:50 -0500 Subject: [PATCH 3/5] Exit first option for pytest --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 7750d88f..c5294473 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,6 +102,7 @@ show_missing = true [tool.pytest.ini_options] minversion = "6.0" log_cli_level = "INFO" +addopts = "--exitfirst" # Linting tools configuration [tool.ruff] From 5afe8b27e415b145e892e5774fa06975b9ba6ac6 Mon Sep 17 00:00:00 2001 From: xavipg003 Date: Fri, 20 Nov 2026 06:06:05 -0500 Subject: [PATCH 4/5] Removed HA pytest dir --- tests/integration/charm/ha_tests/__init__.py | 2 -- tests/integration/charm/helpers.py | 6 +++--- .../{ha_tests => high_availability}/clean-data-dir-k8s.sh | 0 .../{ha_tests => high_availability}/clean-data-dir-vm.sh | 0 tests/integration/charm/high_availability/conftest.py | 2 +- .../manifests/chaos_network_loss.yml | 0 .../manifests/extend_pebble_restart_delay.yml | 0 .../manifests/restore_pebble_restart_delay.yml | 0 .../scripts/deploy_chaos_mesh.sh | 0 .../scripts/destroy_chaos_mesh.sh | 0 .../charm/high_availability/test_self_healing_2.py | 2 +- .../charm/high_availability/test_self_healing_3.py | 4 ++-- 12 files changed, 7 insertions(+), 9 deletions(-) delete mode 100644 tests/integration/charm/ha_tests/__init__.py rename tests/integration/charm/{ha_tests => high_availability}/clean-data-dir-k8s.sh (100%) rename tests/integration/charm/{ha_tests => high_availability}/clean-data-dir-vm.sh (100%) rename tests/integration/charm/{ha_tests => high_availability}/manifests/chaos_network_loss.yml (100%) rename tests/integration/charm/{ha_tests => high_availability}/manifests/extend_pebble_restart_delay.yml (100%) rename tests/integration/charm/{ha_tests => high_availability}/manifests/restore_pebble_restart_delay.yml (100%) rename tests/integration/charm/{ha_tests => high_availability}/scripts/deploy_chaos_mesh.sh (100%) rename tests/integration/charm/{ha_tests => high_availability}/scripts/destroy_chaos_mesh.sh (100%) diff --git a/tests/integration/charm/ha_tests/__init__.py b/tests/integration/charm/ha_tests/__init__.py deleted file mode 100644 index fa89e9d7..00000000 --- a/tests/integration/charm/ha_tests/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# Copyright 2026 Canonical Ltd. -# See LICENSE file for licensing details. diff --git a/tests/integration/charm/helpers.py b/tests/integration/charm/helpers.py index e54d0899..4a4e894a 100644 --- a/tests/integration/charm/helpers.py +++ b/tests/integration/charm/helpers.py @@ -2509,7 +2509,7 @@ def deploy_chaos_mesh(namespace: str) -> None: env["KUBECONFIG"] = os.path.expanduser("~/.kube/config") subprocess.check_output( " ".join([ - "tests/integration/charm/ha_tests/scripts/deploy_chaos_mesh.sh", + "tests/integration/charm/high_availability/scripts/deploy_chaos_mesh.sh", namespace, ]), shell=True, @@ -2522,7 +2522,7 @@ def destroy_chaos_mesh(namespace: str) -> None: env = os.environ env["KUBECONFIG"] = os.path.expanduser("~/.kube/config") subprocess.check_output( - f"tests/integration/charm/ha_tests/scripts/destroy_chaos_mesh.sh {namespace}", + f"tests/integration/charm/high_availability/scripts/destroy_chaos_mesh.sh {namespace}", shell=True, env=env, ) @@ -2538,7 +2538,7 @@ def isolate_instance_from_cluster(juju: jubilant.Juju, unit_name: str) -> None: with tempfile.NamedTemporaryFile() as temp_file: with open( - "tests/integration/charm/ha_tests/manifests/chaos_network_loss.yml" + "tests/integration/charm/high_availability/manifests/chaos_network_loss.yml" ) as chaos_network_loss_file: template = string.Template(chaos_network_loss_file.read()) chaos_network_loss = template.substitute( diff --git a/tests/integration/charm/ha_tests/clean-data-dir-k8s.sh b/tests/integration/charm/high_availability/clean-data-dir-k8s.sh similarity index 100% rename from tests/integration/charm/ha_tests/clean-data-dir-k8s.sh rename to tests/integration/charm/high_availability/clean-data-dir-k8s.sh diff --git a/tests/integration/charm/ha_tests/clean-data-dir-vm.sh b/tests/integration/charm/high_availability/clean-data-dir-vm.sh similarity index 100% rename from tests/integration/charm/ha_tests/clean-data-dir-vm.sh rename to tests/integration/charm/high_availability/clean-data-dir-vm.sh diff --git a/tests/integration/charm/high_availability/conftest.py b/tests/integration/charm/high_availability/conftest.py index 79c3e2f0..e2c620d7 100644 --- a/tests/integration/charm/high_availability/conftest.py +++ b/tests/integration/charm/high_availability/conftest.py @@ -62,7 +62,7 @@ def juju_restart_policy(juju: jubilant.Juju, substrate: Substrates) -> None: helpers.modify_pebble_restart_delay( juju, unit, - "tests/integration/charm/ha_tests/manifests/extend_pebble_restart_delay.yml", + "tests/integration/charm/high_availability/manifests/extend_pebble_restart_delay.yml", ) with fast_forward(juju): wait_for_idle( diff --git a/tests/integration/charm/ha_tests/manifests/chaos_network_loss.yml b/tests/integration/charm/high_availability/manifests/chaos_network_loss.yml similarity index 100% rename from tests/integration/charm/ha_tests/manifests/chaos_network_loss.yml rename to tests/integration/charm/high_availability/manifests/chaos_network_loss.yml diff --git a/tests/integration/charm/ha_tests/manifests/extend_pebble_restart_delay.yml b/tests/integration/charm/high_availability/manifests/extend_pebble_restart_delay.yml similarity index 100% rename from tests/integration/charm/ha_tests/manifests/extend_pebble_restart_delay.yml rename to tests/integration/charm/high_availability/manifests/extend_pebble_restart_delay.yml diff --git a/tests/integration/charm/ha_tests/manifests/restore_pebble_restart_delay.yml b/tests/integration/charm/high_availability/manifests/restore_pebble_restart_delay.yml similarity index 100% rename from tests/integration/charm/ha_tests/manifests/restore_pebble_restart_delay.yml rename to tests/integration/charm/high_availability/manifests/restore_pebble_restart_delay.yml diff --git a/tests/integration/charm/ha_tests/scripts/deploy_chaos_mesh.sh b/tests/integration/charm/high_availability/scripts/deploy_chaos_mesh.sh similarity index 100% rename from tests/integration/charm/ha_tests/scripts/deploy_chaos_mesh.sh rename to tests/integration/charm/high_availability/scripts/deploy_chaos_mesh.sh diff --git a/tests/integration/charm/ha_tests/scripts/destroy_chaos_mesh.sh b/tests/integration/charm/high_availability/scripts/destroy_chaos_mesh.sh similarity index 100% rename from tests/integration/charm/ha_tests/scripts/destroy_chaos_mesh.sh rename to tests/integration/charm/high_availability/scripts/destroy_chaos_mesh.sh diff --git a/tests/integration/charm/high_availability/test_self_healing_2.py b/tests/integration/charm/high_availability/test_self_healing_2.py index 9ba5e118..9d714c89 100644 --- a/tests/integration/charm/high_availability/test_self_healing_2.py +++ b/tests/integration/charm/high_availability/test_self_healing_2.py @@ -220,7 +220,7 @@ def test_full_cluster_restart( modify_pebble_restart_delay( juju, unit, - "tests/integration/charm/ha_tests/manifests/restore_pebble_restart_delay.yml", + "tests/integration/charm/high_availability/manifests/restore_pebble_restart_delay.yml", ensure_replan=True, ) change_ha_patroni_setting( diff --git a/tests/integration/charm/high_availability/test_self_healing_3.py b/tests/integration/charm/high_availability/test_self_healing_3.py index a1586883..678e8c5f 100644 --- a/tests/integration/charm/high_availability/test_self_healing_3.py +++ b/tests/integration/charm/high_availability/test_self_healing_3.py @@ -44,8 +44,8 @@ MEDIAN_ELECTION_TIME = 10 CLEAN_DATA_DIR_SCRIPT = { - Substrates.VM: "tests/integration/charm/ha_tests/clean-data-dir-vm.sh", - Substrates.K8S: "tests/integration/charm/ha_tests/clean-data-dir-k8s.sh", + Substrates.VM: "tests/integration/charm/high_availability/clean-data-dir-vm.sh", + Substrates.K8S: "tests/integration/charm/high_availability/clean-data-dir-k8s.sh", } VM_STORAGE = { From c497ee54e9c42d003149e15b67ebd6c79426687f Mon Sep 17 00:00:00 2001 From: xavipg003 Date: Fri, 20 Nov 2026 06:20:09 -0500 Subject: [PATCH 5/5] Use DPW for build charm with charmcraft monorepo option --- .github/workflows/ci.yaml | 63 ++------- .github/workflows/integration_test.yaml | 12 +- scripts/build_charm.sh | 126 ------------------ spread.yaml | 2 +- .../postgresql_k8s_test_charm/charmcraft.yaml | 6 +- .../postgresql_k8s_test_charm/poetry.lock | 29 +++- .../postgresql_k8s_test_charm/pyproject.toml | 2 + .../refresh_versions.toml | 1 + .../postgresql_vm_test_charm/charmcraft.yaml | 6 +- .../postgresql_vm_test_charm/poetry.lock | 25 +++- .../postgresql_vm_test_charm/pyproject.toml | 2 + .../refresh_versions.toml | 1 + tests/integration/charm/conftest.py | 5 +- tests/integration/charm/test_wrong_arch.py | 4 +- tox.ini | 2 +- 15 files changed, 88 insertions(+), 198 deletions(-) delete mode 100755 scripts/build_charm.sh diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 58ce170f..9652d595 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -80,68 +80,21 @@ jobs: cache-mode: none build: - # The test charms can't use data-platform-workflows build_charm.yaml: scripts/build_charm.sh - # has to copy the library into them before packing + # The test charms install the library from the repository root (pyproject.toml path + # dependency); build_charm.yaml packs with charmcraft monorepo support to make it available strategy: fail-fast: false matrix: substrate: - vm - k8s - platform: - - arch: amd64 - runner: ubuntu-latest - - arch: arm64 - runner: ubuntu-26.04-arm - name: Build ${{ matrix.substrate }} test charm | ${{ matrix.platform.arch }} - runs-on: ${{ matrix.platform.runner }} - timeout-minutes: 60 - steps: - - name: Checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - # Same set up as data-platform-workflows build_charm.yaml (v54.0.0) - - name: Set up environment - run: | - sudo snap install lxd - sudo adduser "$USER" lxd - newgrp lxd --command 'lxd waitready' - newgrp lxd --command 'lxd init --auto' - # Workaround for Docker & LXD on same machine - sudo iptables -F FORWARD - sudo iptables -P FORWARD ACCEPT - - sudo snap install charmcraft --classic - pipx install poetry - pipx install charmcraftcache - - run: snap list - - name: Build test charm - id: pack - run: | - newgrp lxd --command \ - 'scripts/build_charm.sh \ - -p "ubuntu@24.04:'"${VAR_ARCH}"'" \ - -c "tests/charms/postgresql_'"${VAR_SUBSTRATE}"'_test_charm"' - env: - # Used by charmcraftcache (to avoid GitHub API rate limit) - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - VAR_SUBSTRATE: ${{ matrix.substrate }} - VAR_ARCH: ${{ matrix.platform.arch }} - CI_CACHE: true - - name: Charmcraft logs - if: ${{ success() || (failure() && steps.pack.outcome == 'failure') }} - run: cat ~/.local/state/charmcraft/log/* - - name: Upload test charm - uses: actions/upload-artifact@v7 - with: - name: test-charm-${{ matrix.substrate }}-${{ matrix.platform.arch }} - path: tests/charms/postgresql_${{ matrix.substrate }}_test_charm/*.charm - if-no-files-found: error - outputs: + name: Build ${{ matrix.substrate }} test charm + uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v56.0.0 + with: artifact-prefix: test-charm - permissions: {} + path-to-charm-directory: tests/charms/postgresql_${{ matrix.substrate }}_test_charm + permissions: + contents: read cache-mode: none integration-test: diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index 454bdc7e..c7889dbc 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -5,8 +5,8 @@ on: description: | Prefix for the test charm package GitHub artifacts - Built in ci.yaml with scripts/build_charm.sh: one artifact per substrate and - architecture (`-vm-amd64`, `-vm-arm64`, `-k8s-amd64`, ...) + Built in ci.yaml with data-platform-workflows build_charm.yaml: one artifact per test + charm and platform (`-tests-charms-postgresql_vm_test_charm--platform-ubuntu@24.04-amd64`, ...) required: true type: string secrets: @@ -152,10 +152,12 @@ jobs: uses: actions/download-artifact@v8 with: # All architectures: test_wrong_arch.py deploys the charm of the other architecture - pattern: ${{ inputs.artifact-prefix }}-${{ matrix.job.substrate }}-* + pattern: ${{ inputs.artifact-prefix }}-tests-charms-postgresql_${{ matrix.job.substrate }}_test_charm--platform-* merge-multiple: true - # Where the `charm` fixture (tests/integration/charm/conftest.py) looks for it - path: tests/charms/postgresql_${{ matrix.job.substrate }}_test_charm/ + # The artifacts keep the path from the repository root, so the charms land in + # tests/charms/postgresql__test_charm/, where the `charm` fixture + # (tests/integration/charm/conftest.py) looks for them + path: . - name: Run spread job timeout-minutes: 180 id: spread diff --git a/scripts/build_charm.sh b/scripts/build_charm.sh deleted file mode 100755 index dd9721ec..00000000 --- a/scripts/build_charm.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/bash - -## This builds the whl and then copies it to all 4 test charms and updates the requirements file. - -set -e - -# --- Variables --- -PLATFORM="" -declare -a TEST_CHARMS=() - -LIB="single_kernel_postgresql" -LIB_PATH="./${LIB}" -CHARMS_PATH="./tests/charms" -# This is for charms that don't need the library to be copied and can be packed directly. -THIRD_PARTY_CHARMS=("") -# We compute a version based on the tag of the pip package version. -# This is just for the test charms -VERSION_TAG="test/0.0.0+dirty" - -# --- Argument Parsing --- -while [[ "$#" -gt 0 ]]; do - case $1 in - -p|--platform) - PLATFORM="$2" - shift 2 - ;; - -c|--charm) - TEST_CHARMS+=("$2") - shift 2 - ;; - *) - # Maintain backward compatibility for an unnamed first parameter as the charm - if [[ "$1" != -* ]] && [ ${#TEST_CHARMS[@]} -eq 0 ]; then - TEST_CHARMS+=("$1") - shift - else - echo "Unknown parameter passed: $1" - echo "Usage: $0 [-p|--platform ] [-c|--charm ] [charm_path]" - exit 1 - fi - ;; - esac -done - -# Default to postgresql_vm_test_charm if no charms were specified -if [ ${#TEST_CHARMS[@]} -eq 0 ]; then - TEST_CHARMS=("${CHARMS_PATH}/postgresql_vm_test_charm") -fi - -# --- Helper Functions --- -pack_charm() { - # Store arguments in an array to safely handle spaces or empty strings - local pack_args=("-v") - - # Inject platform argument if one was provided - if [ -n "$PLATFORM" ]; then - pack_args+=("--platform" "$PLATFORM") - fi - - if ${CI_CACHE:-false}; then - ccc pack "${pack_args[@]}" - else - charmcraft pack "${pack_args[@]}" - fi -} - - -# --- Main Logic --- -git_hash=$(git describe --always --dirty) - -for directory in "${TEST_CHARMS[@]}"; do - - # Pack the third party charms - if [[ " ${THIRD_PARTY_CHARMS[*]} " =~ ${directory} ]]; then - echo -e "Packing third party charm ${directory}\n" - pushd "$directory" - pack_charm - popd - else - echo "clearing out libs for charm" - directory_lib_path="${directory}/${LIB}" - rm -rf "$directory_lib_path" - mkdir "$directory_lib_path" - - echo "copying over libs from single kernel charm" - cp -r "${LIB_PATH}/" "$directory_lib_path/" - cp "pyproject.toml" "$directory_lib_path" - cp "README.md" "$directory_lib_path" - cp "LICENSE" "$directory_lib_path" - - echo -e "Building charm ${directory}\n" - # break - - pushd "$directory" - - # Backup files - cp refresh_versions.toml refresh_versions.toml.backup - cp pyproject.toml pyproject.toml.backup - cp poetry.lock poetry.lock.backup - - sed -i "2s@^@charm = \"${VERSION_TAG}\"\n@" refresh_versions.toml - - # Disable strict mode for build test lib. - pushd "${LIB_PATH}" - git init - sed 's/strict = true/strict = false/' -i "pyproject.toml" - popd - - poetry add "${LIB_PATH}/" - poetry lock - - - # Pack the charm - pack_charm - - # Cleanup - echo "removing copied files from single kernel charm." - rm -rf "${LIB_PATH}" - mv pyproject.toml.backup pyproject.toml - mv poetry.lock.backup poetry.lock - mv refresh_versions.toml.backup refresh_versions.toml - - # Go back to root directory - popd - fi -done \ No newline at end of file diff --git a/spread.yaml b/spread.yaml index 9cb5158e..e1842c35 100644 --- a/spread.yaml +++ b/spread.yaml @@ -2,7 +2,7 @@ project: postgresql-single-kernel-library # Integration tests of the VM and K8s test charms (tests/charms/), run on GitHub Actions. # Each task runs on both backends: github-ci-vm (lxd) and github-ci-k8s (Canonical K8s). -# The test charms are built beforehand (scripts/build_charm.sh) and downloaded into +# The test charms are built beforehand (data-platform-workflows build_charm.yaml) and downloaded into # tests/charms// by .github/workflows/integration_test.yaml. backends: github-ci-vm: diff --git a/tests/charms/postgresql_k8s_test_charm/charmcraft.yaml b/tests/charms/postgresql_k8s_test_charm/charmcraft.yaml index 9e4159e3..0ddb3920 100644 --- a/tests/charms/postgresql_k8s_test_charm/charmcraft.yaml +++ b/tests/charms/postgresql_k8s_test_charm/charmcraft.yaml @@ -48,7 +48,11 @@ parts: # (https://github.com/canonical/charmcraft/blob/9ff19c328e23b50cc06f04e8a5ad4835740badf4/charmcraft/parts/plugins/_poetry.py#L95 # https://github.com/canonical/craft-parts/blob/afb0d652eb330b6aaad4f40fbd6e5357d358de47/craft_parts/plugins/base.py#L270) plugin: poetry - source: . + # Repository root, so the library (path dependency in pyproject.toml) is available. + # Needs CHARMCRAFT_EXPERIMENTAL_MONOREPO=1 + # (https://canonical.com/juju/docs/charmcraft/latest/howto/pack-a-charm-in-a-monorepo/) + source: ../../.. + source-subdir: tests/charms/postgresql_k8s_test_charm after: - poetry-deps poetry-export-extra-args: ['--only', 'main,charm-libs', "--without-hashes"] # For the library build locally diff --git a/tests/charms/postgresql_k8s_test_charm/poetry.lock b/tests/charms/postgresql_k8s_test_charm/poetry.lock index 88d5d3bc..1657e3f0 100644 --- a/tests/charms/postgresql_k8s_test_charm/poetry.lock +++ b/tests/charms/postgresql_k8s_test_charm/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.4.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.5.1 and should not be changed by hand. [[package]] name = "annotated-types" @@ -78,7 +78,7 @@ files = [ [package.dependencies] jmespath = ">=0.7.1,<2.0.0" python-dateutil = ">=2.1,<3.0.0" -urllib3 = ">=1.25.4,<2.2.0 || >2.2.0,<3" +urllib3 = ">=1.25.4,!=2.2.0,<3" [package.extras] crt = ["awscrt (==0.36.0)"] @@ -1318,6 +1318,29 @@ files = [ {file = "poetry_core-2.5.0.tar.gz", hash = "sha256:81d04c9253b19d0604718268d781867c8f7b2128e5b25bbf1e84141eec6b89c4"}, ] +[[package]] +name = "postgresql-charms-single-kernel" +version = "16.3.26" +description = "Shared and reusable code for PostgreSQL-related charms" +optional = false +python-versions = ">=3.8,<4.0" +groups = ["main"] +files = [] +develop = false + +[package.dependencies] +tenacity = ">=9.0.0" + +[package.extras] +db-driver = ["psycopg2 (>=2.9.10)"] +k8s = ["cosl (>=0.0.53) ; python_version >= \"3.12\"", "lightkube (>=0.21.0) ; python_version >= \"3.12\"", "lightkube-models (>=1.28.1.4) ; python_version >= \"3.12\""] +postgresql = ["boto3 (>=1.43.85) ; python_version >= \"3.12\"", "botocore (>=1.43.85) ; python_version >= \"3.12\"", "charm-refresh ; python_version >= \"3.12\"", "charmlibs-interfaces-tls-certificates (>=1.8.3) ; python_version >= \"3.12\"", "charmlibs-pathops (>=1.0.1) ; python_version >= \"3.12\"", "cryptography (>=42.0.0) ; python_version >= \"3.12\"", "data-platform-helpers (>=0.1.7) ; python_version >= \"3.12\"", "httpx ; python_version >= \"3.12\"", "jinja2 (>=3.1.6) ; python_version >= \"3.12\"", "jsonschema (>=4.0.0) ; python_version >= \"3.12\"", "ops[tracing] (>=2.0.0) ; python_version >= \"3.12\"", "pydantic (>=2.0) ; python_version >= \"3.12\"", "requests ; python_version >= \"3.12\"", "tomli ; python_version >= \"3.12\""] +vm = ["charmlibs-snap (>=2.0.0,<3) ; python_version >= \"3.12\"", "charmlibs-systemd (>=1.0.0.post0) ; python_version >= \"3.12\"", "cosl (>=0.0.53) ; python_version >= \"3.12\"", "psutil (>=7.2.2) ; python_version >= \"3.12\"", "pysyncobj (>=0.3.15) ; python_version >= \"3.12\""] + +[package.source] +type = "directory" +url = "../../.." + [[package]] name = "psycopg2" version = "2.9.13" @@ -2043,4 +2066,4 @@ h11 = ">=0.16.0,<1" [metadata] lock-version = "2.1" python-versions = "^3.12" -content-hash = "1cb23987bbe306a8b0bf07059e4e517dc9f8af633a53ff7d7b7131cc9f9fa6b9" +content-hash = "5f3d07f6602499d35c0f062ed1eeab8b0e8bb3e336b14c9a8a1c7adec03a7649" diff --git a/tests/charms/postgresql_k8s_test_charm/pyproject.toml b/tests/charms/postgresql_k8s_test_charm/pyproject.toml index ff0273fe..4f1ece2a 100644 --- a/tests/charms/postgresql_k8s_test_charm/pyproject.toml +++ b/tests/charms/postgresql_k8s_test_charm/pyproject.toml @@ -22,6 +22,8 @@ charmlibs-interfaces-tls-certificates = "^1.12.0" charm-refresh = "^3.1.1.2" charmlibs-pathops = "^1.3.0" data-platform-helpers = "^1.1.1" +# The library from the root of this repository (packed with charmcraft monorepo support) +postgresql-charms-single-kernel = {path = "../../..", develop = false} [tool.poetry.group.charm-libs.dependencies] # data_platform_libs/v0/data_interfaces.py diff --git a/tests/charms/postgresql_k8s_test_charm/refresh_versions.toml b/tests/charms/postgresql_k8s_test_charm/refresh_versions.toml index 44364c7d..4427cab3 100644 --- a/tests/charms/postgresql_k8s_test_charm/refresh_versions.toml +++ b/tests/charms/postgresql_k8s_test_charm/refresh_versions.toml @@ -1,2 +1,3 @@ charm_major = 1 +charm = "test/0.0.0+dirty" workload = "16.15" diff --git a/tests/charms/postgresql_vm_test_charm/charmcraft.yaml b/tests/charms/postgresql_vm_test_charm/charmcraft.yaml index 6b0f7c5a..a06a8dda 100644 --- a/tests/charms/postgresql_vm_test_charm/charmcraft.yaml +++ b/tests/charms/postgresql_vm_test_charm/charmcraft.yaml @@ -48,7 +48,11 @@ parts: # (https://github.com/canonical/charmcraft/blob/9ff19c328e23b50cc06f04e8a5ad4835740badf4/charmcraft/parts/plugins/_poetry.py#L95 # https://github.com/canonical/craft-parts/blob/afb0d652eb330b6aaad4f40fbd6e5357d358de47/craft_parts/plugins/base.py#L270) plugin: poetry - source: . + # Repository root, so the library (path dependency in pyproject.toml) is available. + # Needs CHARMCRAFT_EXPERIMENTAL_MONOREPO=1 + # (https://canonical.com/juju/docs/charmcraft/latest/howto/pack-a-charm-in-a-monorepo/) + source: ../../.. + source-subdir: tests/charms/postgresql_vm_test_charm after: - poetry-deps poetry-export-extra-args: ['--only', 'main,charm-libs', "--without-hashes"] # For the library build locally diff --git a/tests/charms/postgresql_vm_test_charm/poetry.lock b/tests/charms/postgresql_vm_test_charm/poetry.lock index a2014ee7..b7a9683e 100644 --- a/tests/charms/postgresql_vm_test_charm/poetry.lock +++ b/tests/charms/postgresql_vm_test_charm/poetry.lock @@ -1315,6 +1315,29 @@ files = [ {file = "pgconnstr-1.0.1.zip", hash = "sha256:0656129961ae879675d0842f5237db82d31ce59c7b3211b051c33e37a864826e"}, ] +[[package]] +name = "postgresql-charms-single-kernel" +version = "16.3.26" +description = "Shared and reusable code for PostgreSQL-related charms" +optional = false +python-versions = ">=3.8,<4.0" +groups = ["main"] +files = [] +develop = false + +[package.dependencies] +tenacity = ">=9.0.0" + +[package.extras] +db-driver = ["psycopg2 (>=2.9.10)"] +k8s = ["cosl (>=0.0.53) ; python_version >= \"3.12\"", "lightkube (>=0.21.0) ; python_version >= \"3.12\"", "lightkube-models (>=1.28.1.4) ; python_version >= \"3.12\""] +postgresql = ["boto3 (>=1.43.85) ; python_version >= \"3.12\"", "botocore (>=1.43.85) ; python_version >= \"3.12\"", "charm-refresh ; python_version >= \"3.12\"", "charmlibs-interfaces-tls-certificates (>=1.8.3) ; python_version >= \"3.12\"", "charmlibs-pathops (>=1.0.1) ; python_version >= \"3.12\"", "cryptography (>=42.0.0) ; python_version >= \"3.12\"", "data-platform-helpers (>=0.1.7) ; python_version >= \"3.12\"", "httpx ; python_version >= \"3.12\"", "jinja2 (>=3.1.6) ; python_version >= \"3.12\"", "jsonschema (>=4.0.0) ; python_version >= \"3.12\"", "ops[tracing] (>=2.0.0) ; python_version >= \"3.12\"", "pydantic (>=2.0) ; python_version >= \"3.12\"", "requests ; python_version >= \"3.12\"", "tomli ; python_version >= \"3.12\""] +vm = ["charmlibs-snap (>=2.0.0,<3) ; python_version >= \"3.12\"", "charmlibs-systemd (>=1.0.0.post0) ; python_version >= \"3.12\"", "cosl (>=0.0.53) ; python_version >= \"3.12\"", "psutil (>=7.2.2) ; python_version >= \"3.12\"", "pysyncobj (>=0.3.15) ; python_version >= \"3.12\""] + +[package.source] +type = "directory" +url = "../../.." + [[package]] name = "psutil" version = "7.2.2" @@ -2086,4 +2109,4 @@ h11 = ">=0.16.0,<1" [metadata] lock-version = "2.1" python-versions = "^3.12" -content-hash = "87e467e5b8762b2283e3b07cde92334eafe05f630346f4765e760f6a74258a77" +content-hash = "c376e2c7980665aeb9d01aa4c0fb90f28065130e342dd8e6762f9a7754d6df5b" diff --git a/tests/charms/postgresql_vm_test_charm/pyproject.toml b/tests/charms/postgresql_vm_test_charm/pyproject.toml index e2279b65..7efd3e7b 100644 --- a/tests/charms/postgresql_vm_test_charm/pyproject.toml +++ b/tests/charms/postgresql_vm_test_charm/pyproject.toml @@ -23,6 +23,8 @@ charmlibs-systemd = "^1.0.0.post0" charmlibs-interfaces-tls-certificates = "^1.12.0" charmlibs-pathops = "^1.3.0" data-platform-helpers = "^1.1.1" +# The library from the root of this repository (packed with charmcraft monorepo support) +postgresql-charms-single-kernel = {path = "../../..", develop = false} [tool.poetry.group.charm-libs.dependencies] # data_platform_libs/v0/data_interfaces.py diff --git a/tests/charms/postgresql_vm_test_charm/refresh_versions.toml b/tests/charms/postgresql_vm_test_charm/refresh_versions.toml index ec37f357..5a316af9 100644 --- a/tests/charms/postgresql_vm_test_charm/refresh_versions.toml +++ b/tests/charms/postgresql_vm_test_charm/refresh_versions.toml @@ -1,4 +1,5 @@ charm_major = 1 +charm = "test/0.0.0+dirty" workload = "16.15" [snap] diff --git a/tests/integration/charm/conftest.py b/tests/integration/charm/conftest.py index be275b03..42538d06 100644 --- a/tests/integration/charm/conftest.py +++ b/tests/integration/charm/conftest.py @@ -36,13 +36,14 @@ def app_name(substrate: Substrates) -> str: @pytest.fixture(scope="session") def charm(substrate: Substrates, app_name: str, architecture: str) -> str: - """Path to the test charm built by scripts/build_charm.sh.""" + """Path to the packed test charm (charmcraft pack with monorepo support).""" charm_dir = TEST_CHARMS_PATH / f"postgresql_{substrate.value}_test_charm" path = charm_dir / f"{app_name}_ubuntu@24.04-{architecture}.charm" if not path.exists(): pytest.fail( f"{path} not found, build it with:" - f" scripts/build_charm.sh -c tests/charms/postgresql_{substrate.value}_test_charm" + f" cd tests/charms/postgresql_{substrate.value}_test_charm" + f" && CHARMCRAFT_EXPERIMENTAL_MONOREPO=1 charmcraft pack -p ubuntu@24.04:{architecture}" ) return str(path) diff --git a/tests/integration/charm/test_wrong_arch.py b/tests/integration/charm/test_wrong_arch.py index 66977b54..393c1663 100644 --- a/tests/integration/charm/test_wrong_arch.py +++ b/tests/integration/charm/test_wrong_arch.py @@ -19,8 +19,8 @@ def fetch_charm(substrate: Substrates, architecture: str) -> str: if not packed_charms: pytest.fail( f"No {architecture} charm found in {charm_dir}, build it with:" - f" scripts/build_charm.sh -p ubuntu@24.04:{architecture}" - f" -c tests/charms/postgresql_{substrate.value}_test_charm" + f" cd tests/charms/postgresql_{substrate.value}_test_charm" + f" && CHARMCRAFT_EXPERIMENTAL_MONOREPO=1 charmcraft pack -p ubuntu@24.04:{architecture}" ) return str(packed_charms[0].resolve(strict=True)) diff --git a/tox.ini b/tox.ini index 4dd0a225..1eec183a 100644 --- a/tox.ini +++ b/tox.ini @@ -55,7 +55,7 @@ commands = uv run --active coverage xml [testenv:integration] -description = Run integration tests (needs a Juju controller and the test charm built with scripts/build_charm.sh) +description = Run integration tests (needs a Juju controller and the test charm packed with CHARMCRAFT_EXPERIMENTAL_MONOREPO=1 charmcraft pack) pass_env = CI AWS_ACCESS_KEY