Skip to content

Commit

Permalink
sharding backup tests use github secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaAltieri committed Feb 19, 2024
1 parent f759a5f commit e3c8390
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/integration/sharding_tests/test_sharding_backups.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
TIMEOUT = 10 * 60


@pytest.mark.group(1)
@pytest.mark.abort_on_fail
async def test_build_and_deploy(ops_test: OpsTest) -> None:
"""Build and deploy a sharded cluster."""
Expand Down Expand Up @@ -51,9 +52,10 @@ async def test_build_and_deploy(ops_test: OpsTest) -> None:
)


async def test_set_credentials_in_cluster(ops_test: OpsTest) -> None:
@pytest.mark.group(1)
async def test_set_credentials_in_cluster(ops_test: OpsTest, github_secrets) -> None:
"""Tests that sharded cluster can be configured for s3 configurations."""
await backup_helpers.set_credentials(ops_test, cloud="AWS")
await backup_helpers.set_credentials(ops_test, github_secrets, cloud="AWS")
choices = string.ascii_letters + string.digits
unique_path = "".join([secrets.choice(choices) for _ in range(4)])
configuration_parameters = {
Expand Down Expand Up @@ -94,12 +96,13 @@ async def test_set_credentials_in_cluster(ops_test: OpsTest) -> None:
)


async def test_create_and_list_backups_in_cluster(ops_test: OpsTest) -> None:
@pytest.mark.group(1)
async def test_create_and_list_backups_in_cluster(ops_test: OpsTest, github_secrets) -> None:
"""Tests that sharded cluster can successfully create and list backups."""
leader_unit = await backup_helpers.get_leader_unit(
ops_test, db_app_name=CONFIG_SERVER_APP_NAME
)
await backup_helpers.set_credentials(ops_test, cloud="AWS")
await backup_helpers.set_credentials(ops_test, github_secrets, cloud="AWS")
# verify backup list works
action = await leader_unit.run_action(action_name="list-backups")
list_result = await action.wait()
Expand Down

0 comments on commit e3c8390

Please sign in to comment.