From 598b31e443ef02d496cbaadd300c0d7a91b928fe Mon Sep 17 00:00:00 2001 From: talip Date: Wed, 11 Oct 2023 19:27:05 +0530 Subject: [PATCH] updated test to assert for traceid presence in decision logs --- test/e2e/distributedtracing/distributedtracing_test.go | 7 +++---- test/e2e/testing.go | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/e2e/distributedtracing/distributedtracing_test.go b/test/e2e/distributedtracing/distributedtracing_test.go index 903c57c82..99a171a81 100644 --- a/test/e2e/distributedtracing/distributedtracing_test.go +++ b/test/e2e/distributedtracing/distributedtracing_test.go @@ -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) { diff --git a/test/e2e/testing.go b/test/e2e/testing.go index 44d627eb4..1ebf87511 100644 --- a/test/e2e/testing.go +++ b/test/e2e/testing.go @@ -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 }