MM-60115, MM-62436, MM-62493: Compliance export downloads from local and s3; e2e tests (#29806)

* add ZipReader method to filestore and file/s3 backends

to merge

to merge

* add WriteStreamResponse as an alternative to WriteFileResponse

* add generated layers

* enable download link; download job endpoint now streams export dir zips

* fix MM-62493

* re-enable e2e tests--we have download links, folks

* Add tests for ZipReader in filestore and s3store

* remove unnecessary error return on ZipReader

* little cleanup

* improve tests; some refactoring: s.Nil(err) -> s.NoError(err)

* blank commit

* backwards compatability for pre-10.5 job downloads

* compress file response; better errors; better comments; PR comments

* update generated app layers

* improve/widen tests; improve comments; simplify localstore ZipReader

* regenerate layers

* follow GoDoc conventions

* update generated layers

* remove unnecessary comment

* in jobs/job-id/download, clean exportDir before sending to ZipReader

* better comments; add an error return on ZipReader

* improve file permissions

* adjust tests for new error returns

* linting

* i18n
Этот коммит содержится в:
Christopher Poile
2025-01-26 22:58:07 -05:00
коммит произвёл GitHub
родитель 396ee06dcb
Коммит 737bed311c
21 изменённых файлов: 753 добавлений и 110 удалений

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

@@ -44,7 +44,7 @@ describe('Compliance Export', () => {
});
});
it.skip('MM-60115 - MM-T3435 - Download Compliance Export Files - CSV Format', () => {
it('MM-T3435 - Download Compliance Export Files - CSV Format', () => {
// # Navigate to a team and post an attachment
cy.visit(`/${teamName}/channels/town-square`);
gotoTeamAndPostImage();
@@ -65,7 +65,7 @@ describe('Compliance Export', () => {
});
});
it.skip('MM-60115 - MM-T3438 - Download Compliance Export Files when 0 messages exported', () => {
it('MM-T3438 - Download Compliance Export Files when 0 messages exported', () => {
// # Navigate to a team and post an attachment
cy.visit(`/${teamName}/channels/town-square`);
gotoTeamAndPostImage();
@@ -94,7 +94,7 @@ describe('Compliance Export', () => {
});
});
it.skip('MM-60115 - MM-T1168 - Compliance Export - Run Now, entry appears in job table', () => {
it('MM-T1168 - Compliance Export - Run Now, entry appears in job table', () => {
// # Navigate to a team and post an attachment
cy.visit(`/${teamName}/channels/town-square`);
gotoTeamAndPostImage();

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

@@ -60,7 +60,7 @@ describe('Compliance Export', () => {
cy.shellRm('-rf', downloadsFolder);
});
it.skip('MM-60115 - MM-T1175_1 - UserType identifies that the message is posted by a bot', () => {
it('MM-T1175_1 - UserType identifies that the message is posted by a bot', () => {
const message = `This is CSV bot message from ${botName} at ${Date.now()}`;
// # Post bot message
@@ -81,7 +81,7 @@ describe('Compliance Export', () => {
);
});
it.skip('MM-60115 - MM-T1175_2 - UserType identifies that the message is posted by a bot', () => {
it('MM-T1175_2 - UserType identifies that the message is posted by a bot', () => {
const message = `This is XML bot message from ${botName} at ${Date.now()}`;
// # Post bot message

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

@@ -52,7 +52,7 @@ describe('Compliance Export', () => {
cy.shellRm('-rf', downloadsFolder);
});
it.skip('MM-60115 - MM-T1172 - Compliance Export - Deleted file is indicated in CSV File Export', () => {
it('MM-T1172 - Compliance Export - Deleted file is indicated in CSV File Export', () => {
// # Go to compliance page and enable export
cy.uiGoToCompliancePage();
cy.uiEnableComplianceExport();
@@ -84,7 +84,7 @@ describe('Compliance Export', () => {
);
});
it.skip('MM-60115 - MM-T1173 - Compliance Export - Deleted file is indicated in Actiance XML File Export', () => {
it('MM-T1173 - Compliance Export - Deleted file is indicated in Actiance XML File Export', () => {
// # Go to compliance page and enable export
cy.uiGoToCompliancePage();
cy.uiEnableComplianceExport(ExportFormatActiance);
@@ -121,7 +121,7 @@ describe('Compliance Export', () => {
});
});
it.skip('MM-60115 - MM-T1176 - Compliance export should include updated post after editing', () => {
it('MM-T1176 - Compliance export should include updated post after editing', () => {
// # Go to compliance page and enable export
cy.uiGoToCompliancePage();
cy.uiEnableComplianceExport(ExportFormatActiance);
@@ -154,7 +154,7 @@ describe('Compliance Export', () => {
);
});
it.skip('MM-60115 - MM-T3305 - Verify Deactivated users are displayed properly in Compliance Exports', () => {
it('MM-T3305 - Verify Deactivated users are displayed properly in Compliance Exports', () => {
// # Post a message by Admin
cy.postMessageAs({
sender: adminUser,

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

@@ -34,12 +34,9 @@ export function verifyPostsCSVFile(targetFolder, type, match) {
}
export function verifyActianceXMLFile(targetFolder, type, match) {
cy.shellFind(targetFolder, /actiance_export.xml/).
then((files) => {
cy.readFile(files[files.length - 1]).
should('exist').
and(type, match);
});
cy.readFile(`${targetFolder}/actiance_export.xml`).
should('exist').
and(type, match);
}
export function verifyExportedMessagesCount(expectedNumber) {