Skip to content

Commit

Permalink
NO databag usage -- verified by tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juditnovak committed Oct 5, 2023
1 parent 5a24e93 commit e08f0fd
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/integration/relations/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,27 @@ async def test_password_rotation_root_user_implicit(ops_test: OpsTest):

@pytest.mark.group(1)
@pytest.mark.abort_on_fail
@pytest.mark.usefixtures("only_without_juju_secrets")
async def test_relation_creation_databag(ops_test: OpsTest):
"""Relate charms and wait for the expected changes in status."""
await ops_test.model.relate(
f"{APPLICATION_APP_NAME}:{ENDPOINT}", f"{DATABASE_APP_NAME}:{ENDPOINT}"
)

async with ops_test.fast_forward("60s"):
await ops_test.model.block_until(
lambda: is_relation_joined(ops_test, ENDPOINT, ENDPOINT) == True # noqa: E712
)

await ops_test.model.wait_for_idle(apps=APPS, status="active")

relation_data = await get_relation_data(ops_test, APPLICATION_APP_NAME, "database")
assert set(["password", "username"]) <= set(relation_data.keys[0])


@pytest.mark.group(1)
@pytest.mark.abort_on_fail
@pytest.mark.usefixtures("only_with_juju_secrets")
async def test_relation_creation(ops_test: OpsTest):
"""Relate charms and wait for the expected changes in status."""
await ops_test.model.relate(
Expand All @@ -239,6 +260,9 @@ async def test_relation_creation(ops_test: OpsTest):

await ops_test.model.wait_for_idle(apps=APPS, status="active")

relation_data = await get_relation_data(ops_test, APPLICATION_APP_NAME, "database")
assert not set(["password", "username"]) <= set(relation_data.keys[0])


@pytest.mark.group(1)
@pytest.mark.abort_on_fail
Expand Down

0 comments on commit e08f0fd

Please sign in to comment.