test: check the XML returned by occ commands in acceptance tests#41655
test: check the XML returned by occ commands in acceptance tests#41655phil-davis wants to merge 4 commits into
Conversation
Before trying to parse the return XML of remote occ commands that are done in the acceptance test setup and teardown script, first check that the string is valid XML. If it is not valid XML, then echo the string to the console so that the problem can be seen.
| if [ "${TEST_WITH_FED_PHPDEVSERVER}" == "true" ] | ||
| then | ||
| # This runs a 2nd server, but serving the code from the same location | ||
| # as the 1st server at TEST_SERVER_URL. It cannot operate reliably, because | ||
| # it will share the filesystem, database etc. | ||
| PORT_FED=$((8180 + ${EXECUTOR_NUMBER})) | ||
| echo ${PORT_FED} | ||
| php -S localhost:${PORT_FED} -t ../.. & | ||
| PHPPID_FED=$! | ||
| echo ${PHPPID_FED} | ||
| export TEST_SERVER_FED_URL="http://localhost:${PORT_FED}" | ||
| fi |
There was a problem hiding this comment.
Note: A developer can run an acceptance test feature locally without having to bother setting up their git clone of the ownCloud classic core repo to be served by Apache. A command like this will run a test scenario:
make test-acceptance-api BEHAT_FEATURE=tests/acceptance/features/apiComments/comments.feature:9
Prior to this change, this run.sh script would start 2 PHP dev server processes. That was to try to simulate having a federated environment. Actually that is usually not effective, because the 2nd PHP dev server is serving from the same git repo as the 1st server. So it ends up with the same config, data, database etc.
So for now, I have change this so that the federated dev server startup only happens if TEST_WITH_FED_PHPDEVSERVER is set to "true".
Probably I will remove this completely in the future, and write different documentation telling how to configure and start a completely separate git clone of the core repo as the 2nd server.
|
https://github.com/owncloud/core/actions/runs/28230268934/job/83632128247?pr=41655 When resetting the app state after running the tests, the name of the app is ending up in the wrong place in the command. It should be at the end. |
Before trying to parse the return XML of remote occ commands that are done in the acceptance test setup and teardown script, first check that the string is valid XML.
If it is not valid XML, then echo the string to the console so that the problem can be seen.