Skip to content

Add test cases of cpu mem hotplug#2663

Merged
asc5543 merged 1 commit into
harvester:mainfrom
asc5543:dev-1695
May 26, 2026
Merged

Add test cases of cpu mem hotplug#2663
asc5543 merged 1 commit into
harvester:mainfrom
asc5543:dev-1695

Conversation

@asc5543
Copy link
Copy Markdown
Contributor

@asc5543 asc5543 commented May 20, 2026

Which issue(s) this PR fixes:

Issue #1695

What this PR does / why we need it:

Add test cases of cpu mem hotplug to test

  • Enable and disable, then create the VM
  • Modify max_cpu, max_mem
  • Invalid value of max_cpu, max_mem(smaller then cpu/mem)

Special notes for your reviewer:

Additional documentation or context

Test Pass in v1.7.2-rc1
image

Copilot AI review requested due to automatic review settings May 20, 2026 07:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds additional Harvester E2E coverage for CPU/Memory hotplug behavior during VM creation, including toggling hotplug on/off in the spec, setting custom maximums, and validating server-side rejection for invalid maximum CPU/memory values.

Changes:

  • Add a test that enables CPU/mem hotplug and then disables it before creating the VM, verifying the resulting VM spec reflects “disabled”.
  • Add a test that creates a VM with CPU/mem hotplug enabled using custom max CPU/mem limits.
  • Add negative test coverage for invalid max_cpu / max_mem values and assert the API rejects the VM creation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread harvester_e2e_tests/integrations/test_3_vm_functions.py
Comment thread harvester_e2e_tests/integrations/test_3_vm_functions.py Outdated
@asc5543 asc5543 requested a review from a team May 20, 2026 08:00
Copy link
Copy Markdown
Contributor

@albinsun albinsun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: asc5543 <asc5543@gmail.com>
@asc5543 asc5543 merged commit 029d853 into harvester:main May 26, 2026
6 checks passed
@asc5543 asc5543 deleted the dev-1695 branch May 26, 2026 01:37
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.

3 participants