Skip to content

Adds more integration tests - #533

Open
claudiubelu wants to merge 4 commits into
cloudbase:mainfrom
claudiubelu:coveragability-increasability
Open

claudiubelu wants to merge 4 commits into
cloudbase:mainfrom
claudiubelu:coveragability-increasability

Conversation

@claudiubelu

Copy link
Copy Markdown
Member

Adds coverage for minion pool power cycling, exercising PowerOnMinionMachineTask / PowerOffMinionMachineTask and
_set_minion_machine_power_status. These were previously uncovered since existing pool tests never scale a pool beyond its minimum size.

Adds new tests configures pools with the "poweroff" retention strategy and a tiny idle time, then runs two separate transfers concurrently. The second execution allocates a new minion, scaling the pool beyond its minimum. Once both minions go idle, refresh_minion_pool powers the excess one off, then re-running both transfers concurrently reallocates and powers it back on
before reuse.

Adds coverage for minion pool machine deletion on refresh, mirroring the minion pool power cycle tests but with the default "delete" retention strategy: once the pool's excess machine (beyond its minimum) goes idle, refreshing the pool deletes it instead of powering it off.

Adds coverage for minion pool refresh cron startup recovery: _init_pools_refresh_cron_jobs runs once, when a minion manager service endpoint is constructed, to re-register periodic refresh jobs for any pools that were already ALLOCATED (e.g.: after a service restart).

Adds coverage for the auto-deploy deployer handoff. The integration test test_execution_auto_deploy did have auto_deploy=True, but it never actually waited the deployment to complete. When auto_deploy is True, deployer_manager is supposed to kick off the deployment automatically after the transfer completes.

Adds test_execution_auto_deploy_transfer_failure test, which injects a failure into the deployer's transfer execution and waits for the deployment to be moved to the ERROR state.

@claudiubelu
claudiubelu force-pushed the coveragability-increasability branch from cd3c67b to 2c9c27a Compare September 25, 2026 08:08
Exercises PowerOnMinionMachineTask / PowerOffMinionMachineTask and
_set_minion_machine_power_status. These were previously uncovered since
existing pool tests never scale a pool beyond its minimum size.

The new tests configures pools with the "poweroff" retention strategy
and a tiny idle time, then runs two separate transfers concurrently. The
second execution allocates a new minion, scaling the pool beyond its minimum.
Once both minions go idle, refresh_minion_pool powers the excess one off, then
re-running both transfers concurrently reallocates and powers it back on
before reuse.

_write_systemd will now also enable the systemd unit, so the given
service will actually start on reboot (e.g.: minion pool machine reused
after being powered off).
Mirrors MinionPoolPowerCycleTransferTest but with the default "delete"
retention strategy: once the pool's excess machine (beyond its minimum)
goes idle, refreshing the pool deletes it instead of powering it off.

As with the power-cycle tests, two separate transfers are executed
concurrently to force the pool to allocate a second machine.
_init_pools_refresh_cron_jobs runs once, when a minion manager service
endpoint is constructed, to re-register periodic refresh jobs for any
pools that were already ALLOCATED (e.g.: after a service restart).

Adds a test that asserts that cron jobs are registered as expected.
The integration test test_execution_auto_deploy did have auto_deploy=True,
but it never actually waited the deployment to complete. When auto_deploy
is True, deployer_manager is supposed to kick off the deployment
automatically after the transfer completes.

Adds test_execution_auto_deploy_transfer_failure test, which injects a failure
into the deployer's transfer execution and waits for the deployment to be moved to
the ERROR state.
@claudiubelu
claudiubelu force-pushed the coveragability-increasability branch from 2c9c27a to f8d57a4 Compare September 25, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant