Skip to content

Commit

Permalink
Initial test passing
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwoodward committed Oct 23, 2022
1 parent ab86951 commit e219b88
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions client/opentelemetry_test.go
Expand Up @@ -4,13 +4,12 @@ import (
"context"
"testing"

"github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/ext"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/otel"
tracesdk "go.opentelemetry.io/otel/sdk/trace"
"go.opentelemetry.io/otel/sdk/trace/tracetest"
"go.opentelemetry.io/otel/trace"

"github.com/go-openapi/runtime"
)
Expand Down Expand Up @@ -64,12 +63,14 @@ func Test_OpenTelemetryRuntime_submit(t *testing.T) {

func testOpenTelemetrySubmit(t *testing.T, operation *runtime.ClientOperation, exporter *tracetest.InMemoryExporter, expectedSpans int) {
header := map[string][]string{}
r := newOpenTracingTransport(&mockRuntime{runtime.TestClientRequest{Headers: header}},
r := newOpenTelemetryTransport(&mockRuntime{runtime.TestClientRequest{Headers: header}},
"remote_host",
[]opentracing.StartSpanOption{opentracing.Tag{
Key: string(ext.PeerService),
Value: "service",
}})
[]trace.SpanStartOption{})

// // opentracing.Tag{
// Key: string(ext.PeerService),
// Value: "service",
// }

_, err := r.Submit(operation)
require.NoError(t, err)
Expand Down

0 comments on commit e219b88

Please sign in to comment.