Skip to content

Commit

Permalink
use build_and_deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgameiroborges committed Sep 5, 2024
1 parent 9f61540 commit d34b5c5
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions tests/integration/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from .helpers import (
DATABASE_APP_NAME,
METADATA,
build_and_deploy,
db_connect,
get_leader_unit,
get_password,
Expand All @@ -25,18 +25,11 @@

@pytest.mark.group(1)
@pytest.mark.abort_on_fail
async def test_filling_and_emptying_pgdata_storage(ops_test: OpsTest, database_charm):
async def test_filling_and_emptying_pgdata_storage(ops_test: OpsTest):
"""Build and deploy the charm and saturate its pgdata volume."""
# Build and deploy the PostgreSQL charm.
await ops_test.model.deploy(
database_charm,
resources={
"postgresql-image": METADATA["resources"]["postgresql-image"]["upstream-source"]
},
application_name=DATABASE_APP_NAME,
num_units=1,
trust=True,
)
async with ops_test.fast_forward():
await build_and_deploy(ops_test, 1)

# Saturate storage with some data
primary = await get_primary(ops_test)
Expand Down

0 comments on commit d34b5c5

Please sign in to comment.