cluster-api-provider-vsphere
cluster-api-provider-vsphere copied to clipboard
Add unit tests for vim machine reconciliation
/area testing
Add tests for below scenarios in vimmachine.go:
- Successfully reconcile vim machine with following checks:
- Check if VSphereMachine status is Ready.
- Check if VsphereMachine status contains network details like mac address, ip addresses, whether connection established or not etc.
- Check if VSphereMachine spec contains provider ID
- Check if VMProvisionedCondition is set.
- Should ignore reconciliation in below cases:
- if the ownerReferences is set in VsphereVM spec.
- if cluster and machine labels are set in VsphereVM spec.
- if bootstrap ref is set in VsphereVM spec.
- if vsphere machine's VM clone spec is set in VsphereVM spec.
- if failure domains(if present) are set in VsphereVM spec.
- Reconcile failure scenarios:
- Failure in reconciling network, check if status and conditions corresponds to failed state.
- Failure in reconciling provider ID (Can be thought of more error scenarios if time persists)
- Successfully reconcile vim machine deletion:
- Check if VMProvisionedCondition is set to false.
- Check if vim machine is actually deleted by fetching the vim machine object.
Subset of #1392
/help /good-first-issue
@srm09: This request has been marked as suitable for new contributors.
Guidelines
Please ensure that the issue body includes answers to the following questions:
- Why are we solving this issue?
- To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
- Does this issue have zero to low barrier of entry?
- How can the assignee reach out to you for help?
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue
command.
In response to this:
/help /good-first-issue
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/assign
/unassign
I have closed the duplicate issue.
/assign @DiptoChakrabarty
@geetikabatra: GitHub didn't allow me to assign the following users: DiptoChakrabarty.
Note that only kubernetes-sigs members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see the contributor guide
In response to this:
/assign @DiptoChakrabarty
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
/remove-lifecycle rotten
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
No work is planned on this one. /close
@srm09: Closing this issue.
In response to this:
No work is planned on this one. /close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.