The test TestReportService.testReportToIllegalPathThrowsReportExpection fails when running in Docker since the process capabilityCAP_DAC_OVERRIDE is set.
This occurs for example if someone tries to install OFT directly by cloning the GH repository in a Docker container. One of the integration tests requires that a r/o file is created in order to force an exception when writing a report. Since the CAP_DAC_OVERRIDE is set, marking a file as r/o is simply ignored.
While that is a shortcoming on the Docker-side of the problem and installation from a Git clone is not the best idea, we still should skip the test in this scenario for maximum compatibility.
Description
The test
TestReportService.testReportToIllegalPathThrowsReportExpection
fails when running in Docker since the process capabilityCAP_DAC_OVERRIDE
is set.This occurs for example if someone tries to install OFT directly by cloning the GH repository in a Docker container. One of the integration tests requires that a r/o file is created in order to force an exception when writing a report. Since the
CAP_DAC_OVERRIDE
is set, marking a file as r/o is simply ignored.While that is a shortcoming on the Docker-side of the problem and installation from a Git clone is not the best idea, we still should skip the test in this scenario for maximum compatibility.
You can verify this outside of OFT by issuing
This should fail, but it runs just fine.
If you enter
you get
Steps to Reproduce
openfasttrace
Expected behavior
Test succeeds or is skipped.
Environment