Skip to content

Add end-to-end testing against real CouchDB#210

Merged
benoitc merged 1 commit into
masterfrom
feature/e2e-couchdb
Jun 9, 2026
Merged

Add end-to-end testing against real CouchDB#210
benoitc merged 1 commit into
masterfrom
feature/e2e-couchdb

Conversation

@benoitc

@benoitc benoitc commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Makes the real-CouchDB suite turnkey to run locally and complete in CI.

Tooling

  • support/run-e2e.sh runs the integration suite one group at a time (each group gets a fresh database, so they stay isolated). Honors COUCHDB_URL / COUCHDB_USER / COUCHDB_PASS.
  • docker-compose.yml + Makefile: make e2e starts CouchDB, runs the suite, and tears it down. make e2e-up / make e2e-down manage it standalone.
  • README documents the unit and e2e commands.

CI coverage

The integration job now runs all 15 suite groups through the shared script. It previously ran only 11; view_ops, design_ops, changes_ops, and error_handling were skipped because they were failing.

Fixed the four skipped groups

These had test bugs, not library bugs:

  • all_docs / view_first: use the include_docs atom option (couchbeam ignores the {include_docs, true} tuple form for views).
  • view_cleanup: view_cleanup/1 returns ok, not {ok, Map}.
  • view_count: count/1 returns a bare integer.
  • view_fold: correct fold/5 argument order and accumulator contract (the function returns the next accumulator; fold returns the final one).
  • error_invalid_doc: open_db/2 is a local operation; assert not_found via db_info/1.

Verification

make e2e passes all 15 groups (64 tests) against CouchDB 3.3; rebar3 eunit stays green (32 tests).

- support/run-e2e.sh: run the integration suite group-by-group (isolation)
  against a CouchDB given by COUCHDB_URL/USER/PASS
- docker-compose.yml + Makefile: `make e2e` starts CouchDB, runs the suite,
  tears it down; `make e2e-up`/`e2e-down` manage it standalone
- CI integration job now runs all 15 suite groups via the shared script
  (was 11; view_ops, design_ops, changes_ops, error_handling were skipped)
- fix the four previously-skipped groups, which had test bugs:
  - all_docs/view_first: use the include_docs atom option, not a tuple
  - view_cleanup: view_cleanup/1 returns ok, not {ok, Map}
  - view_count: count/1 returns a bare integer
  - view_fold: correct fold/5 argument order and accumulator contract
  - error_invalid_doc: open_db/2 is local; assert on db_info instead
- README: document unit and e2e test commands
@benoitc benoitc merged commit 429da31 into master Jun 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant