Skip to content

Commit

Permalink
try new fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgameiroborges committed Nov 21, 2024
1 parent 644ea77 commit 1de4ef4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1720,9 +1720,7 @@ def update_config(self, is_creating_backup: bool = False) -> bool:
logger.debug(
"Early exit update_config: patroni not responding but TLS is enabled."
)
self.unit_peer_data.update({"tls": "enabled"})
self.postgresql_client_relation.update_endpoints()
# self._handle_postgresql_restart_need(True)
self._handle_postgresql_restart_need(True)
return True
logger.debug("Early exit update_config: Patroni not started yet")
return False
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/ha_tests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@


@pytest.mark.group(1)
@pytest.mark.unstable
@pytest.mark.abort_on_fail
async def test_deploy_latest(ops_test: OpsTest) -> None:
"""Simple test to ensure that the PostgreSQL and application charms get deployed."""
Expand All @@ -53,6 +54,7 @@ async def test_deploy_latest(ops_test: OpsTest) -> None:


@pytest.mark.group(1)
@pytest.mark.unstable
@pytest.mark.abort_on_fail
async def test_pre_upgrade_check(ops_test: OpsTest) -> None:
"""Test that the pre-upgrade-check action runs successfully."""
Expand All @@ -66,6 +68,7 @@ async def test_pre_upgrade_check(ops_test: OpsTest) -> None:


@pytest.mark.group(1)
@pytest.mark.unstable
@pytest.mark.abort_on_fail
async def test_upgrade_from_edge(ops_test: OpsTest, continuous_writes) -> None:
# Start an application that continuously writes data to the database.
Expand Down Expand Up @@ -116,6 +119,7 @@ async def test_upgrade_from_edge(ops_test: OpsTest, continuous_writes) -> None:


@pytest.mark.group(1)
@pytest.mark.unstable
@pytest.mark.abort_on_fail
async def test_fail_and_rollback(ops_test, continuous_writes) -> None:
# Start an application that continuously writes data to the database.
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/ha_tests/test_upgrade_from_stable.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@


@pytest.mark.group(1)
@pytest.mark.unstable
@pytest.mark.abort_on_fail
async def test_deploy_stable(ops_test: OpsTest) -> None:
"""Simple test to ensure that the PostgreSQL and application charms get deployed."""
Expand Down Expand Up @@ -77,6 +78,7 @@ async def test_deploy_stable(ops_test: OpsTest) -> None:


@pytest.mark.group(1)
@pytest.mark.unstable
@pytest.mark.abort_on_fail
async def test_pre_upgrade_check(ops_test: OpsTest) -> None:
"""Test that the pre-upgrade-check action runs successfully."""
Expand All @@ -95,6 +97,7 @@ async def test_pre_upgrade_check(ops_test: OpsTest) -> None:


@pytest.mark.group(1)
@pytest.mark.unstable
@pytest.mark.abort_on_fail
async def test_upgrade_from_stable(ops_test: OpsTest):
"""Test updating from stable channel."""
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_subordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def test_deploy(ops_test: OpsTest, charm: str, github_secrets):
ops_test.model.deploy(
UBUNTU_PRO_APP_NAME,
config={"token": github_secrets["UBUNTU_PRO_TOKEN"]},
channel="latest/edge",
channel="noble/edge",
num_units=0,
),
ops_test.model.deploy(
Expand Down

0 comments on commit 1de4ef4

Please sign in to comment.