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:
@@ -62,10 +62,9 @@ func GetRouterWithAuth() *mux.Router {
|
||||
func TestRouterAuth(t *testing.T) {
|
||||
|
||||
mgr := manager.New()
|
||||
defer mgr.Wait()
|
||||
t.Cleanup(mgr.Wait)
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
ctx := t.Context()
|
||||
teardown := setup(t)
|
||||
defer teardown(t)
|
||||
logger := loggerfactory.GetLogger()
|
||||
|
||||
@@ -69,7 +69,7 @@ func spamServer(quit chan bool) {
|
||||
|
||||
func TestMutableMux(t *testing.T) {
|
||||
mgr := manager.New()
|
||||
defer mgr.Wait()
|
||||
t.Cleanup(mgr.Wait)
|
||||
|
||||
// make a simple mutable router
|
||||
log.Print("Create mutable router")
|
||||
@@ -82,8 +82,7 @@ func TestMutableMux(t *testing.T) {
|
||||
panicIf(err)
|
||||
|
||||
mr := newMutableRouter(logger, muxRouter)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
ctx := t.Context()
|
||||
|
||||
// start http server
|
||||
mgr.Add(ctx, func(ctx context.Context) {
|
||||
|
||||
Reference in New Issue
Block a user