Skip to content

Commit

Permalink
test(mongos): Re-enable Mongos charm tests (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gu1nness authored Aug 28, 2024
1 parent e029133 commit 5b05ceb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/integration/sharding_tests/test_mongos.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from pytest_operator.plugin import OpsTest

from ..ha_tests.helpers import get_direct_mongo_client
from ..helpers import METADATA
from .helpers import count_users, get_related_username_password

SHARD_ONE_APP_NAME = "shard-one"
Expand All @@ -20,19 +21,24 @@


@pytest.mark.group(1)
@pytest.mark.skip("Will be enabled after DPE-5040 is done")
@pytest.mark.abort_on_fail
async def test_build_and_deploy(ops_test: OpsTest) -> None:
"""Build and deploy a sharded cluster."""
mongodb_charm = await ops_test.build_charm(".")
resources = {"mongodb-image": METADATA["resources"]["mongodb-image"]["upstream-source"]}
await ops_test.model.deploy(
mongodb_charm,
resources=resources,
num_units=1,
config={"role": "config-server"},
application_name=CONFIG_SERVER_APP_NAME,
)
await ops_test.model.deploy(
mongodb_charm, num_units=1, config={"role": "shard"}, application_name=SHARD_ONE_APP_NAME
mongodb_charm,
resources=resources,
num_units=1,
config={"role": "shard"},
application_name=SHARD_ONE_APP_NAME,
)

await ops_test.model.deploy(
Expand All @@ -50,7 +56,6 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:


@pytest.mark.group(1)
@pytest.mark.skip("Will be enabled after DPE-5040 is done")
@pytest.mark.abort_on_fail
async def test_connect_to_cluster_creates_user(ops_test: OpsTest) -> None:
"""Verifies that when the cluster is formed a new user is created."""
Expand Down Expand Up @@ -105,7 +110,6 @@ async def test_connect_to_cluster_creates_user(ops_test: OpsTest) -> None:


@pytest.mark.group(1)
@pytest.mark.skip("Will be enabled after DPE-5040 is done")
@pytest.mark.abort_on_fail
async def test_disconnect_from_cluster_removes_user(ops_test: OpsTest) -> None:
"""Verifies that when the cluster is formed a the user is removed."""
Expand Down

0 comments on commit 5b05ceb

Please sign in to comment.