From 7e51f4bef5766b4e73c60156a9379c70ecb7e796 Mon Sep 17 00:00:00 2001 From: Mia Altieri Date: Fri, 3 May 2024 10:53:48 +0000 Subject: [PATCH] skip backup tests --- tests/integration/backup_tests/test_backups.py | 10 +++++++++- .../integration/relation_tests/test_charm_relations.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/integration/backup_tests/test_backups.py b/tests/integration/backup_tests/test_backups.py index d1d96db0..93dea9ef 100644 --- a/tests/integration/backup_tests/test_backups.py +++ b/tests/integration/backup_tests/test_backups.py @@ -29,7 +29,6 @@ logger = logging.getLogger(__name__) -# TODO this should be refactored to remove duplication @pytest_asyncio.fixture async def continuous_writes_to_db(ops_test: OpsTest): """Continuously writes to DB for the duration of the test.""" @@ -72,6 +71,7 @@ async def add_writes_to_db(ops_test: OpsTest): await clear_writes_action.wait() +@pytest.mark.skip("Skipping tests until fixing backup tests are addressed (DPE-4264).") @pytest.mark.group(1) @pytest.mark.abort_on_fail async def test_build_and_deploy(ops_test: OpsTest) -> None: @@ -108,6 +108,7 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None: await ops_test.model.wait_for_idle() +@pytest.mark.skip("Skipping tests until fixing backup tests are addressed (DPE-4264).") @pytest.mark.group(1) @pytest.mark.abort_on_fail async def test_blocked_incorrect_creds(ops_test: OpsTest) -> None: @@ -138,6 +139,7 @@ async def test_blocked_incorrect_creds(ops_test: OpsTest) -> None: assert db_unit.workload_status_message == "s3 credentials are incorrect." +@pytest.mark.skip("Skipping tests until fixing backup tests are addressed (DPE-4264).") @pytest.mark.group(1) @pytest.mark.abort_on_fail async def test_blocked_incorrect_conf(ops_test: OpsTest) -> None: @@ -156,6 +158,7 @@ async def test_blocked_incorrect_conf(ops_test: OpsTest) -> None: assert db_unit.workload_status_message == "s3 configurations are incompatible." +@pytest.mark.skip("Skipping tests until fixing backup tests are addressed (DPE-4264).") @pytest.mark.group(1) @pytest.mark.abort_on_fail async def test_ready_correct_conf(ops_test: OpsTest) -> None: @@ -180,6 +183,7 @@ async def test_ready_correct_conf(ops_test: OpsTest) -> None: ) +@pytest.mark.skip("Skipping tests until fixing backup tests are addressed (DPE-4264).") @pytest.mark.group(1) @pytest.mark.abort_on_fail async def test_create_and_list_backups(ops_test: OpsTest) -> None: @@ -208,6 +212,7 @@ async def test_create_and_list_backups(ops_test: OpsTest) -> None: assert backups == 1, "Backup not created." +@pytest.mark.skip("Skipping tests until fixing backup tests are addressed (DPE-4264).") @pytest.mark.group(1) @pytest.mark.abort_on_fail async def test_multi_backup(ops_test: OpsTest, continuous_writes_to_db) -> None: @@ -295,6 +300,7 @@ async def test_multi_backup(ops_test: OpsTest, continuous_writes_to_db) -> None: assert backups == 2, "Backup not created in bucket on AWS." +@pytest.mark.skip("Skipping tests until fixing backup tests are addressed (DPE-4264).") @pytest.mark.group(1) @pytest.mark.abort_on_fail async def test_restore(ops_test: OpsTest, continuous_writes_to_db) -> None: @@ -356,6 +362,7 @@ async def test_restore(ops_test: OpsTest, continuous_writes_to_db) -> None: # TODO remove unstable mark once juju issue with secrets is resolved +@pytest.mark.skip("Skipping tests until fixing backup tests are addressed (DPE-4264).") @pytest.mark.group(1) @pytest.mark.unstable @pytest.mark.parametrize("cloud_provider", ["AWS", "GCP"]) @@ -466,6 +473,7 @@ async def test_restore_new_cluster(ops_test: OpsTest, continuous_writes_to_db, c # await helpers.destroy_cluster(ops_test, cluster_name=NEW_CLUSTER) +@pytest.mark.skip("Skipping tests until fixing backup tests are addressed (DPE-4264).") @pytest.mark.group(1) @pytest.mark.abort_on_fail async def test_update_backup_password(ops_test: OpsTest) -> None: diff --git a/tests/integration/relation_tests/test_charm_relations.py b/tests/integration/relation_tests/test_charm_relations.py index 2c674960..3338db1d 100644 --- a/tests/integration/relation_tests/test_charm_relations.py +++ b/tests/integration/relation_tests/test_charm_relations.py @@ -311,7 +311,7 @@ async def test_user_with_extra_roles(ops_test: OpsTest): ) addresses = [await get_address_of_unit(ops_test, unit_id) for unit_id in range(REQUIRED_UNITS)] hosts = ",".join(addresses) - mongo_uri = f"mongodb://newTestUser:Test123@{hosts}" + mongo_uri = f"mongodb://newTestUser:Test123@{hosts}/new_database" cmd = 'db = db.getSiblingDB("new_database"); db.test_collection.insertOne({"test": "one"});' result = await run_mongo_op( ops_test, cmd, f'"{mongo_uri}"', stringify=False, expect_json_load=False