mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-07-22 17:18:33 +00:00
Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.6 (forgejo) (#7118)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
This commit is contained in:
parent
bb0e26a7b4
commit
6b436955fc
97 changed files with 258 additions and 345 deletions
|
@ -4,7 +4,6 @@
|
|||
package process
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
@ -12,13 +11,13 @@ import (
|
|||
)
|
||||
|
||||
func TestProcessStacktraces(t *testing.T) {
|
||||
_, _, finish := GetManager().AddContext(context.Background(), "Normal process")
|
||||
_, _, finish := GetManager().AddContext(t.Context(), "Normal process")
|
||||
defer finish()
|
||||
parentCtx, _, finish := GetManager().AddContext(context.Background(), "Children normal process")
|
||||
parentCtx, _, finish := GetManager().AddContext(t.Context(), "Children normal process")
|
||||
defer finish()
|
||||
_, _, finish = GetManager().AddContext(parentCtx, "Children process")
|
||||
defer finish()
|
||||
_, _, finish = GetManager().AddTypedContext(context.Background(), "System process", SystemProcessType, true)
|
||||
_, _, finish = GetManager().AddTypedContext(t.Context(), "System process", SystemProcessType, true)
|
||||
defer finish()
|
||||
|
||||
t.Run("No flat with no system process", func(t *testing.T) {
|
||||
|
|
|
@ -23,7 +23,7 @@ func TestGetManager(t *testing.T) {
|
|||
func TestManager_AddContext(t *testing.T) {
|
||||
pm := Manager{processMap: make(map[IDType]*process), next: 1}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
ctx, cancel := context.WithCancel(t.Context())
|
||||
defer cancel()
|
||||
|
||||
p1Ctx, _, finished := pm.AddContext(ctx, "foo")
|
||||
|
@ -42,7 +42,7 @@ func TestManager_AddContext(t *testing.T) {
|
|||
func TestManager_Cancel(t *testing.T) {
|
||||
pm := Manager{processMap: make(map[IDType]*process), next: 1}
|
||||
|
||||
ctx, _, finished := pm.AddContext(context.Background(), "foo")
|
||||
ctx, _, finished := pm.AddContext(t.Context(), "foo")
|
||||
defer finished()
|
||||
|
||||
pm.Cancel(GetPID(ctx))
|
||||
|
@ -54,7 +54,7 @@ func TestManager_Cancel(t *testing.T) {
|
|||
}
|
||||
finished()
|
||||
|
||||
ctx, cancel, finished := pm.AddContext(context.Background(), "foo")
|
||||
ctx, cancel, finished := pm.AddContext(t.Context(), "foo")
|
||||
defer finished()
|
||||
|
||||
cancel()
|
||||
|
@ -70,7 +70,7 @@ func TestManager_Cancel(t *testing.T) {
|
|||
func TestManager_Remove(t *testing.T) {
|
||||
pm := Manager{processMap: make(map[IDType]*process), next: 1}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
ctx, cancel := context.WithCancel(t.Context())
|
||||
defer cancel()
|
||||
|
||||
p1Ctx, _, finished := pm.AddContext(ctx, "foo")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue