Audit logging - new schema (#20447)
* Audit logging - new schema added, old schema removed. * fix linter error by running goimports * Address review comments * Address review comments * Example usage of new audit logging API for the updateUserAuth call * fixed unit test on auditing updating user record * Changed the `TestUpdateConfigDiffInAuditRecord` testcase---it failed, because this PR changes how the `meta` field is serialized into the audit log records. * fix linter error
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6dc897b04f
Коммит
0c5c74904b
@@ -572,8 +572,9 @@ func TestUpdateConfigDiffInAuditRecord(t *testing.T) {
|
||||
data, err := ioutil.ReadAll(logFile)
|
||||
require.NoError(t, err)
|
||||
require.NotEmpty(t, data)
|
||||
|
||||
require.Contains(t, string(data),
|
||||
fmt.Sprintf(`"diff":"[{Path:ServiceSettings.ReadTimeout BaseVal:%d ActualVal:%d}]"`,
|
||||
fmt.Sprintf(`"diff":[{"path":"ServiceSettings.ReadTimeout","base_val":%d,"actual_val":%d}]`,
|
||||
timeoutVal, timeoutVal+1))
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user