Skip to content

Commit

Permalink
Use bundle configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
dragomirp committed Jan 8, 2025
1 parent d5ad305 commit ecea4e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tests/integration/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ async def deploy_and_relate_bundle_with_postgresql(
]

# Remove PostgreSQL and relations with it from the bundle.yaml file.
config = data["applications"]["postgresql"]["options"]
logger.info(f"Bundle {bundle_name} needs configuration {config}")
del data["applications"]["postgresql"]
data["relations"] = [
relation
Expand All @@ -415,6 +417,12 @@ async def deploy_and_relate_bundle_with_postgresql(
await ops_test.juju("deploy", patched.name)

async with ops_test.fast_forward(fast_interval="30s"):
await ops_test.model.applications[DATABASE_APP_NAME].set_config(config)
await ops_test.model.wait_for_idle(
apps=[DATABASE_APP_NAME],
status="active",
timeout=timeout,
)
# Relate application to PostgreSQL.
relation = await ops_test.model.relate(
main_application_name, f"{DATABASE_APP_NAME}:{relation_name}"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_db_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def test_landscape_scalable_bundle_db(ops_test: OpsTest, charm: str) -> No
application_name=DATABASE_APP_NAME,
num_units=DATABASE_UNITS,
base=CHARM_BASE,
config={"profile": "testing", "plugin_plpython3u_enable": "True"},
config={"profile": "testing"},
)

# Deploy and test the Landscape Scalable bundle (using this PostgreSQL charm).
Expand Down

0 comments on commit ecea4e3

Please sign in to comment.