chore: fix rendering templates for tests aborts on usage == 0 (#13805)

This commit is contained in:
Michael Heß 2024-05-08 12:01:40 +02:00 • committed by GitHub
parent e675e408cd
commit 495cb511c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 2 deletions

View file

@ -7,7 +7,12 @@ import (
"github.com/evcc-io/evcc/util/test"
)
var acceptable = []string{}
var acceptable = []string{
"missing token", // amber, tibber
"invalid zipcode", // grünstromindex
"invalid apikey format", // octopusenergy
"missing region", // octopusenergy
}
func TestTemplates(t *testing.T) {
templates.TestClass(t, templates.Tariff, func(t *testing.T, values map[string]any) {

View file

@ -69,7 +69,7 @@ func TestClass(t *testing.T, class Class, instantiate func(t *testing.T, values
})
})
return
continue
}
for _, u := range usages {

View file

@ -22,6 +22,9 @@ var acceptable = []string{
"missing credentials", // Tesla
"missing credentials id", // Tronity
"missing access and/or refresh token, use `evcc token` to create", // Tesla
"login failed: code not found", //Polestar
"empty instance type- check for missing usage", // Merces
"invalid vehicle type: tesla", //Tesla
}
func TestTemplates(t *testing.T) {