removed test virus files from repo (#1812)
* remove virus file from repo * doenload zip file * adjust tests
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ exclude_paths:
|
|||||||
- 'tests/acceptance/expected-failures-*.md'
|
- 'tests/acceptance/expected-failures-*.md'
|
||||||
- 'tests/acceptance/bootstrap/**'
|
- 'tests/acceptance/bootstrap/**'
|
||||||
- 'tests/acceptance/TestHelpers/**'
|
- 'tests/acceptance/TestHelpers/**'
|
||||||
- 'tests/acceptance/run.sh'
|
- 'tests/acceptance/scripts/run.sh'
|
||||||
- 'vendor/**/*'
|
- 'vendor/**/*'
|
||||||
- 'tests/ocwrapper/vendor/**'
|
- 'tests/ocwrapper/vendor/**'
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ vendor-php
|
|||||||
# API acceptance tests - auto-generated files
|
# API acceptance tests - auto-generated files
|
||||||
.php-cs-fixer.cache
|
.php-cs-fixer.cache
|
||||||
suite-logs
|
suite-logs
|
||||||
|
tests/acceptance/filesForUpload/filesWithVirus/
|
||||||
|
|
||||||
# QA activity reports
|
# QA activity reports
|
||||||
tests/qa-activity-report/reports/
|
tests/qa-activity-report/reports/
|
||||||
|
|||||||
+20
-7
@@ -233,6 +233,7 @@ config = {
|
|||||||
],
|
],
|
||||||
"skip": False,
|
"skip": False,
|
||||||
"antivirusNeeded": True,
|
"antivirusNeeded": True,
|
||||||
|
"generateVirusFiles": True,
|
||||||
"extraServerEnvironment": {
|
"extraServerEnvironment": {
|
||||||
"ANTIVIRUS_SCANNER_TYPE": "clamav",
|
"ANTIVIRUS_SCANNER_TYPE": "clamav",
|
||||||
"ANTIVIRUS_CLAMAV_SOCKET": "tcp://clamav:3310",
|
"ANTIVIRUS_CLAMAV_SOCKET": "tcp://clamav:3310",
|
||||||
@@ -299,6 +300,7 @@ config = {
|
|||||||
"skip": False,
|
"skip": False,
|
||||||
"withRemotePhp": [True],
|
"withRemotePhp": [True],
|
||||||
"antivirusNeeded": True,
|
"antivirusNeeded": True,
|
||||||
|
"generateVirusFiles": True,
|
||||||
"extraServerEnvironment": {
|
"extraServerEnvironment": {
|
||||||
"ANTIVIRUS_SCANNER_TYPE": "clamav",
|
"ANTIVIRUS_SCANNER_TYPE": "clamav",
|
||||||
"ANTIVIRUS_CLAMAV_SOCKET": "tcp://clamav:3310",
|
"ANTIVIRUS_CLAMAV_SOCKET": "tcp://clamav:3310",
|
||||||
@@ -1016,6 +1018,7 @@ def localApiTestPipeline(ctx):
|
|||||||
"withRemotePhp": with_remote_php,
|
"withRemotePhp": with_remote_php,
|
||||||
"enableWatchFs": enable_watch_fs,
|
"enableWatchFs": enable_watch_fs,
|
||||||
"ldapNeeded": False,
|
"ldapNeeded": False,
|
||||||
|
"generateVirusFiles": False,
|
||||||
}
|
}
|
||||||
|
|
||||||
if "localApiTests" in config:
|
if "localApiTests" in config:
|
||||||
@@ -1040,7 +1043,7 @@ def localApiTestPipeline(ctx):
|
|||||||
(opencloudServer(storage, params["accounts_hash_difficulty"], deploy_type = "federation", extra_server_environment = params["extraServerEnvironment"], watch_fs_enabled = run_with_watch_fs_enabled) if params["federationServer"] else []) +
|
(opencloudServer(storage, params["accounts_hash_difficulty"], deploy_type = "federation", extra_server_environment = params["extraServerEnvironment"], watch_fs_enabled = run_with_watch_fs_enabled) if params["federationServer"] else []) +
|
||||||
((wopiCollaborationService("fakeoffice") + wopiCollaborationService("collabora") + wopiCollaborationService("onlyoffice")) if params["collaborationServiceNeeded"] else []) +
|
((wopiCollaborationService("fakeoffice") + wopiCollaborationService("collabora") + wopiCollaborationService("onlyoffice")) if params["collaborationServiceNeeded"] else []) +
|
||||||
(openCloudHealthCheck("wopi", ["wopi-collabora:9304", "wopi-onlyoffice:9304", "wopi-fakeoffice:9304"]) if params["collaborationServiceNeeded"] else []) +
|
(openCloudHealthCheck("wopi", ["wopi-collabora:9304", "wopi-onlyoffice:9304", "wopi-fakeoffice:9304"]) if params["collaborationServiceNeeded"] else []) +
|
||||||
localApiTests(name, params["suites"], storage, params["extraTestEnvironment"], run_with_remote_php) +
|
localApiTests(name, params["suites"], storage, params["extraTestEnvironment"], run_with_remote_php, params["generateVirusFiles"]) +
|
||||||
logRequests(),
|
logRequests(),
|
||||||
"services": (emailService() if params["emailNeeded"] else []) +
|
"services": (emailService() if params["emailNeeded"] else []) +
|
||||||
(clamavService() if params["antivirusNeeded"] else []) +
|
(clamavService() if params["antivirusNeeded"] else []) +
|
||||||
@@ -1060,7 +1063,7 @@ def localApiTestPipeline(ctx):
|
|||||||
pipelines.append(pipeline)
|
pipelines.append(pipeline)
|
||||||
return pipelines
|
return pipelines
|
||||||
|
|
||||||
def localApiTests(name, suites, storage = "decomposed", extra_environment = {}, with_remote_php = False):
|
def localApiTests(name, suites, storage = "decomposed", extra_environment = {}, with_remote_php = False, generate_virus_files = False):
|
||||||
test_dir = "%s/tests/acceptance" % dirs["base"]
|
test_dir = "%s/tests/acceptance" % dirs["base"]
|
||||||
expected_failures_file = "%s/expected-failures-localAPI-on-%s-storage.md" % (test_dir, storage)
|
expected_failures_file = "%s/expected-failures-localAPI-on-%s-storage.md" % (test_dir, storage)
|
||||||
|
|
||||||
@@ -1083,15 +1086,25 @@ def localApiTests(name, suites, storage = "decomposed", extra_environment = {},
|
|||||||
for item in extra_environment:
|
for item in extra_environment:
|
||||||
environment[item] = extra_environment[item]
|
environment[item] = extra_environment[item]
|
||||||
|
|
||||||
|
commands = []
|
||||||
|
|
||||||
|
# Generate EICAR virus test files if needed
|
||||||
|
if generate_virus_files:
|
||||||
|
commands.append("chmod +x %s/tests/acceptance/scripts/generate-virus-files.sh" % dirs["base"])
|
||||||
|
commands.append("bash %s/tests/acceptance/scripts/generate-virus-files.sh" % dirs["base"])
|
||||||
|
|
||||||
|
# Merge expected failures
|
||||||
|
if not with_remote_php:
|
||||||
|
commands.append("cat %s/expected-failures-without-remotephp.md >> %s" % (test_dir, expected_failures_file))
|
||||||
|
|
||||||
|
# Run tests
|
||||||
|
commands.append("make -C %s test-acceptance-api" % (dirs["base"]))
|
||||||
|
|
||||||
return [{
|
return [{
|
||||||
"name": "localApiTests-%s" % name,
|
"name": "localApiTests-%s" % name,
|
||||||
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
|
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
|
||||||
"environment": environment,
|
"environment": environment,
|
||||||
"commands": [
|
"commands": commands,
|
||||||
# merge the expected failures
|
|
||||||
"" if with_remote_php else "cat %s/expected-failures-without-remotephp.md >> %s" % (test_dir, expected_failures_file),
|
|
||||||
"make -C %s test-acceptance-api" % (dirs["base"]),
|
|
||||||
],
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def cs3ApiTests(ctx, storage, accounts_hash_difficulty = 4):
|
def cs3ApiTests(ctx, storage, accounts_hash_difficulty = 4):
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ BEHAT_BIN=vendor-bin/behat/vendor/bin/behat
|
|||||||
|
|
||||||
.PHONY: test-acceptance-api
|
.PHONY: test-acceptance-api
|
||||||
test-acceptance-api: vendor-bin/behat/vendor
|
test-acceptance-api: vendor-bin/behat/vendor
|
||||||
BEHAT_BIN=$(BEHAT_BIN) tests/acceptance/run.sh
|
BEHAT_BIN=$(BEHAT_BIN) tests/acceptance/scripts/run.sh
|
||||||
|
|
||||||
vendor/bamarni/composer-bin-plugin: composer.lock
|
vendor/bamarni/composer-bin-plugin: composer.lock
|
||||||
composer install
|
composer install
|
||||||
|
|||||||
@@ -477,6 +477,15 @@ For antivirus running localy on Linux OS, use `ANTIVIRUS_CLAMAV_SOCKET= "/var/ru
|
|||||||
For antivirus running localy on Mac OS, use `ANTIVIRUS_CLAMAV_SOCKET= "/tmp/clamd.sock"`.
|
For antivirus running localy on Mac OS, use `ANTIVIRUS_CLAMAV_SOCKET= "/tmp/clamd.sock"`.
|
||||||
For antivirus running with docker, use `ANTIVIRUS_CLAMAV_SOCKET= "tcp://host.docker.internal:3310"`
|
For antivirus running with docker, use `ANTIVIRUS_CLAMAV_SOCKET= "tcp://host.docker.internal:3310"`
|
||||||
|
|
||||||
|
### Create virus files
|
||||||
|
|
||||||
|
The antivirus tests require EICAR test files which are not stored in the repository
|
||||||
|
They are generated dynamically when needed for testing.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
tests/acceptance/scripts/generate-virus-files.sh
|
||||||
|
```
|
||||||
|
|
||||||
#### Run the Acceptance Test
|
#### Run the Acceptance Test
|
||||||
|
|
||||||
Run the acceptance test with the following command:
|
Run the acceptance test with the following command:
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ Feature: antivirus
|
|||||||
And as "Alice" file "<new-file-name>" should not exist
|
And as "Alice" file "<new-file-name>" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | file-name | new-file-name | message |
|
| dav-path-version | file-name | new-file-name | message |
|
||||||
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
|
|
||||||
|
|
||||||
@@ -65,11 +65,11 @@ Feature: antivirus
|
|||||||
"""
|
"""
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | file-name | new-file-name | message |
|
| dav-path-version | file-name | new-file-name | message |
|
||||||
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
|
|
||||||
|
|
||||||
@@ -111,11 +111,11 @@ Feature: antivirus
|
|||||||
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | file-name | new-file-name | message |
|
| dav-path-version | file-name | new-file-name | message |
|
||||||
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
|
|
||||||
@issue-10331
|
@issue-10331
|
||||||
@@ -137,11 +137,11 @@ Feature: antivirus
|
|||||||
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | file-name | new-file-name | message |
|
| dav-path-version | file-name | new-file-name | message |
|
||||||
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
|
|
||||||
|
|
||||||
@@ -165,11 +165,11 @@ Feature: antivirus
|
|||||||
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | file-name | new-file-name | message |
|
| dav-path-version | file-name | new-file-name | message |
|
||||||
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
|
|
||||||
|
|
||||||
@@ -195,11 +195,11 @@ Feature: antivirus
|
|||||||
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
And as "Alice" file "/uploadFolder/<new-file-name>" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | file-name | new-file-name | message |
|
| dav-path-version | file-name | new-file-name | message |
|
||||||
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| old | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| old | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| new | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| new | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| spaces | eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| spaces | eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
|
|
||||||
|
|
||||||
@@ -224,7 +224,7 @@ Feature: antivirus
|
|||||||
| /<new-file-name> |
|
| /<new-file-name> |
|
||||||
Examples:
|
Examples:
|
||||||
| file-name | new-file-name | message |
|
| file-name | new-file-name | message |
|
||||||
| eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
|
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ Feature: antivirus
|
|||||||
| /<new-file-name> |
|
| /<new-file-name> |
|
||||||
Examples:
|
Examples:
|
||||||
| file-name | new-file-name | message |
|
| file-name | new-file-name | message |
|
||||||
| eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Eicar-Signature |
|
| eicar.com | virusFile1.txt | Virus found in virusFile1.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
| eicar_com.zip | virusFile2.zip | Virus found in virusFile2.zip. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
|
|
||||||
@env-config @issue-6494
|
@env-config @issue-6494
|
||||||
@@ -273,7 +273,7 @@ Feature: antivirus
|
|||||||
Then the HTTP status code should be "201"
|
Then the HTTP status code should be "201"
|
||||||
And user "Alice" should get a notification with subject "Virus found" and message:
|
And user "Alice" should get a notification with subject "Virus found" and message:
|
||||||
| message |
|
| message |
|
||||||
| Virus found in aFileWithVirus.txt. Upload not possible. Virus: Eicar-Signature |
|
| Virus found in aFileWithVirus.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
And as "Alice" file "/aFileWithVirus.txt" should not exist
|
And as "Alice" file "/aFileWithVirus.txt" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version |
|
| dav-path-version |
|
||||||
@@ -305,13 +305,13 @@ Feature: antivirus
|
|||||||
| <message> |
|
| <message> |
|
||||||
And as "Alice" file "/aFileWithVirus.txt" should not exist
|
And as "Alice" file "/aFileWithVirus.txt" should not exist
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version | language | subject | message |
|
| dav-path-version | language | subject | message |
|
||||||
| old | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: Eicar-Signature |
|
| old | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| new | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: Eicar-Signature |
|
| new | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: Eicar-Signature |
|
| spaces | es | Virus encontrado | Virus encontrado en aFileWithVirus.txt. La subida no ha sido posible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
| old | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: Eicar-Signature |
|
| old | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: Win.Test.EICAR_HDB-1 |
|
||||||
| new | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: Eicar-Signature |
|
| new | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: Win.Test.EICAR_HDB-1 |
|
||||||
| spaces | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: Eicar-Signature |
|
| spaces | de | Virus gefunden | In aFileWithVirus.txt wurde potenziell schädlicher Code gefunden. Das Hochladen wurde abgebrochen. Grund: Win.Test.EICAR_HDB-1 |
|
||||||
|
|
||||||
@issue-enterprise-5709
|
@issue-enterprise-5709
|
||||||
Scenario Outline: try to create a version of file by uploading virus content
|
Scenario Outline: try to create a version of file by uploading virus content
|
||||||
@@ -477,7 +477,7 @@ Feature: antivirus
|
|||||||
When user "Brian" uploads a file "filesForUpload/filesWithVirus/eicar.com" to "text.txt" in space "new-space" using the WebDAV API
|
When user "Brian" uploads a file "filesForUpload/filesWithVirus/eicar.com" to "text.txt" in space "new-space" using the WebDAV API
|
||||||
Then the HTTP status code should be "204"
|
Then the HTTP status code should be "204"
|
||||||
And user "Brian" should get a notification with subject "Virus found" and message:
|
And user "Brian" should get a notification with subject "Virus found" and message:
|
||||||
| message |
|
| message |
|
||||||
| Virus found in text.txt. Upload not possible. Virus: Eicar-Signature |
|
| Virus found in text.txt. Upload not possible. Virus: Win.Test.EICAR_HDB-1 |
|
||||||
And for user "Brian" the content of the file "/text.txt" of the space "new-space" should be "hello world"
|
And for user "Brian" the content of the file "/text.txt" of the space "new-space" should be "hello world"
|
||||||
And for user "Alice" the content of the file "/text.txt" of the space "new-space" should be "hello world"
|
And for user "Alice" the content of the file "/text.txt" of the space "new-space" should be "hello world"
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
|
|
||||||
Binary file not shown.
+19
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# tests/acceptance/scripts/generate-virus-files.sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
TARGET_DIR="$SCRIPT_DIR/../filesForUpload/filesWithVirus"
|
||||||
|
|
||||||
|
echo "Generating EICAR test files..."
|
||||||
|
|
||||||
|
mkdir -p "$TARGET_DIR"
|
||||||
|
|
||||||
|
cd "$TARGET_DIR"
|
||||||
|
|
||||||
|
echo "Downloading eicar.com..."
|
||||||
|
curl -s -o eicar.com https://secure.eicar.org/eicar.com
|
||||||
|
|
||||||
|
echo "Downloading eicar_com.zip..."
|
||||||
|
curl -s -o eicar_com.zip https://secure.eicar.org/eicar_com.zip
|
||||||
@@ -11,7 +11,7 @@ echo 'Script path: '${SCRIPT_PATH}
|
|||||||
# This gives flexibility for callers that have installed their own behat
|
# This gives flexibility for callers that have installed their own behat
|
||||||
if [ -z "${BEHAT_BIN}" ]
|
if [ -z "${BEHAT_BIN}" ]
|
||||||
then
|
then
|
||||||
BEHAT=${SCRIPT_PATH}/../../vendor-bin/behat/vendor/bin/behat
|
BEHAT=${SCRIPT_PATH}/../../../vendor-bin/behat/vendor/bin/behat
|
||||||
else
|
else
|
||||||
BEHAT=${BEHAT_BIN}
|
BEHAT=${BEHAT_BIN}
|
||||||
fi
|
fi
|
||||||
Reference in New Issue
Block a user