Fix configuration for updated Renault error handling
This commit is contained in:
parent
5772b28936
commit
6c9d654920
5 changed files with 8 additions and 7 deletions
|
|
@ -20,7 +20,7 @@ func TestChargers(t *testing.T) {
|
|||
for _, tmpl := range test.ConfigTemplates("charger") {
|
||||
_, err := NewFromConfig(tmpl.Type, tmpl.Config)
|
||||
if err != nil && !test.Acceptable(err, acceptable) {
|
||||
t.Logf("%s", tmpl.Name)
|
||||
t.Logf("%s: %+v", tmpl.Name, tmpl.Config)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -4,7 +4,7 @@ go 1.13
|
|||
|
||||
require (
|
||||
github.com/PuerkitoBio/goquery v1.5.1
|
||||
github.com/andig/evcc-config v0.0.0-20201007090146-de86a8fc8508
|
||||
github.com/andig/evcc-config v0.0.0-20201030211256-8664d1cdae95
|
||||
github.com/asaskevich/EventBus v0.0.0-20200428142821-4fc0642a29f3
|
||||
github.com/avast/retry-go v2.6.0+incompatible
|
||||
github.com/benbjohnson/clock v1.0.3
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -21,8 +21,8 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy
|
|||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo=
|
||||
github.com/andig/evcc v0.0.0-20200727161511-d58eb15f2dc9/go.mod h1:8HONEC6cC2s4k0u3QL7GIjrYOZYTOKiiXybw0FIJL0A=
|
||||
github.com/andig/evcc-config v0.0.0-20201007090146-de86a8fc8508 h1:Utyo4NnJg7ERtoTxdbmwZkJJ7V97Uw+PdL3G7FgVSL4=
|
||||
github.com/andig/evcc-config v0.0.0-20201007090146-de86a8fc8508/go.mod h1:N0hIjIy+5E2AR1fF7Tg2IzBlblBrnFvCCaDGAaHzbWk=
|
||||
github.com/andig/evcc-config v0.0.0-20201030211256-8664d1cdae95 h1:GsXyGiwc3gf1XB5pj80llnbxsB9fqjFC2JKdooQSrs0=
|
||||
github.com/andig/evcc-config v0.0.0-20201030211256-8664d1cdae95/go.mod h1:N0hIjIy+5E2AR1fF7Tg2IzBlblBrnFvCCaDGAaHzbWk=
|
||||
github.com/andig/gosunspec v0.0.0-20200429133549-3cf6a82fed9c h1:AMtX56iHlNYVxMID7fe9efuVtaxgtdjyMeolg7q87IE=
|
||||
github.com/andig/gosunspec v0.0.0-20200429133549-3cf6a82fed9c/go.mod h1:YkshK8WMzYn1iXAZzHUO75gIqhMSan2ctgBVtBkRIyA=
|
||||
github.com/andybalholm/cascadia v1.1.0 h1:BuuO6sSfQNFRu1LppgbD25Hr2vLYW25JvxHs5zzsLTo=
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ func TestMeters(t *testing.T) {
|
|||
for _, tmpl := range test.ConfigTemplates("meter") {
|
||||
_, err := NewFromConfig(tmpl.Type, tmpl.Config)
|
||||
if err != nil && !test.Acceptable(err, acceptable) {
|
||||
t.Logf("%s", tmpl.Name)
|
||||
t.Logf("%s: %+v", tmpl.Name, tmpl.Config)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,17 +9,18 @@ import (
|
|||
func TestVehicles(t *testing.T) {
|
||||
acceptable := []string{
|
||||
"invalid plugin type: ...",
|
||||
"received status code 404 (INVALID PARAMS)",
|
||||
"received status code 404 (INVALID PARAMS)", // Nissan
|
||||
"missing personID",
|
||||
"401 Unauthorized",
|
||||
"unexpected length",
|
||||
"i/o timeout",
|
||||
"Missing required parameter", // Renault
|
||||
}
|
||||
|
||||
for _, tmpl := range test.ConfigTemplates("vehicle") {
|
||||
_, err := NewFromConfig(tmpl.Type, tmpl.Config)
|
||||
if err != nil && !test.Acceptable(err, acceptable) {
|
||||
t.Logf("%s", tmpl.Name)
|
||||
t.Logf("%s: %+v", tmpl.Name, tmpl.Config)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue