From bd2e6470c7a5935e3027f1245fe628066ae8926e Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Fri, 25 Apr 2025 15:09:58 +0300 Subject: [PATCH 1/3] Switch to Postgresql 16 --- tests/integration/test_kyuubi.py | 4 ++-- tests/integration/test_postgresql.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/integration/test_kyuubi.py b/tests/integration/test_kyuubi.py index bfebd79e..f8297e55 100644 --- a/tests/integration/test_kyuubi.py +++ b/tests/integration/test_kyuubi.py @@ -185,8 +185,8 @@ async def test_deploy_kyuubi_setup( # Deploy the postgresql charm and wait hub_deploy_args = { "application_name": POSTGRESQL_APP_NAME, - "channel": "14/stable", - "series": "jammy", + "channel": "16/stable", + "series": "noble", "trust": True, } logger.info("Deploying postgresql charm...") diff --git a/tests/integration/test_postgresql.py b/tests/integration/test_postgresql.py index 7139094f..e6bce3ad 100644 --- a/tests/integration/test_postgresql.py +++ b/tests/integration/test_postgresql.py @@ -49,10 +49,10 @@ async def test_deploy_and_relate_postgresql(ops_test: OpsTest, cloud_name: str): await asyncio.gather( ops_test.model.deploy( POSTGRESQL[cloud_name], - channel="14/edge", + channel="16/edge", application_name=POSTGRESQL[cloud_name], num_units=1, - series="jammy", + series="noble", trust=True, ) ) @@ -145,13 +145,14 @@ async def test_deploy_and_relate_pgbouncer(ops_test: OpsTest, cloud_name: str): """Test the relation with PgBouncer and database accessibility.""" logger.info(f"Test the relation with {PGBOUNCER[cloud_name]}.") num_units = 0 if cloud_name == "localhost" else 1 + series = "noble" if cloud_name == "localhost" else "jammy" await asyncio.gather( ops_test.model.deploy( PGBOUNCER[cloud_name], application_name=PGBOUNCER[cloud_name], channel="1/edge", num_units=num_units, - series="jammy", + series=series, trust=True, ), ) From 8fbb12fe2a6c60101eed866593aaf026a4b47547 Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Fri, 25 Apr 2025 15:17:22 +0300 Subject: [PATCH 2/3] Conditional channel --- tests/integration/test_postgresql.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/integration/test_postgresql.py b/tests/integration/test_postgresql.py index e6bce3ad..18ea48ef 100644 --- a/tests/integration/test_postgresql.py +++ b/tests/integration/test_postgresql.py @@ -17,6 +17,7 @@ fetch_action_database, fetch_action_get_credentials, ) +from .juju_ import has_secrets logger = logging.getLogger(__name__) @@ -46,13 +47,15 @@ async def test_deploy(ops_test: OpsTest, app_charm: PosixPath, data_integrator_c @pytest.mark.group(1) async def test_deploy_and_relate_postgresql(ops_test: OpsTest, cloud_name: str): """Test the relation with PostgreSQL and database accessibility.""" + channel = "16/edge" if has_secrets else "14/edge" + series = "noble" if has_secrets else "jammy" await asyncio.gather( ops_test.model.deploy( POSTGRESQL[cloud_name], - channel="16/edge", + channel=channel, application_name=POSTGRESQL[cloud_name], num_units=1, - series="noble", + series=series, trust=True, ) ) @@ -145,14 +148,13 @@ async def test_deploy_and_relate_pgbouncer(ops_test: OpsTest, cloud_name: str): """Test the relation with PgBouncer and database accessibility.""" logger.info(f"Test the relation with {PGBOUNCER[cloud_name]}.") num_units = 0 if cloud_name == "localhost" else 1 - series = "noble" if cloud_name == "localhost" else "jammy" await asyncio.gather( ops_test.model.deploy( PGBOUNCER[cloud_name], application_name=PGBOUNCER[cloud_name], channel="1/edge", num_units=num_units, - series=series, + series="jammy", trust=True, ), ) From 64142d989488929c5448874850ef053604b89dcf Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Mon, 28 Apr 2025 18:16:18 +0300 Subject: [PATCH 3/3] Use edge and testing profile --- tests/integration/test_kyuubi.py | 3 ++- tests/integration/test_postgresql.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_kyuubi.py b/tests/integration/test_kyuubi.py index f8297e55..e713b8db 100644 --- a/tests/integration/test_kyuubi.py +++ b/tests/integration/test_kyuubi.py @@ -185,8 +185,9 @@ async def test_deploy_kyuubi_setup( # Deploy the postgresql charm and wait hub_deploy_args = { "application_name": POSTGRESQL_APP_NAME, - "channel": "16/stable", + "channel": "16/edge", "series": "noble", + "config": {"profile": "testing"}, "trust": True, } logger.info("Deploying postgresql charm...") diff --git a/tests/integration/test_postgresql.py b/tests/integration/test_postgresql.py index 18ea48ef..d3871a39 100644 --- a/tests/integration/test_postgresql.py +++ b/tests/integration/test_postgresql.py @@ -56,6 +56,7 @@ async def test_deploy_and_relate_postgresql(ops_test: OpsTest, cloud_name: str): application_name=POSTGRESQL[cloud_name], num_units=1, series=series, + config={"profile": "testing"}, trust=True, ) )