Expose sub-tests
This commit is contained in:
parent
447750b154
commit
9215d4276f
3 changed files with 21 additions and 15 deletions
|
|
@ -21,10 +21,12 @@ 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: %+v", tmpl.Name, tmpl.Config)
|
||||
t.Error(err)
|
||||
}
|
||||
t.Run(tmpl.Name, func(t *testing.T) {
|
||||
_, err := NewFromConfig(tmpl.Type, tmpl.Config)
|
||||
if err != nil && !test.Acceptable(err, acceptable) {
|
||||
t.Logf("%s: %+v", tmpl.Name, tmpl.Config)
|
||||
t.Error(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,10 +17,12 @@ 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: %+v", tmpl.Name, tmpl.Config)
|
||||
t.Error(err)
|
||||
}
|
||||
t.Run(tmpl.Name, func(t *testing.T) {
|
||||
_, err := NewFromConfig(tmpl.Type, tmpl.Config)
|
||||
if err != nil && !test.Acceptable(err, acceptable) {
|
||||
t.Logf("%s: %+v", tmpl.Name, tmpl.Config)
|
||||
t.Error(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,10 +25,12 @@ func TestVehicles(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, tmpl := range test.ConfigTemplates("vehicle") {
|
||||
_, err := NewFromConfig(tmpl.Type, tmpl.Config)
|
||||
if err != nil && !test.Acceptable(err, acceptable) {
|
||||
t.Logf("%s: %+v", tmpl.Name, tmpl.Config)
|
||||
t.Error(err)
|
||||
}
|
||||
t.Run(tmpl.Name, func(t *testing.T) {
|
||||
_, err := NewFromConfig(tmpl.Type, tmpl.Config)
|
||||
if err != nil && !test.Acceptable(err, acceptable) {
|
||||
t.Logf("%s: %+v", tmpl.Name, tmpl.Config)
|
||||
t.Error(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue