-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DPE-4977] Run integration tests against Juju 3.6 (#689)
* Attempt to run integration tests on juju 3.6 * Change pgdata permissions to 0o700 + fix charm bases in tests * Remove import to fix lint warning * Set pg data permissions to 750 explicitly so it works well with pgbackrest * Use base [email protected] for finos-waltz-k8s * Deploy charms without jammy support with base [email protected] * Test against juju 3.6/edge due to secrets related fixes + deploy mattermost with [email protected] * Run tests against juju 3.6/stable * Run tests against 3.6/candidate and not 3.6/stable * Run juju 3.6 tests only on a nightly schedule * Address missed case of series->base after merge of main into branch * Address Dragomir's feedback on test failures due to nuances of python libjuju * Use series for the indico charm as the usage of bases shows incompatibility with focal
- Loading branch information
1 parent
44aca9e
commit 7bcadff
Showing
19 changed files
with
104 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ | |
wait_fixed, | ||
) | ||
|
||
CHARM_BASE = "[email protected]" | ||
CHARM_SERIES = "jammy" | ||
METADATA = yaml.safe_load(Path("./metadata.yaml").read_text()) | ||
DATABASE_APP_NAME = METADATA["name"] | ||
|
@@ -100,7 +101,7 @@ async def build_and_deploy( | |
application_name=database_app_name, | ||
trust=True, | ||
num_units=num_units, | ||
series=CHARM_SERIES, | ||
base=CHARM_BASE, | ||
config={"profile": "testing"}, | ||
), | ||
) | ||
|
@@ -277,6 +278,7 @@ async def deploy_and_relate_application_with_postgresql( | |
channel: str = "stable", | ||
relation: str = "db", | ||
status: str = "blocked", | ||
base: str = CHARM_BASE, | ||
) -> int: | ||
"""Helper function to deploy and relate application with PostgreSQL. | ||
|
@@ -289,6 +291,7 @@ async def deploy_and_relate_application_with_postgresql( | |
relation: Name of the PostgreSQL relation to relate | ||
the application to. | ||
status: The status to wait for in the application (default: blocked). | ||
base: The base of the charm to deploy | ||
Returns: | ||
the id of the created relation. | ||
|
@@ -299,6 +302,7 @@ async def deploy_and_relate_application_with_postgresql( | |
channel=channel, | ||
application_name=application_name, | ||
num_units=number_of_units, | ||
base=base, | ||
) | ||
await ops_test.model.wait_for_idle( | ||
apps=[application_name], | ||
|
@@ -837,8 +841,10 @@ async def backup_operations( | |
) -> None: | ||
"""Basic set of operations for backup testing in different cloud providers.""" | ||
# Deploy S3 Integrator and TLS Certificates Operator. | ||
await ops_test.model.deploy(s3_integrator_app_name) | ||
await ops_test.model.deploy(tls_certificates_app_name, config=tls_config, channel=tls_channel) | ||
await ops_test.model.deploy(s3_integrator_app_name, base=CHARM_BASE) | ||
await ops_test.model.deploy( | ||
tls_certificates_app_name, config=tls_config, channel=tls_channel, base=CHARM_BASE | ||
) | ||
# Deploy and relate PostgreSQL to S3 integrator (one database app for each cloud for now | ||
# as archivo_mode is disabled after restoring the backup) and to TLS Certificates Operator | ||
# (to be able to create backups from replicas). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
|
||
from .. import markers | ||
from ..helpers import ( | ||
CHARM_SERIES, | ||
CHARM_BASE, | ||
check_database_users_existence, | ||
scale_application, | ||
) | ||
|
@@ -56,7 +56,7 @@ async def test_database_relation_with_charm_libraries(ops_test: OpsTest, databas | |
APPLICATION_APP_NAME, | ||
application_name=APPLICATION_APP_NAME, | ||
num_units=2, | ||
series=CHARM_SERIES, | ||
base=CHARM_BASE, | ||
channel="edge", | ||
), | ||
ops_test.model.deploy( | ||
|
@@ -68,7 +68,7 @@ async def test_database_relation_with_charm_libraries(ops_test: OpsTest, databas | |
}, | ||
application_name=DATABASE_APP_NAME, | ||
num_units=3, | ||
series=CHARM_SERIES, | ||
base=CHARM_BASE, | ||
trust=True, | ||
config={"profile": "testing"}, | ||
), | ||
|
@@ -81,7 +81,7 @@ async def test_database_relation_with_charm_libraries(ops_test: OpsTest, databas | |
}, | ||
application_name=ANOTHER_DATABASE_APP_NAME, | ||
num_units=3, | ||
series=CHARM_SERIES, | ||
base=CHARM_BASE, | ||
trust=True, | ||
config={"profile": "testing"}, | ||
), | ||
|
@@ -196,7 +196,7 @@ async def test_two_applications_doesnt_share_the_same_relation_data(ops_test: Op | |
await ops_test.model.deploy( | ||
APPLICATION_APP_NAME, | ||
application_name=another_application_app_name, | ||
series=CHARM_SERIES, | ||
base=CHARM_BASE, | ||
channel="edge", | ||
) | ||
await ops_test.model.wait_for_idle(apps=all_app_names, status="active") | ||
|
@@ -453,7 +453,7 @@ async def test_admin_role(ops_test: OpsTest): | |
all_app_names = [DATA_INTEGRATOR_APP_NAME] | ||
all_app_names.extend(APP_NAMES) | ||
async with ops_test.fast_forward(): | ||
await ops_test.model.deploy(DATA_INTEGRATOR_APP_NAME) | ||
await ops_test.model.deploy(DATA_INTEGRATOR_APP_NAME, base=CHARM_BASE) | ||
await ops_test.model.wait_for_idle(apps=[DATA_INTEGRATOR_APP_NAME], status="blocked") | ||
await ops_test.model.applications[DATA_INTEGRATOR_APP_NAME].set_config({ | ||
"database-name": DATA_INTEGRATOR_APP_NAME.replace("-", "_"), | ||
|
@@ -542,7 +542,9 @@ async def test_invalid_extra_user_roles(ops_test: OpsTest): | |
another_data_integrator_app_name = f"another-{DATA_INTEGRATOR_APP_NAME}" | ||
data_integrator_apps_names = [DATA_INTEGRATOR_APP_NAME, another_data_integrator_app_name] | ||
await ops_test.model.deploy( | ||
DATA_INTEGRATOR_APP_NAME, application_name=another_data_integrator_app_name | ||
DATA_INTEGRATOR_APP_NAME, | ||
application_name=another_data_integrator_app_name, | ||
base=CHARM_BASE, | ||
) | ||
await ops_test.model.wait_for_idle( | ||
apps=[another_data_integrator_app_name], status="blocked" | ||
|
@@ -607,7 +609,7 @@ async def test_database_deploy_clientapps(ops_test: OpsTest, database_charm): | |
}, | ||
application_name=DATABASE_APP_NAME, | ||
num_units=3, | ||
series=CHARM_SERIES, | ||
base=CHARM_BASE, | ||
trust=True, | ||
config={"profile": "testing"}, | ||
), | ||
|
@@ -628,7 +630,7 @@ async def test_discourse(ops_test: OpsTest): | |
await gather( | ||
ops_test.model.deploy(DISCOURSE_APP_NAME, application_name=DISCOURSE_APP_NAME), | ||
ops_test.model.deploy( | ||
REDIS_APP_NAME, application_name=REDIS_APP_NAME, channel="latest/edge" | ||
REDIS_APP_NAME, application_name=REDIS_APP_NAME, channel="latest/edge", base=CHARM_BASE | ||
), | ||
) | ||
|
||
|
@@ -705,12 +707,17 @@ async def test_indico_datatabase(ops_test: OpsTest) -> None: | |
async with ops_test.fast_forward(fast_interval="30s"): | ||
await ops_test.model.deploy( | ||
"indico", | ||
channel="stable", | ||
channel="latest/edge", | ||
application_name="indico", | ||
num_units=1, | ||
series="focal", | ||
) | ||
await ops_test.model.deploy( | ||
"redis-k8s", channel="stable", application_name="redis-broker", base="[email protected]" | ||
) | ||
await ops_test.model.deploy( | ||
"redis-k8s", channel="stable", application_name="redis-cache", base="[email protected]" | ||
) | ||
await ops_test.model.deploy("redis-k8s", channel="stable", application_name="redis-broker") | ||
await ops_test.model.deploy("redis-k8s", channel="stable", application_name="redis-cache") | ||
await asyncio.gather( | ||
ops_test.model.relate("redis-broker", "indico:redis-broker"), | ||
ops_test.model.relate("redis-cache", "indico:redis-cache"), | ||
|
Oops, something went wrong.