TO DO:
MUST
- Add unit tests for odorun.sh. Cover all cases for reloading in odorun in unit tests. Does changing model .py work?
- Add smtp4dev to odorun.sh to catch all mails, yet hae a functional mail server - and allow for inspecting mails in dev mode.
SHOULD
- Investigate on how to make logging of odoo model objects convenient for logging/debugging.
- Add -s flag to run slow tests to odounit.sh. By default don't run slow tests.
- Add -m for setting the http port for the smtp4dev mail server.
COULD
- add option -r to make location of requirements.txt file explicit.
- add support for automatically pruning old containers/images/volumes/networks
WILL NOT
- add -a option to auto-install dependencies in automation context?
- Add -q (quiet) flag to suppress output for odorun and odounit.
- Check that reloading the browser on windows/linux can also be automated in odorun :-)
- update code snippet for log suppression to only install filter on appenders that write to STDOUT/STDERR, not to other (file/...) appenders.
DONE:
- Add support for pruning unused images and volumes.
- Investigate icecream package for logging execution / data of code.
- Handle missing requirements.txt
- Encapsulate code to suspend odoo logging during debug in module that is installed.
- remove dependencies check if running in plain mode -> should not complain about figlet / tput / .. not being installed.
- Add support for requirements.txt -> should build a custom docker image with installed dependencies. Hash must include content of requirements.txt.
- Stop pg container on CTRL-C (otherwise it keeps running - not stop after test run - for speed)
- Investigate if Pdb allows PRE / POST handlers to be registered -> disable / enable logging in there?
- Add support for pdb to odorun (like in odounit)
- Added support to use pdb interactively to odounit.
- Added -t option to allow test isolation.
- Added loop-tests.sh script.
- Fix error message when a module is not found in CWD. Add unit test in test suite. (parse_cmd_line function)
- Test fresh install on real ubuntu for odorun.sh AND odounit.sh .
- add -i support for installing additional modules as dependencies
- Add -b for setting a data_b_ase port - so you can point pgadmin at it :)
- add -d (debug) flag to trace scripts for debugging.
- Add documentation for odorun.sh
- Add -a (always) flag to odorun.sh for those that don't trust --web xml,reload.
- Make reloading more robust for odorun. Handle changes to existing xml/.py files using --web and everything else with full reload/recreate.
- Handle / at end of module. Cover in unit test.
- Add technical documentation for odorun.sh
- Remove -d flag from odorun.sh. The scope of the tool is a runner script for developers, not something else.
- Create odorun.sh for running one or more modules inside a docker container.
- Determine default postgres version automatically per version of odoo.
- Add parameter to allow specifying the version of odoo to use. (will require refactoring options handling)
- Add -v for script versioning.
- Add message with command line syntax on how to install dependencies. (sudo apt-get install figlet ... docker.io)
- Add technical docs.
- Update README.md to add user documentation.
- Added set -euo pipefail to make script more robust.
- Rename repository to odoutils.sh.
- Rename test script to odounit.sh.
- --remove should use prefix on container / network same to select, making --remove more robust.
- Add prefix to all container names + network name.
- extract logging into a function.
- Cover functionality with test suite.
- Speed up unit testing.
- Make the script testable.
- add --plain option that does not color/clear/fancy output. This should make testing the script easier.
- add --once parameter to do a single run (no loop).
- exit codes 0 (all tests ok),1 (test failure) and 2 (ambiguous).
- combine remove script into the main script as --delete.
- Rename the dockers to run-odoo-test-* instead of om-hospital-*
- remove the use of --link for connection the database to the odoo docker (deprecated). Should use user-defined bridge network.
- add --tail option to tail /tmp/run-tests-logs.txt
- Add detection of ERROR messages, other than FAIL -> 3rd state for the screen (neutral) (add import in init.py that does not exist -> ERROR - but right now "SUCCESS").
- Do not expose HTTP port for odoo.
- Log output starting at the position of the first FAILED test.
- Add parameter/configuration mechanism to allow specifying what module(s) to test.
- Clean up list of failed tests.
REJECTED
- Make postgres port dynamic.
- Add parameter to allow specifying the version of postgres to use. (will require refactoring options handling)
- Add pgadmin to odorun.sh.
- Find a way to control the order of installation of modules, if we are to put test data in a separate module..