generated from canonical/template-operator
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
c1acb20
commit 332cdb6
Showing
3 changed files
with
75 additions
and
2 deletions.
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,53 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright 2024 Canonical Ltd. | ||
# See LICENSE file for licensing details. | ||
|
||
import pytest | ||
from pytest_operator.plugin import OpsTest | ||
|
||
from . import markers | ||
from .helpers import get_charm | ||
|
||
MYSQL_APP_NAME = "mysql" | ||
|
||
|
||
@pytest.mark.group(1) | ||
@markers.amd64_only | ||
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", 1) | ||
|
||
await ops_test.model.deploy( | ||
charm, | ||
application_name=MYSQL_APP_NAME, | ||
num_units=1, | ||
config={"profile": "testing"}, | ||
base="[email protected]", | ||
) | ||
|
||
await ops_test.model.wait_for_idle( | ||
apps=[MYSQL_APP_NAME], | ||
status="error", | ||
raise_on_error=False, | ||
) | ||
|
||
|
||
@pytest.mark.group(1) | ||
@markers.arm64_only | ||
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", 0) | ||
|
||
await ops_test.model.deploy( | ||
charm, | ||
application_name=MYSQL_APP_NAME, | ||
num_units=1, | ||
config={"profile": "testing"}, | ||
base="[email protected]", | ||
) | ||
|
||
await ops_test.model.wait_for_idle( | ||
apps=[MYSQL_APP_NAME], | ||
status="error", | ||
raise_on_error=False, | ||
) |