diff --git a/__fixtures__/custom-deploy/invalid-file.zip b/__fixtures__/custom-deploy/invalid-file-chars.zip similarity index 100% rename from __fixtures__/custom-deploy/invalid-file.zip rename to __fixtures__/custom-deploy/invalid-file-chars.zip diff --git a/__fixtures__/custom-deploy/valid-zip.zip b/__fixtures__/custom-deploy/valid-zip.zip index 3b6779296..67a1ab64f 100644 Binary files a/__fixtures__/custom-deploy/valid-zip.zip and b/__fixtures__/custom-deploy/valid-zip.zip differ diff --git a/__tests__/bin/vip-app-deploy-validate.e2e.js b/__tests__/bin/vip-app-deploy-validate.e2e.js index ece7934e7..8539671af 100644 --- a/__tests__/bin/vip-app-deploy-validate.e2e.js +++ b/__tests__/bin/vip-app-deploy-validate.e2e.js @@ -12,6 +12,15 @@ describe( 'vip-app-deploy-validate e2e', () => { describe( 'validateZipFile', () => { it( 'should not throw error for valid zip file', async () => { + // Archive: __fixtures__/custom-deploy/valid-zip.zip + // __MACOSX/ + // mysite/ + // mysite/.DS_Store + // mysite/__MACOSX + // mysite/themes + // mysite/themes/.DS_Store + // mysite/themes/__MACOSX + // mysite/themes/mytheme.php await validateZipFile( '__fixtures__/custom-deploy/valid-zip.zip' ); expect( exitSpy ).not.toHaveBeenCalled(); @@ -19,14 +28,23 @@ describe( 'vip-app-deploy-validate e2e', () => { it.each( [ { - file: '__fixtures__/custom-deploy/invalid-file.zip', + // Archive: __fixtures__/custom-deploy/invalid-file-chars.zip + // mysite/ + // mysite/themes + // mysite/themes/invalid-file-name?.txt + file: '__fixtures__/custom-deploy/invalid-file-chars.zip', error: `Filename invalid-file-name?.txt contains disallowed characters: [!/:*?"<>|'/^..]+`, }, { + // Archive: __fixtures__/custom-deploy/no-root-folder.zip + // no-root-folder.txt file: '__fixtures__/custom-deploy/no-root-folder.zip', error: `The compressed file must contain a single root directory.`, }, { + // Archive: __fixtures__/custom-deploy/no-themes-folder.zip + // mysite/ + // mysite/file file: '__fixtures__/custom-deploy/no-themes-folder.zip', error: `Missing \`themes\` directory from root folder.`, },