[MM-54290] Add CPU profile to support package (#24477)

Этот коммит содержится в:
Ben Schumacher
2023-09-25 11:00:33 +02:00
коммит произвёл GitHub
родитель 153ebc31d7
Коммит 845ea2a984
2 изменённых файлов: 42 добавлений и 2 удалений

Просмотреть файл

@@ -102,7 +102,15 @@ func TestGenerateSupportPacket(t *testing.T) {
fileDatas := th.App.GenerateSupportPacket(ctx)
var rFileNames []string
testFiles := []string{"support_packet.yaml", "plugins.json", "sanitized_config.json", "mattermost.log", "notifications.log", "heap.prof"}
testFiles := []string{
"support_packet.yaml",
"plugins.json",
"sanitized_config.json",
"mattermost.log",
"notifications.log",
"cpu.prof",
"heap.prof",
}
for _, fileData := range fileDatas {
require.NotNil(t, fileData)
assert.Positive(t, len(fileData.Body))
@@ -117,7 +125,14 @@ func TestGenerateSupportPacket(t *testing.T) {
err = os.Remove("mattermost.log")
require.NoError(t, err)
fileDatas = th.App.GenerateSupportPacket(ctx)
testFiles = []string{"support_packet.yaml", "plugins.json", "sanitized_config.json", "heap.prof", "warning.txt"}
testFiles = []string{
"support_packet.yaml",
"plugins.json",
"sanitized_config.json",
"cpu.prof",
"heap.prof",
"warning.txt",
}
rFileNames = nil
for _, fileData := range fileDatas {
require.NotNil(t, fileData)