generated from canonical/template-operator
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
6 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
PG, | ||
PGB, | ||
deploy_postgres_bundle, | ||
get_backend_user_pass, | ||
) | ||
from ..helpers.postgresql_helpers import ( | ||
check_database_users_existence, | ||
|
@@ -32,12 +33,13 @@ | |
@pytest.mark.group(1) | ||
async def test_landscape_scalable_bundle_db(ops_test: OpsTest, pgb_charm_jammy: str) -> None: | ||
"""Deploy Landscape Scalable Bundle to test the 'db-admin' relation.""" | ||
await deploy_postgres_bundle( | ||
backend_relation = await deploy_postgres_bundle( | ||
ops_test, | ||
pgb_charm_jammy, | ||
db_units=DATABASE_UNITS, | ||
pgb_series="jammy", | ||
pg_config={"profile": "testing", "plugin_plpython3u_enable": "True"}, | ||
pgb_config={"max_db_connections": "500"}, | ||
) | ||
|
||
# Deploy and test the Landscape Scalable bundle (using this PostgreSQL charm). | ||
|
@@ -49,6 +51,7 @@ async def test_landscape_scalable_bundle_db(ops_test: OpsTest, pgb_charm_jammy: | |
relation_name=RELATION_NAME, | ||
timeout=3000, | ||
) | ||
pgb_user, pgb_pass = await get_backend_user_pass(ops_test, backend_relation) | ||
await check_databases_creation( | ||
ops_test, | ||
[ | ||
|
@@ -59,12 +62,10 @@ async def test_landscape_scalable_bundle_db(ops_test: OpsTest, pgb_charm_jammy: | |
"landscape-standalone-resource-1", | ||
"landscape-standalone-session", | ||
], | ||
pgb_user, | ||
pgb_pass, | ||
) | ||
|
||
landscape_users = [f"relation-{relation_id}"] | ||
|
||
await check_database_users_existence(ops_test, landscape_users, []) | ||
|
||
# Create the admin user on Landscape through configs. | ||
await ops_test.model.applications["landscape-server"].set_config({ | ||
"admin_email": "[email protected]", | ||
|