test: apply Go modernizations across test files (#4735)
Deploy VitePress site to Pages / build (push) Has been cancelled
Deploy VitePress site to Pages / Deploy (push) Has been cancelled
Push container / Push branches and PRs (push) Has been cancelled
Test / Typecheck (push) Has been cancelled
Test / JavaScript Tests (push) Has been cancelled
Test / Go Tests (push) Has been cancelled
Test / Go Staticcheck (push) Has been cancelled
Test / Integration Tests (push) Has been cancelled

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Amir Raminfar
2026-05-23 14:07:21 -07:00
committed by GitHub
parent 58f76ee19d
commit 345102f498
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ func TestForwardProxyAuthRejectsInvalidFilter(t *testing.T) {
func TestUserFromContextInvalidFilterReturnsNil(t *testing.T) {
tokenAuth := jwtauth.New("HS256", []byte("secret"), nil)
_, tokenString, err := tokenAuth.Encode(map[string]interface{}{
_, tokenString, err := tokenAuth.Encode(map[string]any{
"username": "alice",
"email": "alice@example.com",
"name": "Alice",
+2 -2
View File
@@ -321,7 +321,7 @@ func TestManager_Deploy_SerializesSameProject(t *testing.T) {
var wg sync.WaitGroup
wg.Add(2)
errs := make(chan error, 2)
for i := 0; i < 2; i++ {
for range 2 {
go func() {
defer wg.Done()
errs <- mgr.Deploy(context.Background(), "shared", []byte(testCompose), nil)
@@ -373,7 +373,7 @@ func TestManager_Deploy_ParallelizesDifferentProjects(t *testing.T) {
}()
// Both must reach the docker call before either is released.
for i := 0; i < 2; i++ {
for range 2 {
select {
case <-reached:
case <-time.After(2 * time.Second):