kubernetes-sigs / cluster-api-provider-kubevirt

Cluster API Provider for KubeVirt
Apache License 2.0
108 stars 61 forks source link

Add the ginkgolinter and fix findings #225

Closed nunnatsa closed 1 year ago

nunnatsa commented 1 year ago

In addition to the ginkgo linter findings, replace this pattern:

err = funcRetErr()
Expect(err).ToNot(HaveOccurred())

With the more readable version of:

Expect(funcRetErr()).To(Succeed())

Improve some Eventually usages by using the Gomega parameter instead of returning error, to get cleaner test code.

Also, replaced some deprecation methods.

Signed-off-by: Nahshon Unna-Tsameret nunnatsa@redhat.com

What this PR does / why we need it:

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Release notes:

None
coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4181316724


Totals Coverage Status
Change from base Build 4069808194: 0.0%
Covered Lines: 952
Relevant Lines: 1808

💛 - Coveralls
nunnatsa commented 1 year ago

/ok-to-test

davidvossel commented 1 year ago

/retest

k8s-ci-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidvossel, nunnatsa

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/cluster-api-provider-kubevirt/blob/main/OWNERS)~~ [davidvossel,nunnatsa] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment