Details
-
Improvement
-
Resolution: Fixed
-
None
-
High
-
ENHANCEMENT: prevent calling the API-test CLI-command to be used with root-rights
-
Empty show more show less
Description
Currently, very often tests on master fail because of some sort of problems with user data. There should be a possibility, to clean/renew the user-data folder (defined as APPLICATION_DATA) completely before renewing the database (what is done before a run of all tests). There are several problems & requirements to meet:
APPLICATION_DATA may be set after the Database-recreation in the test-command (investigate). HINT: when using the virtual test-db, APPLICATION_DATA points to /testdataCode should become a base-class (e.g. ZfExtended/UserData.php)/locales folder inside APPLICATION_DATA must be stored elsewhere (/locales ?) until we have reworked the languages stuffIf deletion fails due to non-deletable stuff (>owned by root) a precise exception must be thrown-.gitignore, .htaccess, /visual/.htaccess must either be excepted from cleanup or recreated. Also, the .gitignore logic should be changed to use just one .gitignore in the folder/visual, /logs, /tmp, /cache, /backup must be added as empty folders ORthere are accessor functions for those subfolders automatically creating them on use and used throughout the code (preferred solution)
After discussion with Thomas, the issue is simpler: We simply prevent test-calls with root-rights or users, that cannot read/write the /data directory