cluster-api-provider-vsphere icon indicating copy to clipboard operation
cluster-api-provider-vsphere copied to clipboard

Add unit tests for vim machine reconciliation

Open Ankitasw opened this issue 2 years ago • 11 comments

/area testing

Add tests for below scenarios in vimmachine.go:

  1. 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.
  1. 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.
  1. 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)
  1. 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.

Ankitasw avatar Mar 10 '22 15:03 Ankitasw

Subset of #1392

Ankitasw avatar Mar 10 '22 16:03 Ankitasw

/help /good-first-issue

srm09 avatar Mar 10 '22 17:03 srm09

@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.

k8s-ci-robot avatar Mar 10 '22 17:03 k8s-ci-robot

/assign

ditsuke avatar Mar 13 '22 11:03 ditsuke

/unassign

ditsuke avatar Mar 15 '22 17:03 ditsuke

I have closed the duplicate issue.

geetikabatra avatar Mar 26 '22 07:03 geetikabatra

/assign @DiptoChakrabarty

geetikabatra avatar Mar 26 '22 07:03 geetikabatra

@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.

k8s-ci-robot avatar Mar 26 '22 07:03 k8s-ci-robot

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

k8s-triage-robot avatar Jun 24 '22 08:06 k8s-triage-robot

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

k8s-triage-robot avatar Jul 24 '22 08:07 k8s-triage-robot

/remove-lifecycle rotten

ditsuke avatar Jul 25 '22 07:07 ditsuke

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

k8s-triage-robot avatar Oct 23 '22 08:10 k8s-triage-robot

No work is planned on this one. /close

srm09 avatar Nov 07 '22 19:11 srm09

@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.

k8s-ci-robot avatar Nov 07 '22 19:11 k8s-ci-robot