Merge pull request #90312 from tangcong/fix-kubeadm-staticcheck-err

fix kubeadm staticcheck err
This commit is contained in:
Kubernetes Prow Robot
2020-04-20 19:48:56 -07:00
committed by GitHub
2 changed files with 2 additions and 0 deletions

View File

@@ -803,6 +803,7 @@ func getEtcdVersionResponse(client *http.Client, url string, target interface{})
loopCount--
return false, err
}
//lint:ignore SA5011 If err != nil we are already returning.
defer r.Body.Close()
if r != nil && r.StatusCode >= 500 && r.StatusCode <= 599 {

View File

@@ -748,6 +748,7 @@ func TestGetInitConfigurationFromCluster(t *testing.T) {
// Test expected values in InitConfiguration
if cfg == nil {
t.Errorf("unexpected nil return value")
return
}
if cfg.ClusterConfiguration.KubernetesVersion != k8sVersionString {
t.Errorf("invalid ClusterConfiguration.KubernetesVersion")