nextcloud / nextcloud/cookbook
Enhance testing of backend
Open
Nobody has claimed this yet.
meta and development
- Dominant language
- HTML
- Stars
- 641
- Forks
- 113
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 26
Description
In the Matrix channel some flaws of the automatic testing were reported:
- I found it necessary to uncomment
PHP_VERSIONin.github/actions/run-tests/docker-compose.ymlin the dut service's build args, or--create-imagesfails- Also had to change PHP_VERSION from 7 to 8, or perl exploded
- I preferred not to install PHP and Composer in my host environment; used docker instead
- After
run-locally --create-imagesyou've got what you need- From cookbook repo dir on host:
docker run -it -w /cookbook --rm -v $PWD:/cookbook --entrypoint composer cookbook_unittesting_fpm install- When running
--create-fixture, I didn't realize initially that the version is a branch or tag in the Nextcloud server repo. It makes sense, but I didn't know, and just settingmasterdoesn't work because Cookbook doesn't expect to run against that version.- If I create a test fixture with sqlite, tests pass the first time only. Subsequent runs have a litany of missing table errors. Using mysql works as expected.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with .github/actions/run-tests/docker-compose.yml and the run-locally paths for --create-images and --create-fixture. Reproduce the reported Docker, PHP version, fixture-version, and SQLite rerun problems, then verify that image creation and repeated fixture-based test runs work without the reported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, mysql, perl, php, sqlite
- Domain
- backend, ci-cd, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100