test(billing): odoo-trial Enterprise test runner + plan test-env fix
Local dev Odoo is Community (can't install the module). Add a guest-exec runner that syncs the module to the odoo-trial Enterprise sandbox (VM 316, db trial) and runs --test-enable there; pass = FCB_EXIT=0. Scaffold verified installing on Odoo 19.0 Enterprise (7 fusion_billing_* tables created). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,17 +25,19 @@
|
||||
|
||||
## Test environment
|
||||
|
||||
The module depends on Enterprise modules, so tests run on an instance that has them. Use the dev container (it bind-mounts `Odoo-Modules` at `/mnt/odoo-modules`):
|
||||
**Verified 2026-05-27.** The local dev Odoo (`odoo-modsdev`) is **Community** and CANNOT install this module (no `sale_subscription`/`account_accountant`). Tests run on the **odoo-trial** Enterprise sandbox (Proxmox VM 316, Odoo 19.0 Enterprise, db `trial`), reached via Proxmox guest-exec (VM 316 has no direct SSH — only `qm guest exec` through `pve-worker1`). A committed runner handles sync + test:
|
||||
|
||||
```bash
|
||||
docker exec odoo-modsdev-app odoo -d fusion-dev \
|
||||
-i fusion_centralize_billing --test-enable \
|
||||
--test-tags /fusion_centralize_billing --stop-after-init
|
||||
bash scripts/fcb_test_on_trial.sh
|
||||
```
|
||||
|
||||
- First run uses `-i` (install); later runs use `-u` (upgrade).
|
||||
- **Never** run `--test-enable -u` against production `nexamain`. If the dev instance lacks Enterprise addons, provision a throwaway test DB on `odoo-nexa` and run there.
|
||||
- A task "passes" when the run ends with `0 failed, 0 error(s)` for the module's tags.
|
||||
It tars the module, ships it into odoo-trial's `/opt/odoo/custom-addons/`, then runs
|
||||
`odoo -d trial -u fusion_centralize_billing --no-http --workers 0 --test-enable --test-tags /fusion_centralize_billing --stop-after-init`.
|
||||
|
||||
- **Pass condition:** the output contains `FCB_EXIT=0` (Odoo exits non-zero on any test failure; failures also show as `FAIL`/`ERROR`/assert lines).
|
||||
- The scaffold is already installed on `trial` (7 `fusion_billing_*` tables verified). Each run re-syncs the latest local code and `-u` upgrades it.
|
||||
- **Never** run `--test-enable` against production `nexamain` (odoo-nexa).
|
||||
- Requires SSH access to `pve-worker1` (in the ssh config). Subagents run the same script — they do NOT use `odoo-modsdev` for this module.
|
||||
|
||||
## File structure (this plan)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user