chore: use testing.Context (#25686)
This commit is contained in:
parent
9d523fdaf5
commit
312b838db3
15 changed files with 29 additions and 46 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue