Skip to content

Commit

Permalink
Fix configuration for updated Renault error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Nov 3, 2020
1 parent 5772b28 commit 6c9d654
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charger/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion meter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
5 changes: 3 additions & 2 deletions vehicle/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 6c9d654

Please sign in to comment.