refactor: modernize code using go fix

This commit is contained in:
2026-02-19 17:31:06 +01:00
parent ac6e1ba80b
commit 986b4e9388
7 changed files with 34 additions and 44 deletions

View File

@@ -455,7 +455,7 @@ func TestE2E_ConcurrentRequestsWithSameSession(t *testing.T) {
authClient := ctx.loginUser(t, createdUser.Username, createdUser.Password)
results := make(chan bool, 5)
for i := 0; i < 5; i++ {
for range 5 {
go func() {
profile := authClient.GetProfile(t)
results <- (profile != nil && profile.Data.Username == createdUser.Username)
@@ -463,7 +463,7 @@ func TestE2E_ConcurrentRequestsWithSameSession(t *testing.T) {
}
successCount := 0
for i := 0; i < 5; i++ {
for range 5 {
if <-results {
successCount++
}
@@ -562,7 +562,7 @@ func TestE2E_RapidSuccessiveActions(t *testing.T) {
post := authClient.CreatePost(t, "Rapid Vote Test", "https://example.com/rapid", "Content")
for i := 0; i < 10; i++ {
for i := range 10 {
voteType := "up"
if i%2 == 0 {
voteType = "down"