mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-06 01:38:10 +00:00
Use Golangci-lint
This commit is contained in:
parent
fdfecc8d7f
commit
0ea1c1b8d3
23 changed files with 177 additions and 174 deletions
|
|
@ -27,7 +27,6 @@ import (
|
|||
const certsDir = "testdata"
|
||||
|
||||
func TestMakeKubeconfigHTTPClient(t *testing.T) {
|
||||
|
||||
tests := []struct {
|
||||
kubeconfigPath string
|
||||
inClusterAuth bool
|
||||
|
|
@ -71,16 +70,13 @@ func TestMakeKubeconfigHTTPClient(t *testing.T) {
|
|||
t.Error("HTTP client Transport is nil, expected http.RoundTripper")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if err == nil {
|
||||
t.Errorf("Error is nil, expected %v", err)
|
||||
}
|
||||
} else if err == nil {
|
||||
t.Errorf("Error is nil, expected %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestMakePrometheusCAClient(t *testing.T) {
|
||||
|
||||
tests := []struct {
|
||||
caFilePath string
|
||||
tlsCertFilePath string
|
||||
|
|
@ -140,16 +136,13 @@ func TestMakePrometheusCAClient(t *testing.T) {
|
|||
t.Errorf("TLS certificates is %+v, expected nil", prometheusCAClient.Transport.(*http.Transport).TLSClientConfig.Certificates)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if err == nil {
|
||||
t.Errorf("Error is nil, expected %v", err)
|
||||
}
|
||||
} else if err == nil {
|
||||
t.Errorf("Error is nil, expected %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseHeaderArgs(t *testing.T) {
|
||||
|
||||
tests := []struct {
|
||||
args []string
|
||||
headers http.Header
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue