Skip to content

Commit

Permalink
build, linter, errcheck: lint tests/libnode
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Duarte Barroso <[email protected]>
  • Loading branch information
maiqueb committed Aug 4, 2022
1 parent fa3eca8 commit cdbc0a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion nogo_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
"tools/": "KubeVirt tools do not pass errcheck yet",
"tests/console": "tests/console does not pass errcheck yet",
"tests/libstorage/": "tests/libstorage does not pass errcheck yet",
"tests/libnode/": "libnode does not pass errcheck yet",
"tests/monitoring/": "tests/monitoring does not pass errcheck yet",
"tests/network/": "tests/network/ pkg does not pass errcheck yet",
"tests/reporter/": "tests/reporter pkg does not pass errcheck yet",
Expand Down
8 changes: 6 additions & 2 deletions tests/libnode/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@ func CleanNodes() {

k8sClient := clientcmd.GetK8sCmdClient()
if k8sClient == "oc" {
clientcmd.RunCommandWithNS("", k8sClient, "adm", "uncordon", node.Name)
if _, _, err := clientcmd.RunCommandWithNS("", k8sClient, "adm", "uncordon", node.Name); err != nil {
panic(fmt.Sprintf("could not uncordon the node %s", node.Name))
}
} else {
clientcmd.RunCommandWithNS("", k8sClient, "uncordon", node.Name)
if _, _, err := clientcmd.RunCommandWithNS("", k8sClient, "uncordon", node.Name); err != nil {
panic(fmt.Sprintf("could not uncordon the node %s", node.Name))
}
}

found := false
Expand Down

0 comments on commit cdbc0a9

Please sign in to comment.