Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating local_storage folder in API acceptance tests drone CI #32606

Closed
phil-davis opened this issue Sep 6, 2018 · 2 comments
Closed

Creating local_storage folder in API acceptance tests drone CI #32606

phil-davis opened this issue Sep 6, 2018 · 2 comments

Comments

@phil-davis
Copy link
Contributor

Acceptance tests try hard to be "black box" and to use the testing app endpoints to set settings on the server or run occ commands on the server or... They avoid doing things "behind the server's back" so that they do not rely on the server file system being the same file system as where the acceptance test script happens to be running.

Some API acceptance tests need a local_storage folder available, and they mount this into the server ownCloud. The occ commands to mount it are done via the testing, that is all good. But the creation of the local_storage folder is happening "externally":

  • on drone, it happens in the .drone.yml which sets up the server.
  • when running acceptance tests locally, the run.sh script tries to create the folder. That works if you are running in a pure local dev environment with PHP dev server(s) all as your own user name, or if you sudo www-data ./run.sh if your server is running as www-data. But if your server is running as www-data you should still be able to run the acceptance tests as yourself "black box".

We should be able to create local_storage via the testing app endpoints nowadays. Try that.

@ownclouders
Copy link
Contributor

GitMate.io thinks possibly related issues are #22485 (test), #31579 (test), #22492 (test), #30880 (Run API acceptance tests on drone), and #30900 (Run API acceptance tests on drone).

@phil-davis
Copy link
Contributor Author

phil-davis commented Sep 10, 2018

To do, to discuss:

  • what should the local_storage folder be called on the system-under-test? Currently it ends up as tests/acceptance/work/local_storage, but the system-under-test might not even have a tests/acceptance folder. - via the testing app, tests/acceptance/server_tmp/local_storage is created.
  • use the testing app to cleanup the local_storage folder at the end of the testing. Needs testing app support for deleting files/folders.
  • actually do we want to just create the local_storage folder and settings in the BeforeScenario of test scenarios that actually use it? (rather than having it sitting there during every test scenario) - local_storage is setup in the Behat BeforeScenario and removed in the AfterScenario

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants