From 1d7cccef256df1774fa61e0ea9205c09b1e9863e Mon Sep 17 00:00:00 2001 From: joshvanl Date: Wed, 7 Feb 2024 01:08:23 +0000 Subject: [PATCH] Update and fix e2e tests in standalone mode Signed-off-by: joshvanl --- tests/e2e/standalone/publish_test.go | 1 + tests/e2e/standalone/run_test.go | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/e2e/standalone/publish_test.go b/tests/e2e/standalone/publish_test.go index ddd9cf0c9..e7e334a75 100644 --- a/tests/e2e/standalone/publish_test.go +++ b/tests/e2e/standalone/publish_test.go @@ -103,6 +103,7 @@ func TestStandalonePublish(t *testing.T) { Topic: "sample", Data: map[string]interface{}{"dapr": "is_great"}, RawData: []byte(`{"dapr":"is_great"}`), + Metadata: make(map[string]string), }, event) }) diff --git a/tests/e2e/standalone/run_test.go b/tests/e2e/standalone/run_test.go index 8ea505f9b..934f4fd0c 100644 --- a/tests/e2e/standalone/run_test.go +++ b/tests/e2e/standalone/run_test.go @@ -115,9 +115,9 @@ func TestStandaloneRun(t *testing.T) { assert.Contains(t, output, "Exited App successfully") assert.Contains(t, output, "Exited Dapr successfully") assert.NotContains(t, output, "level=info msg=\"HTTP API Called\" app_id=enableApiLogging_info") - assert.NotContains(t, output, "method=\"PUT /v1.0/metadata/appCommand\"") - assert.NotContains(t, output, "method=\"PUT /v1.0/metadata/cliPID\"") - assert.NotContains(t, output, "method=\"PUT /v1.0/metadata/appPID\"") + assert.NotContains(t, output, "method=PutMetadata") + assert.NotContains(t, output, "Updating metadata for appCommand: ") + assert.NotContains(t, output, "Updating metadata for cliPID: ") }) t.Run(fmt.Sprintf("check enableAPILogging with obfuscation through dapr config file"), func(t *testing.T) { @@ -133,9 +133,8 @@ func TestStandaloneRun(t *testing.T) { assert.Contains(t, output, "Exited App successfully") assert.Contains(t, output, "Exited Dapr successfully") assert.Contains(t, output, "level=info msg=\"HTTP API Called\" app_id=enableApiLogging_info") - assert.Contains(t, output, "method=\"PUT /v1.0/metadata/{key}\"") - assert.Contains(t, output, "method=\"PUT /v1.0/metadata/{key}\"") - assert.Contains(t, output, "method=\"PUT /v1.0/metadata/{key}\"") + assert.Contains(t, output, "method=PutMetadata") + assert.Contains(t, output, "Updating metadata for appPID: ") }) t.Run(fmt.Sprintf("check run with log JSON enabled"), func(t *testing.T) {