Update Go version to 1.24 (#3167)
* Update Go version to 1.24 * Update golangci-lint version * Add envtest to tool * Add dashboard linter as a tool * Uset t.Cleanup --------- Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -17,10 +17,9 @@ import (
|
||||
|
||||
func TestStartServer(t *testing.T) {
|
||||
mgr := manager.New()
|
||||
defer mgr.Wait()
|
||||
t.Cleanup(mgr.Wait)
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
ctx := t.Context()
|
||||
logger := loggerfactory.GetLogger()
|
||||
m := mux.NewRouter()
|
||||
m.Handle("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package otel
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"reflect"
|
||||
@@ -62,8 +61,7 @@ func TestGetTraceExporter(t *testing.T) {
|
||||
t.Errorf("Expected OTEL_EXPORTER_OTLP_INSECURE to be set, got %s", OtelInsecureEnvVar)
|
||||
}
|
||||
logger := loggerfactory.GetLogger()
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
ctx := t.Context()
|
||||
tests := []struct {
|
||||
oltpEndpoint string
|
||||
oltpInsecure string
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"regexp"
|
||||
"testing"
|
||||
@@ -15,9 +14,8 @@ import (
|
||||
|
||||
func TestServiceAccountCheck(t *testing.T) {
|
||||
mgr := manager.New()
|
||||
defer mgr.Wait()
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
t.Cleanup(mgr.Wait)
|
||||
ctx := t.Context()
|
||||
kubernetesClient := fake.NewSimpleClientset()
|
||||
logger := loggerfactory.GetLogger()
|
||||
os.Setenv(ENV_CREATE_SA, "true")
|
||||
|
||||
Reference in New Issue
Block a user