Skip to content

Commit

Permalink
fix resource tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dmathieu committed Apr 8, 2024
1 parent 227673d commit 3551d56
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sdk/resource/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,9 @@ func TestWithProcessCommandArgs(t *testing.T) {
)

require.NoError(t, err)
jsonCommandArgs, _ := json.Marshal(fakeCommandArgs)
require.EqualValues(t, map[string]string{
"process.command_args": fmt.Sprint(fakeCommandArgs),
"process.command_args": string(jsonCommandArgs),
}, toMap(res))
}

Expand Down Expand Up @@ -671,11 +672,12 @@ func TestWithProcess(t *testing.T) {
)

require.NoError(t, err)
jsonCommandArgs, _ := json.Marshal(fakeCommandArgs)
require.EqualValues(t, map[string]string{
"process.pid": fmt.Sprint(fakePID),
"process.executable.name": fakeExecutableName,
"process.executable.path": fakeExecutablePath,
"process.command_args": fmt.Sprint(fakeCommandArgs),
"process.command_args": string(jsonCommandArgs),
"process.owner": fakeOwner,
"process.runtime.name": fakeRuntimeName,
"process.runtime.version": fakeRuntimeVersion,
Expand Down

0 comments on commit 3551d56

Please sign in to comment.