Restore full htdocs state during CI testing
Tests performed by the WebDAV suite include mutations to the entities on the HTTPD. However, to write proper test functions, the entity state must be exactly the one prepared in the bundle's/confguration image's Dockerfile.
The reset_mutated
auto-fixture is responsible to restoring the entity state to the one described by the files
and directories
passed to set_up_suite
.
However, not all actions can be reversed via WebDAV alone.
Permission bits in the filesystem cannot be restored, in particular.
With !3 (merged), this got even more difficult because files and directories may appear multiple times with different auth information and permissions in general are getting even more important.
A better approach would be to fully restore the htdocs directory within the HTTPD image instead of resetting via WebDAV. This would require triggering a "restoration script" via a network call. The restoration script could just delete the htdocs directory/its contents and copy in the files from an origin location.
There are many ways to perform network calls to a container, but as the container already contains the HTTPD program, this may be the best way to go. A second HTTPD server configuration would have to be prepared and started in the background. This server could mod_cgi to call a shell script.
We need a second server, because the primary server under test should have the fewest possible adjustment and the restoration server requires full root privileges to copy files and permissions.
/cc @cw296