feat(deps): update golangci-lint to v2
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 5m5s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 4m53s

This commit was merged in pull request #55.
This commit is contained in:
2025-05-06 17:36:05 +02:00
parent 81380f184e
commit f085ed378e
10 changed files with 36 additions and 28 deletions

View File

@@ -1634,7 +1634,10 @@ func setupIntegrationTest(t *testing.T) (db *sqlx.DB, basePath string, ctx conte
t.Fatalf("Could not open Database data.db: %v", err)
}
t.Cleanup(func() {
db.Close()
err := db.Close()
if err != nil {
panic(err)
}
})
testPort := port.Add(1)
@@ -1652,17 +1655,18 @@ func setupIntegrationTest(t *testing.T) (db *sqlx.DB, basePath string, ctx conte
func getEnv(port int32) func(string) string {
return func(key string) string {
if key == "PORT" {
switch key {
case "PORT":
return fmt.Sprint(port)
} else if key == "SMTP_ENABLED" {
case "SMTP_ENABLED":
return "false"
} else if key == "PROMETHEUS_ENABLED" {
case "PROMETHEUS_ENABLED":
return "false"
} else if key == "BASE_URL" {
case "BASE_URL":
return "http://localhost:" + fmt.Sprint(port)
} else if key == "ENVIRONMENT" {
case "ENVIRONMENT":
return "test"
} else {
default:
return ""
}
}
@@ -1685,10 +1689,12 @@ func waitForReady(
resp, err := client.Do(req)
if err == nil && resp.StatusCode == http.StatusOK {
resp.Body.Close()
return nil
return resp.Body.Close()
} else if err == nil {
resp.Body.Close()
err := resp.Body.Close()
if err != nil {
return err
}
}
select {