Increase Unit Test Coverage for Templates
Increases the Coverage for nginx ingress template functions. The majority of the added unit tests are for checking the invalid type handling.
This commit is contained in:
parent
63ea4fdb6a
commit
7b507095f4
2 changed files with 304 additions and 13 deletions
|
|
@ -230,9 +230,6 @@ func buildLuaSharedDictionaries(s interface{}, disableLuaRestyWAF bool) string {
|
|||
}
|
||||
}
|
||||
|
||||
if len(out) == 0 {
|
||||
return ""
|
||||
}
|
||||
return strings.Join(out, ";\n\r") + ";"
|
||||
}
|
||||
|
||||
|
|
@ -840,7 +837,7 @@ func buildOpentracing(input interface{}) string {
|
|||
if cfg.ZipkinCollectorHost != "" {
|
||||
buf.WriteString("opentracing_load_tracer /usr/local/lib/libzipkin_opentracing.so /etc/nginx/opentracing.json;")
|
||||
} else if cfg.JaegerCollectorHost != "" {
|
||||
buf.WriteString("opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/nginx/opentracing.json;")
|
||||
buf.WriteString("opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/nginx/opentracing.json;")
|
||||
}
|
||||
|
||||
buf.WriteString("\r\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue