Skip to content

Commit

Permalink
tests(all): disable mysql-router in integration tests
Browse files Browse the repository at this point in the history
`mysql-router` does not yet support noble as a base so disable it
in the integration tests and directly relate to the `mysql` operator.
Created a generic TODO comment so it can be found in TODO tools
such as PyCharm's editor.

Signed-off-by: Jason C. Nucciarone <[email protected]>
  • Loading branch information
NucciTheBoss committed Dec 6, 2024
1 parent 7c06d0c commit 40cee4d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cryptography~=43.0.1
distro==1.9.0
python-dotenv~=1.0.1
pycryptodome==3.20.0
slurmutils~=0.8.0
slurmutils~=0.9.0
dbus-fast>=1.90.2
pyfakefs==5.7.1

Expand Down
21 changes: 12 additions & 9 deletions tests/integration/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,16 @@ async def test_build_and_deploy_against_edge(
num_units=1,
base=charm_base,
),
ops_test.model.deploy(
ROUTER,
application_name=f"{SLURMDBD}-{ROUTER}",
channel="dpe/edge",
num_units=0,
base=charm_base,
),
# TODO:
# Re-enable `mysql-router` in the integration tests once `dpe/edge`
# channel supports the `[email protected]` base.
# ops_test.model.deploy(
# ROUTER,
# application_name=f"{SLURMDBD}-{ROUTER}",
# channel="dpe/edge",
# num_units=0,
# base=charm_base,
# ),
ops_test.model.deploy(
DATABASE,
application_name=DATABASE,
Expand All @@ -98,8 +101,8 @@ async def test_build_and_deploy_against_edge(
await ops_test.model.integrate(f"{SLURMCTLD}:{SLURMD}", f"{SLURMD}:{SLURMCTLD}")
await ops_test.model.integrate(f"{SLURMCTLD}:{SLURMDBD}", f"{SLURMDBD}:{SLURMCTLD}")
await ops_test.model.integrate(f"{SLURMCTLD}:{SLURMRESTD}", f"{SLURMRESTD}:{SLURMCTLD}")
await ops_test.model.integrate(f"{SLURMDBD}-{ROUTER}:backend-database", f"{DATABASE}:database")
await ops_test.model.integrate(f"{SLURMDBD}:database", f"{SLURMDBD}-{ROUTER}:database")
# await ops_test.model.integrate(f"{SLURMDBD}-{ROUTER}:backend-database", f"{DATABASE}:database")
await ops_test.model.integrate(f"{SLURMDBD}:database", f"{DATABASE}:database")
# Reduce the update status frequency to accelerate the triggering of deferred events.
async with ops_test.fast_forward():
await ops_test.model.wait_for_idle(apps=SLURM_APPS, status="active", timeout=1000)
Expand Down

0 comments on commit 40cee4d

Please sign in to comment.