mirror of
https://github.com/amir20/dozzle.git
synced 2026-06-23 04:10:12 +00:00
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
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:
@@ -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",
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user