Skip to content

Commit

Permalink
updated test to assert for traceid presence in decision logs
Browse files Browse the repository at this point in the history
  • Loading branch information
be-a-bee committed Oct 11, 2023
1 parent 50850b5 commit 598b31e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions test/e2e/distributedtracing/distributedtracing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,9 @@ func TestMain(m *testing.M) {
os.Exit(m.Run())
}

// TestServerSpan exemplarily asserts that the server handlers emit OpenTelemetry spans
// with the correct attributes. It does NOT exercise all handlers, but contains one test
// with a GET and one with a POST.
func TestServerSpan(t *testing.T) {


func TestServerSpanAndTraceIdInDecisionLog(t *testing.T) {
spanExporter.Reset()

t.Run("envoy.service.auth.v3.Authorization Check", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestAuthzServerWithWithOpts(module string, path string, addr string, opts .
txn := storage.NewTransactionOrDie(ctx, store, storage.WriteParams)
store.UpsertPolicy(ctx, txn, "example.rego", []byte(module))
store.Commit(ctx, txn)
m, err := plugins.New([]byte(`{"decision_logs": {"console": "true"}}`), "test", store, opts...)
m, err := plugins.New([]byte{}, "test", store, opts...)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 598b31e

Please sign in to comment.