The file post processing logic for virus seems correct.
Test seems to have correct expectations.
The reason for random fails can be timing of results propagation.
Test CI output:
Scenario: list all upload sessions that are currently in postprocessing # /drone/src/tests/acceptance/features/cliCommands/uploadSessions.feature:25
Given the following configs have been set: # OcisConfigContext::theConfigHasBeenSetToValue()
| config | value |
| POSTPROCESSING_STEPS | virusscan |
| ANTIVIRUS_INFECTED_FILE_HANDLING | abort |
And user "Alice" has uploaded file "filesForUpload/filesWithVirus/eicar.com" to "/virusFile.txt" # FeatureContext::userHasUploadedAFileTo()
And the config "POSTPROCESSING_DELAY" has been set to "10s" # OcisConfigContext::theConfigHasBeenSetTo()
And user "Alice" has uploaded file with content "uploaded content" to "/file1.txt" # FeatureContext::userHasUploadedAFileWithContentTo()
And user "Alice" has uploaded file with content "uploaded content" to "/file2.txt" # FeatureContext::userHasUploadedAFileWithContentTo()
When the administrator lists all the upload sessions with flag "processing" # CliContext::theAdministratorListsAllTheUploadSessions()
Then the command should be successful # CliContext::theCommandShouldBeSuccessful()
And the CLI response should contain these entries: # CliContext::theCLIResponseShouldContainTheseEntries()
| file1.txt |
| file2.txt |
And the CLI response should not contain these entries: # CliContext::theCLIResponseShouldContainTheseEntries()
| virusFile.txt |
The resource 'virusFile.txt' was found in the response.
Failed asserting that true is not true.