Skip to content

feat: add VM migration integration test#11

Draft
odesenfans wants to merge 1 commit intomainfrom
worktree-od+vm-migration-test
Draft

feat: add VM migration integration test#11
odesenfans wants to merge 1 commit intomainfrom
worktree-od+vm-migration-test

Conversation

@odesenfans
Copy link
Copy Markdown
Contributor

Summary

  • Adds test_instance_migration — an end-to-end test that creates a VM, verifies SSH on the initial CRN, unlinks that CRN, and asserts the scheduler migrates the instance to a different CRN with SSH restored
  • Adds crn_nodes session fixture to conftest.py for multi-CRN test support (gracefully skips when < 2 CRNs)
  • Requires CRN_COUNT=2 during CRN provisioning

The test defines the contract for scheduler-rs migration support, which is being developed in parallel.

Test plan

  • Run with CRN_COUNT=2 and scheduler-rs migration support enabled
  • Verify test is skipped gracefully with CRN_COUNT=1
  • Verify full test collection passes (pytest --collect-only)

Adds an end-to-end test that validates VM migration between CRNs:
create an instance, verify SSH on the initial CRN, unlink that CRN,
wait for the scheduler to reallocate to a different CRN, and verify
SSH on the new node.

The test is written ahead of the scheduler-rs migration implementation
to define the expected contract.

Changes:
- tests/test_migration.py: new migration test with helpers
- tests/conftest.py: add crn_nodes fixture for multi-CRN tests
- docs/superpowers/specs/: design spec
- docs/superpowers/plans/: implementation plan
@odesenfans odesenfans marked this pull request as draft April 20, 2026 15:11
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