infra: Add test for rhel vm with d1 instance type#4609
infra: Add test for rhel vm with d1 instance type#4609RoniKishner wants to merge 1 commit intoRedHatQE:mainfrom
Conversation
Signed-off-by: rkishner <rkishner@redhat.com>
📝 WalkthroughWalkthroughUpdates VM preference handling in the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
|
/verified |
Test execution plan request detailsCRITICAL: You MUST post an inline review comment on the first changed line of the first file. As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan. Analysis Requirements:
Your deliverable: Test Execution Plan
Guidelines:
Hardware-Related Checks (SR-IOV, GPU, DPDK): When PR modifies fixtures for hardware-specific resources:
CRITICAL WORKFLOW COMPLETION RULES: When responding to this test execution plan request, you MUST follow these rules EXACTLY:
ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):
Remember: The pull request review is visible to users. Additional comments are redundant noise. CRITICAL: Before setting "Run smoke tests: True", you MUST use shell scripts to: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 115 🏁 Script executed: Length of output: 2848 🏁 Script executed: Length of output: 41 🏁 Script executed: Length of output: 1735 🧠 Learnings used |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/infrastructure/instance_types/conftest.py`:
- Around line 176-190: The rhel_vm_for_dedicated_cpu fixture is hardcoding the
VM name and instance type which diverges from the pattern used by
windows_vm_for_dedicated_cpu; change rhel_vm_for_dedicated_cpu to accept the
pytest request fixture and read vm_name and instance_type_name from
request.param (or support default values) and pass those into
VirtualMachineForTests (replace the literal "rhel-d1-vm" with vm_name and
VirtualMachineClusterInstancetype(... name="d1.large") with instance_type_name)
so the fixture can be parametrized the same way as windows_vm_for_dedicated_cpu.
In `@tests/infrastructure/instance_types/test_common_vm_instancetype.py`:
- Around line 101-106: The test test_d1_on_rhel_vm unnecessarily inherits
class-level Windows fixtures (windows_validating_admission_policy,
windows_validating_admission_policy_binding) from
TestDedicatedInstancetypeProfile; move test_d1_on_rhel_vm out of the
TestDedicatedInstancetypeProfile class into a module-level test or a small
sibling class so it no longer picks up those Windows-only fixtures, ensuring it
simply calls running_vm(vm=rhel_vm_for_dedicated_cpu) without the cluster-scoped
ValidatingAdmissionPolicy setup/teardown.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: b248f401-14b4-4b19-b52d-dd923f5a8b77
📒 Files selected for processing (2)
tests/infrastructure/instance_types/conftest.pytests/infrastructure/instance_types/test_common_vm_instancetype.py
| vm_instance_type=VirtualMachineClusterInstancetype(client=unprivileged_client, name="d1.large"), | ||
| vm_preference_infer=True, | ||
| data_volume_template=data_volume_template_with_source_ref_dict( | ||
| data_source=rhel10_data_source_scope_session, |
There was a problem hiding this comment.
maybe use data_source=latest_rhel_data_source
Short description:
Add test for rhel vm with d1 instance type
More details:
What this PR does / why we need it:
Add test converge
jira-ticket:
https://redhat.atlassian.net/browse/CNV-79339
Summary by CodeRabbit