Add end-to-end testing against real CouchDB#210
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the real-CouchDB suite turnkey to run locally and complete in CI.
Tooling
support/run-e2e.shruns the integration suite one group at a time (each group gets a fresh database, so they stay isolated). HonorsCOUCHDB_URL/COUCHDB_USER/COUCHDB_PASS.docker-compose.yml+Makefile:make e2estarts CouchDB, runs the suite, and tears it down.make e2e-up/make e2e-downmanage it standalone.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, anderror_handlingwere skipped because they were failing.Fixed the four skipped groups
These had test bugs, not library bugs:
all_docs/view_first: use theinclude_docsatom option (couchbeam ignores the{include_docs, true}tuple form for views).view_cleanup:view_cleanup/1returnsok, not{ok, Map}.view_count:count/1returns a bare integer.view_fold: correctfold/5argument order and accumulator contract (the function returns the next accumulator; fold returns the final one).error_invalid_doc:open_db/2is a local operation; assert not_found viadb_info/1.Verification
make e2epasses all 15 groups (64 tests) against CouchDB 3.3;rebar3 eunitstays green (32 tests).