Don't render example values for testing or timeouts will slow down tests
This commit is contained in:
parent
6972bc6c36
commit
02550532dc
2 changed files with 5 additions and 6 deletions
|
|
@ -16,14 +16,15 @@ var acceptable = []string{
|
|||
"missing password", // Powerwall
|
||||
"connect: no route to host",
|
||||
"connect: connection refused",
|
||||
"i/o timeout",
|
||||
"connect: network is unreachable",
|
||||
"no ping response for 192.0.2.2", // SMA
|
||||
"network is unreachable",
|
||||
"i/o timeout",
|
||||
"'sma': missing uri or serial", // SMA
|
||||
"'fritzdect': missing ain", // FritzDect
|
||||
"[1ESY1161052714 1ESY1161229249 1EMH0008842285 1ESY1161978584 1EMH0004864048 1ESY1161979033 7ELS8135823805]", // Discovergy
|
||||
"can only have either uri or device", // modbus
|
||||
"(Client.Timeout exceeded while awaiting headers)", // http
|
||||
"cannot create meter 'discovergy': unexpected status: 401", // Discovergy Proxy
|
||||
"unexpected status: 401", // Discovergy
|
||||
"unexpected status: 503", // Discovergy
|
||||
"login failed: Put \"https://192.0.2.2/v1/login\": context deadline exceeded", // LG ESS
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,8 +203,6 @@ func (p *Param) DefaultValue(renderMode string) interface{} {
|
|||
default:
|
||||
if p.Test != "" {
|
||||
return p.Test
|
||||
} else if p.Example != "" && renderMode == TemplateRenderModeUnitTest {
|
||||
return p.Example
|
||||
} else if p.Example != "" && p.Default == "" && renderMode == TemplateRenderModeDocs {
|
||||
return p.Example
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue