mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Make test tracer noop and return no errors (#50797)
This commit is contained in:
@@ -22,8 +22,7 @@ func TestHTTPClientProvider(t *testing.T) {
|
||||
t.Cleanup(func() {
|
||||
newProviderFunc = origNewProviderFunc
|
||||
})
|
||||
tracer, err := tracing.InitializeTracerForTest()
|
||||
require.NoError(t, err)
|
||||
tracer := tracing.InitializeTracerForTest()
|
||||
_ = New(&setting.Cfg{SigV4AuthEnabled: false}, &validations.OSSPluginRequestValidator{}, tracer)
|
||||
require.Len(t, providerOpts, 1)
|
||||
o := providerOpts[0]
|
||||
@@ -47,8 +46,7 @@ func TestHTTPClientProvider(t *testing.T) {
|
||||
t.Cleanup(func() {
|
||||
newProviderFunc = origNewProviderFunc
|
||||
})
|
||||
tracer, err := tracing.InitializeTracerForTest()
|
||||
require.NoError(t, err)
|
||||
tracer := tracing.InitializeTracerForTest()
|
||||
_ = New(&setting.Cfg{SigV4AuthEnabled: true}, &validations.OSSPluginRequestValidator{}, tracer)
|
||||
require.Len(t, providerOpts, 1)
|
||||
o := providerOpts[0]
|
||||
|
@@ -13,8 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func TestTracingMiddleware(t *testing.T) {
|
||||
tracer, err := tracing.InitializeTracerForTest()
|
||||
require.NoError(t, err)
|
||||
tracer := tracing.InitializeTracerForTest()
|
||||
|
||||
t.Run("GET request that returns 200 OK should start and capture span", func(t *testing.T) {
|
||||
finalRoundTripper := httpclient.RoundTripperFunc(func(req *http.Request) (*http.Response, error) {
|
||||
|
Reference in New Issue
Block a user