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
1 parent
e03fc8c
commit a7836d9
Showing
3 changed files
with
94 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright 2024 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
|
||
import pytest | ||
from pytest_operator.plugin import OpsTest | ||
|
||
from .helpers import get_charm | ||
|
||
MYSQL_ROUTER_APP_NAME = "mysql-router" | ||
|
||
|
||
@pytest.mark.group(1) | ||
@pytest.mark.usefixtures("only_amd64") | ||
async def test_arm_charm_on_amd_host(ops_test: OpsTest) -> None: | ||
"""Tries deploying an arm64 charm on amd64 host.""" | ||
charm = await get_charm(".", "arm64", 2) | ||
|
||
await ops_test.model.deploy( | ||
charm, | ||
application_name=MYSQL_ROUTER_APP_NAME, | ||
num_units=1, | ||
config={"profile": "testing"}, | ||
base="[email protected]", | ||
) | ||
|
||
await ops_test.model.wait_for_idle( | ||
apps=[MYSQL_ROUTER_APP_NAME], | ||
status="error", | ||
raise_on_error=False, | ||
) | ||
|
||
|
||
@pytest.mark.group(1) | ||
@pytest.mark.usefixtures("only_arm64") | ||
async def test_amd_charm_on_arm_host(ops_test: OpsTest) -> None: | ||
"""Tries deploying an amd64 charm on arm64 host.""" | ||
charm = await get_charm(".", "amd64", 1) | ||
|
||
await ops_test.model.deploy( | ||
charm, | ||
application_name=MYSQL_ROUTER_APP_NAME, | ||
num_units=1, | ||
config={"profile": "testing"}, | ||
base="[email protected]", | ||
) | ||
|
||
await ops_test.model.wait_for_idle( | ||
apps=[MYSQL_ROUTER_APP_NAME], | ||
status="error", | ||
raise_on_error=False, | ||
) |