chore: fix rendering templates for tests aborts on usage == 0 (#13805)
This commit is contained in:
parent
e675e408cd
commit
495cb511c5
3 changed files with 10 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ func TestClass(t *testing.T, class Class, instantiate func(t *testing.T, values
|
|||
})
|
||||
})
|
||||
|
||||
return
|
||||
continue
|
||||
}
|
||||
|
||||
for _, u := range usages {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue