Skip to content

Commit

Permalink
e2e: add deadcode nolint for k8sVersionGreaterEquals
Browse files Browse the repository at this point in the history
k8sVersionGreaterEquals is not used anywhere but it
will be used in future if we need to have a kubernetes
version check. adding nolint for it now to skip it
from static check.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
  • Loading branch information
Madhu-1 authored and mergify[bot] committed Jul 25, 2022
1 parent efabe70 commit 8de0633
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions e2e/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1479,15 +1479,13 @@ func validateController(
return deleteResource(rbdExamplePath + "storageclass.yaml")
}

// nolint:deadcode,unused // Unused code will be used in future.
// k8sVersionGreaterEquals checks the ServerVersion of the Kubernetes cluster
// and compares it to the major.minor version passed. In case the version of
// the cluster is equal or higher to major.minor, `true` is returned, `false`
// otherwise.
//
// If fetching the ServerVersion of the Kubernetes cluster fails, the calling
// test case is marked as `FAILED` and gets aborted.
//
// nolint:unparam // currently major is always 1, this can change in the future
func k8sVersionGreaterEquals(c kubernetes.Interface, major, minor int) bool {
v, err := c.Discovery().ServerVersion()
if err != nil {
Expand Down

0 comments on commit 8de0633

Please sign in to comment.