Skip to content

Commit

Permalink
Remove AMD64 marker from upgrade tests (III)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinclert-canonical committed Feb 3, 2025
1 parent e2dc222 commit 13a67ba
Showing 1 changed file with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import pytest
from pytest_operator.plugin import OpsTest

from .. import juju_, markers
from .. import juju_
from ..helpers import get_leader_unit, get_relation_data, get_unit_by_index
from .high_availability_helpers import (
ensure_all_units_continuous_writes_incrementing,
Expand All @@ -29,18 +29,17 @@


@pytest.mark.group(1)
# TODO: remove after next incompatible MySQL server version released in our snap
# (details: https://github.com/canonical/mysql-operator/pull/472#discussion_r1659300069)
@markers.amd64_only
@pytest.mark.abort_on_fail
async def test_build_and_deploy(ops_test: OpsTest) -> None:
"""Simple test to ensure that the mysql and application charms get deployed."""
snap_revisions = pathlib.Path("snap_revisions.json")
with snap_revisions.open("r") as file:
old_revisions: dict = json.load(file)

new_revisions = old_revisions.copy()
# TODO: support arm64
new_revisions["x86_64"] = "69"
new_revisions["x86_64"] = "106"
new_revisions["aarch64"] = "107"

with snap_revisions.open("w") as file:
json.dump(new_revisions, file)
charm = await charm_local_build(ops_test)
Expand Down Expand Up @@ -74,9 +73,6 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:


@pytest.mark.group(1)
# TODO: remove after next incompatible MySQL server version released in our snap
# (details: https://github.com/canonical/mysql-operator/pull/472#discussion_r1659300069)
@markers.amd64_only
@pytest.mark.abort_on_fail
async def test_pre_upgrade_check(ops_test: OpsTest) -> None:
"""Test that the pre-upgrade-check action runs successfully."""
Expand All @@ -89,9 +85,6 @@ async def test_pre_upgrade_check(ops_test: OpsTest) -> None:


@pytest.mark.group(1)
# TODO: remove after next incompatible MySQL server version released in our snap
# (details: https://github.com/canonical/mysql-operator/pull/472#discussion_r1659300069)
@markers.amd64_only
@pytest.mark.abort_on_fail
async def test_upgrade_to_failling(
ops_test: OpsTest,
Expand Down Expand Up @@ -136,19 +129,18 @@ async def test_upgrade_to_failling(


@pytest.mark.group(1)
# TODO: remove after next incompatible MySQL server version released in our snap
# (details: https://github.com/canonical/mysql-operator/pull/472#discussion_r1659300069)
@markers.amd64_only
@pytest.mark.abort_on_fail
async def test_rollback(ops_test, continuous_writes) -> None:
application = ops_test.model.applications[MYSQL_APP_NAME]

snap_revisions = pathlib.Path("snap_revisions.json")
with snap_revisions.open("r") as file:
old_revisions: dict = json.load(file)

new_revisions = old_revisions.copy()
# TODO: mark as amd64 only or support arm64
new_revisions["x86_64"] = "69"
new_revisions["x86_64"] = "106"
new_revisions["aarch64"] = "107"

with snap_revisions.open("w") as file:
json.dump(new_revisions, file)
charm = await charm_local_build(ops_test, refresh=True)
Expand Down

0 comments on commit 13a67ba

Please sign in to comment.