mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Merge pull request #90312 from tangcong/fix-kubeadm-staticcheck-err
fix kubeadm staticcheck err
This commit is contained in:
commit
7709cf9eae
@ -803,6 +803,7 @@ func getEtcdVersionResponse(client *http.Client, url string, target interface{})
|
|||||||
loopCount--
|
loopCount--
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
//lint:ignore SA5011 If err != nil we are already returning.
|
||||||
defer r.Body.Close()
|
defer r.Body.Close()
|
||||||
|
|
||||||
if r != nil && r.StatusCode >= 500 && r.StatusCode <= 599 {
|
if r != nil && r.StatusCode >= 500 && r.StatusCode <= 599 {
|
||||||
|
@ -748,6 +748,7 @@ func TestGetInitConfigurationFromCluster(t *testing.T) {
|
|||||||
// Test expected values in InitConfiguration
|
// Test expected values in InitConfiguration
|
||||||
if cfg == nil {
|
if cfg == nil {
|
||||||
t.Errorf("unexpected nil return value")
|
t.Errorf("unexpected nil return value")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
if cfg.ClusterConfiguration.KubernetesVersion != k8sVersionString {
|
if cfg.ClusterConfiguration.KubernetesVersion != k8sVersionString {
|
||||||
t.Errorf("invalid ClusterConfiguration.KubernetesVersion")
|
t.Errorf("invalid ClusterConfiguration.KubernetesVersion")
|
||||||
|
Loading…
Reference in New Issue
Block a user