Skip to content
Merged
Prev Previous commit
Next Next commit
Correct unit test json logs
  • Loading branch information
Emyrk committed Feb 9, 2023
commit fd299782f63f8d30a269e347e6790f80e886d3bb
11 changes: 8 additions & 3 deletions coderd/rbac/authz_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -977,9 +977,14 @@ func testAuthorize(t *testing.T, name string, subject Subject, sets ...[]authTes

d, _ := json.Marshal(map[string]interface{}{
// This is not perfect marshal, but it is good enough for debugging this test.
"subject": subject,
"object": c.resource,
"action": a,
"subject": authSubject{
ID: subject.ID,
Roles: must(subject.Roles.Expand()),
Groups: subject.Groups,
Scope: must(subject.Scope.Expand()),
},
"object": c.resource,
"action": a,
})

// Logging only
Expand Down