Skip to content

Commit 20d586f

Browse files
committed
Revert "Revert zero unit guard in scale_app_units"
This reverts commit 7d0ad49.
1 parent 7d0ad49 commit 20d586f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/integration/helpers_ha.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,11 @@ def scale_app_units(juju: Juju, app_name: str, num_units: int) -> None:
142142
timeout=20 * MINUTE_SECS,
143143
)
144144

145-
juju.wait(
146-
ready=wait_for_apps_status(jubilant_backports.all_active, app_name),
147-
timeout=20 * MINUTE_SECS,
148-
)
145+
if num_units > 0:
146+
juju.wait(
147+
ready=wait_for_apps_status(jubilant_backports.all_active, app_name),
148+
timeout=20 * MINUTE_SECS,
149+
)
149150

150151

151152
def get_unit_by_number(juju: Juju, app_name: str, unit_number: int) -> str:

0 commit comments

Comments
 (0)