Skip to content

Commit

Permalink
re-enable test
Browse files Browse the repository at this point in the history
  • Loading branch information
swi-jared committed May 3, 2024
1 parent 3f34e49 commit 153e17a
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions internal/sampler/sampler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,21 +458,20 @@ func TestHydrateTraceStateBadSignature(t *testing.T) {
}

func TestHydrateTraceStateNoSignatureKey(t *testing.T) {
// TODO Fix by properly setting _no_ settings
//oboetestutils.UpdateSetting(oboetestutils.NoSettingST)
//sc := trace.NewSpanContext(trace.SpanContextConfig{
// TraceID: traceId,
// SpanID: spanId,
//})
//opts := fmt.Sprintf("trigger-trace;ts=%d", time.Now().Unix())
//ctx := context.WithValue(context.Background(), xtrace.OptionsKey, opts)
//sig := "0000"
//ctx = context.WithValue(ctx, xtrace.SignatureKey, sig)
//xto := xtrace.GetXTraceOptions(ctx)
//ts := hydrateTraceState(sc, xto, "ok")
//fullResp, err := swotel.GetInternalState(ts, swotel.XTraceOptResp)
//require.NoError(t, err)
//require.Equal(t, "auth=no-signature-key", fullResp)
sc := trace.NewSpanContext(trace.SpanContextConfig{
TraceID: traceId,
SpanID: spanId,
})
opts := fmt.Sprintf("trigger-trace;ts=%d", time.Now().Unix())
ctx := context.WithValue(context.Background(), xtrace.OptionsKey, opts)
sig := "0000"
ctx = context.WithValue(ctx, xtrace.SignatureKey, sig)
o := oboe.NewOboe()
xto := xtrace.GetXTraceOptions(ctx, o)
ts := hydrateTraceState(sc, xto, "ok")
fullResp, err := swotel.GetInternalState(ts, swotel.XTraceOptResp)
require.NoError(t, err)
require.Equal(t, "auth=no-signature-key", fullResp)
}

func TestHydrateTraceStateValidSignature(t *testing.T) {
Expand Down

0 comments on commit 153e17a

Please sign in to comment.