jaeger-endpoint configmap attribute

This commit is contained in:
Matthew Silverman 2021-02-18 14:40:04 -05:00
parent a7fb791132
commit 28280de175
7 changed files with 49 additions and 2 deletions

View file

@ -1163,6 +1163,16 @@ func TestBuildOpenTracing(t *testing.T) {
t.Errorf("Expected '%v' but returned '%v'", expected, actual)
}
cfgNoHost := config.Configuration{
EnableOpentracing: true,
}
expected = "\r\n"
actual = buildOpentracing(cfgNoHost, []*ingress.Server{})
if expected != actual {
t.Errorf("Expected '%v' but returned '%v'", expected, actual)
}
cfgJaeger := config.Configuration{
EnableOpentracing: true,
JaegerCollectorHost: "jaeger-host.com",
@ -1196,6 +1206,17 @@ func TestBuildOpenTracing(t *testing.T) {
t.Errorf("Expected '%v' but returned '%v'", expected, actual)
}
cfgJaegerEndpoint := config.Configuration{
EnableOpentracing: true,
JaegerEndpoint: "http://jaeger-collector.com:14268/api/traces",
}
expected = "opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/nginx/opentracing.json;\r\n"
actual = buildOpentracing(cfgJaegerEndpoint, []*ingress.Server{})
if expected != actual {
t.Errorf("Expected '%v' but returned '%v'", expected, actual)
}
cfgOpenTracing := config.Configuration{
EnableOpentracing: true,
DatadogCollectorHost: "datadog-host.com",