canonical / juju-backup-all

Tool for backing up charms, local juju configs, and juju controllers.
Apache License 2.0
0 stars 5 forks source link

Parametrized the functional tests to deploy app test backup and destroy it #44

Open rgildein opened 5 months ago

rgildein commented 5 months ago

The functional test where deploying 3 models at once and testing one test per one model, however in #41 we switch to pytest-operator and deploy only single model with all applications. If we parametrized this to deploy model, run a test and destroy a model it would be better. e.g.

# test_mysql_backup.py

@pytest.mark.abort_on_fail
@pytest.mark.skip_if_deployed
async def test_build_and_deploy(ops_test):
    """Deploy all applications."""

    await ops_test.model.deploy(
        "ch:mysql-innodb-cluster", application_name="mysql", series="jammy", channel="8.0/stable", num_units=3
    )

def test_mysql_innodb_backup(ops_test, tmp_path: Path):
    ...

Like this we can maybe use runner from GitHub, what is preferred instead of self-hosted runner.