chore: use testing.Context (#25686)

This commit is contained in:
andig 2025-11-29 15:06:52 +01:00 • committed by GitHub
parent 9d523fdaf5
commit 312b838db3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 29 additions and 46 deletions

View file

@ -1,7 +1,6 @@
package tariff
import (
"context"
"testing"
"github.com/evcc-io/evcc/api"
@ -23,7 +22,7 @@ func TestTemplates(t *testing.T) {
templates.TestClass(t, templates.Tariff, func(t *testing.T, values map[string]any) {
t.Helper()
if _, err := NewFromConfig(context.TODO(), "template", values); err != nil && !test.Acceptable(err, acceptable) {
if _, err := NewFromConfig(t.Context(), "template", values); err != nil && !test.Acceptable(err, acceptable) {
t.Log(values)
t.Error(err)
}