Add tests for trace registry
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/cpuguy83/strongerrors"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/virtual-kubelet/virtual-kubelet/log"
|
||||
"go.opencensus.io/trace"
|
||||
@@ -42,7 +43,7 @@ func RegisterTracingExporter(name string, f TracingExporterInitFunc) {
|
||||
func GetTracingExporter(name string, opts TracingExporterOptions) (trace.Exporter, error) {
|
||||
f, ok := tracingExporters[name]
|
||||
if !ok {
|
||||
return nil, errors.Errorf("tracing exporter %q not found", name)
|
||||
return nil, strongerrors.NotFound(errors.Errorf("tracing exporter %q not found", name))
|
||||
}
|
||||
return f(opts)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user