Skip to content

Commit

Permalink
Update and fix e2e tests in standalone mode
Browse files Browse the repository at this point in the history
Signed-off-by: joshvanl <me@joshvanl.dev>
  • Loading branch information
JoshVanL committed Feb 7, 2024
1 parent 63eb2a2 commit 1d7ccce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions tests/e2e/standalone/publish_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})

Expand Down
11 changes: 5 additions & 6 deletions tests/e2e/standalone/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 1d7ccce

Please sign in to comment.