Skip to content

Commit 8dc3143

Browse files
committed
Try not cleaning
1 parent 062397a commit 8dc3143

File tree

5 files changed

+4
-20
lines changed

5 files changed

+4
-20
lines changed

tests/integration/ha_tests/conftest.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22
# Copyright 2022 Canonical Ltd.
33
# See LICENSE file for licensing details.
44
from asyncio import gather
5-
from os import environ
65

76
import pytest as pytest
87
from pytest_operator.plugin import OpsTest
9-
from tenacity import Retrying, stop_after_delay, wait_fixed
108

119
from ..helpers import get_password, run_command_on_unit
1210
from .helpers import (
13-
APPLICATION_NAME,
1411
ORIGINAL_RESTART_CONDITION,
1512
RESTART_CONDITION,
1613
app_name,
@@ -26,19 +23,6 @@
2623
async def continuous_writes(ops_test: OpsTest) -> None:
2724
"""Deploy the charm that makes continuous writes to PostgreSQL."""
2825
yield
29-
if environ["test_result"] != "passed":
30-
# Clear the written data at the end.
31-
for attempt in Retrying(stop=stop_after_delay(60 * 5), wait=wait_fixed(3), reraise=True):
32-
with attempt:
33-
action = (
34-
await ops_test.model.applications[APPLICATION_NAME]
35-
.units[0]
36-
.run_action("clear-continuous-writes")
37-
)
38-
await action.wait()
39-
assert action.results["result"] == "True", (
40-
"Unable to clear up continuous_writes table"
41-
)
4226

4327

4428
@pytest.fixture()

tests/integration/ha_tests/test_scaling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
CHARM_BASE,
1313
DATABASE_APP_NAME,
1414
)
15-
from .conftest import APPLICATION_NAME
1615
from .helpers import (
16+
APPLICATION_NAME,
1717
app_name,
1818
are_writes_increasing,
1919
check_writes,

tests/integration/ha_tests/test_scaling_three_units.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
from .. import markers
1212
from ..helpers import (
13+
APPLICATION_NAME,
1314
CHARM_BASE,
1415
DATABASE_APP_NAME,
1516
get_machine_from_unit,
1617
stop_machine,
1718
)
18-
from .conftest import APPLICATION_NAME
1919
from .helpers import (
2020
app_name,
2121
are_writes_increasing,

tests/integration/ha_tests/test_scaling_three_units_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
from .. import markers
1212
from ..helpers import (
13+
APPLICATION_NAME,
1314
CHARM_BASE,
1415
DATABASE_APP_NAME,
1516
get_machine_from_unit,
1617
stop_machine,
1718
)
18-
from .conftest import APPLICATION_NAME
1919
from .helpers import (
2020
app_name,
2121
are_writes_increasing,

tests/integration/ha_tests/test_self_healing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
from .. import markers
1313
from ..helpers import (
14+
APPLICATION_NAME,
1415
CHARM_BASE,
1516
DATABASE_APP_NAME,
1617
db_connect,
@@ -19,7 +20,6 @@
1920
get_unit_address,
2021
run_command_on_unit,
2122
)
22-
from .conftest import APPLICATION_NAME
2323
from .helpers import (
2424
METADATA,
2525
ORIGINAL_RESTART_CONDITION,

0 commit comments

Comments
 (0)