MM-43878: don't err when reply createAt before parent createAt (#20292)
Summary In a bulk import, if the createAt of a reply is older than the createAt of the parent post, then instead of erroring, we log a warning and set the createAt of the reply to that of the parent post. I checked the exporting logic, there doesn't appear to be away for the reply createAt to be older than the parent createAt, as a side-effect of the exporting logic. Ticket Link https://mattermost.atlassian.net/browse/MM-43878
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
84dbf894ea
Коммит
c5e6d0e1ba
@@ -887,14 +887,6 @@ func TestImportValidateReplyImportData(t *testing.T) {
|
||||
}
|
||||
err = validateReplyImportData(&data, parentCreateAt, maxPostSize)
|
||||
require.NotNil(t, err, "Should have failed due to 0 create-at value.")
|
||||
|
||||
data = ReplyImportData{
|
||||
User: ptrStr("username"),
|
||||
Message: ptrStr("message"),
|
||||
CreateAt: ptrInt64(parentCreateAt - 100),
|
||||
}
|
||||
err = validateReplyImportData(&data, parentCreateAt, maxPostSize)
|
||||
require.NotNil(t, err, "Should have failed due parent with newer create-at value.")
|
||||
}
|
||||
|
||||
func TestImportValidatePostImportData(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user