|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="AdminAwsS3SyncZeroByteFilesTest"> |
| 12 | + <annotations> |
| 13 | + <features value="AwsS3"/> |
| 14 | + <stories value="zero byte files are synced"/> |
| 15 | + <title value="S3 - Verify zero byte files are synced"/> |
| 16 | + <description value="Verifies that zero byte files are synced to AWS S3 with error."/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="AC-8252"/> |
| 19 | + <useCaseId value="ACP2E-1608"/> |
| 20 | + <group value="remote_storage_aws_s3"/> |
| 21 | + <group value="skip_in_cloud_native_s3"/> |
| 22 | + <group value="remote_storage_disabled"/> |
| 23 | + </annotations> |
| 24 | + |
| 25 | + <before> |
| 26 | + <!-- Enable AWS S3 Remote Storage & Sync --> |
| 27 | + <magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage"/> |
| 28 | + <!-- Copy Images to Import Directory for Product Images --> |
| 29 | + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="copy" stepKey="copyProductBaseImage"> |
| 30 | + <argument name="source">dev/tests/acceptance/tests/_data/empty.jpg</argument> |
| 31 | + <argument name="destination">pub/media/empty.jpg</argument> |
| 32 | + </helper> |
| 33 | + </before> |
| 34 | + |
| 35 | + <after> |
| 36 | + <!-- Delete Images on Local File System --> |
| 37 | + <helper class="Magento\Catalog\Test\Mftf\Helper\LocalFileAssertions" method="deleteFileIfExists" stepKey="deleteLocalImage"> |
| 38 | + <argument name="filePath">pub/media/empty.jpg</argument> |
| 39 | + </helper> |
| 40 | + <!-- Delete Images on S3 System --> |
| 41 | + <helper class="Magento\AwsS3\Test\Mftf\Helper\S3FileAssertions" method="deleteFileIfExists" stepKey="deleteS3Image"> |
| 42 | + <argument name="filePath">pub/media/empty.jpg</argument> |
| 43 | + </helper> |
| 44 | + <!-- Disable AWS S3 Remote Storage --> |
| 45 | + <magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage"/> |
| 46 | + </after> |
| 47 | + <magentoCLI command="remote-storage:sync" timeout="120" stepKey="syncRemoteStorage"/> |
| 48 | + <assertEquals stepKey="assertConfigTest"> |
| 49 | + <expectedResult type="string">Uploading media files to remote storage.\n- empty.jpg\nEnd of upload.</expectedResult> |
| 50 | + <actualResult type="variable">$syncRemoteStorage</actualResult> |
| 51 | + </assertEquals> |
| 52 | + |
| 53 | + </test> |
| 54 | +</tests> |
0 commit comments