Fix golangci-lint errors (#10196)
* Fix golangci-lint errors Signed-off-by: z1cheng <imchench@gmail.com> * Fix dupl errors Signed-off-by: z1cheng <imchench@gmail.com> * Fix comments Signed-off-by: z1cheng <imchench@gmail.com> * Fix errcheck lint errors Signed-off-by: z1cheng <imchench@gmail.com> * Fix assert in e2e test Signed-off-by: z1cheng <imchench@gmail.com> * Not interrupt the waitForPodsReady Signed-off-by: z1cheng <imchench@gmail.com> * Replace string with constant Signed-off-by: z1cheng <imchench@gmail.com> * Fix comments Signed-off-by: z1cheng <imchench@gmail.com> * Revert write file permision Signed-off-by: z1cheng <imchench@gmail.com> --------- Signed-off-by: z1cheng <imchench@gmail.com>
This commit is contained in:
parent
46d87d3462
commit
b3060bfbd0
253 changed files with 2434 additions and 2113 deletions
|
|
@ -76,9 +76,12 @@ func TestControllerCounters(t *testing.T) {
|
|||
{
|
||||
name: "should set SSL certificates metrics",
|
||||
test: func(cm *Controller) {
|
||||
t1, _ := time.Parse(
|
||||
t1, err := time.Parse(
|
||||
time.RFC3339,
|
||||
"2012-11-01T22:08:41+00:00")
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
}
|
||||
|
||||
servers := []*ingress.Server{
|
||||
{
|
||||
|
|
@ -106,7 +109,6 @@ func TestControllerCounters(t *testing.T) {
|
|||
{
|
||||
name: "should set SSL certificates infos metrics",
|
||||
test: func(cm *Controller) {
|
||||
|
||||
servers := []*ingress.Server{
|
||||
{
|
||||
Hostname: "demo",
|
||||
|
|
@ -143,7 +145,6 @@ func TestControllerCounters(t *testing.T) {
|
|||
{
|
||||
name: "should ignore certificates without serial number",
|
||||
test: func(cm *Controller) {
|
||||
|
||||
servers := []*ingress.Server{
|
||||
{
|
||||
Hostname: "demo",
|
||||
|
|
@ -168,7 +169,6 @@ func TestControllerCounters(t *testing.T) {
|
|||
{
|
||||
name: "should ignore certificates with nil x509 pointer",
|
||||
test: func(cm *Controller) {
|
||||
|
||||
servers := []*ingress.Server{
|
||||
{
|
||||
Hostname: "demo",
|
||||
|
|
@ -193,7 +193,6 @@ func TestControllerCounters(t *testing.T) {
|
|||
{
|
||||
name: "should ignore servers without certificates",
|
||||
test: func(cm *Controller) {
|
||||
|
||||
servers := []*ingress.Server{
|
||||
{
|
||||
Hostname: "demo",
|
||||
|
|
@ -232,9 +231,12 @@ func TestRemoveMetrics(t *testing.T) {
|
|||
t.Errorf("registering collector failed: %s", err)
|
||||
}
|
||||
|
||||
t1, _ := time.Parse(
|
||||
t1, err := time.Parse(
|
||||
time.RFC3339,
|
||||
"2012-11-01T22:08:41+00:00")
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected error: %v", err)
|
||||
}
|
||||
|
||||
servers := []*ingress.Server{
|
||||
{
|
||||
|
|
@ -279,10 +281,12 @@ func TestRemoveAllSSLMetrics(t *testing.T) {
|
|||
t.Errorf("registering collector failed: %s", err)
|
||||
}
|
||||
|
||||
t1, _ := time.Parse(
|
||||
t1, err := time.Parse(
|
||||
time.RFC3339,
|
||||
"2012-11-01T22:08:41+00:00")
|
||||
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
}
|
||||
servers := []*ingress.Server{
|
||||
{
|
||||
Hostname: "demo",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue