This is an automated email from the ASF dual-hosted git repository. jan pushed a commit to branch 3.3.x in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 181b809dd536ba874942f2ba1c44c672f25d258c Author: Jay Doane <[email protected]> AuthorDate: Wed Jan 4 10:06:33 2023 -0800 Add test coverage for replicator user_ctx parser This adds a test to cover the case when a replication doc contains a user_ctx, and subsequently executes `get_json_value/3`. See: https://github.com/apache/couchdb/pull/4343 --- src/couch_replicator/src/couch_replicator_parse.erl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/couch_replicator/src/couch_replicator_parse.erl b/src/couch_replicator/src/couch_replicator_parse.erl index 8cad4d9a3..e4c0c0211 100644 --- a/src/couch_replicator/src/couch_replicator_parse.erl +++ b/src/couch_replicator/src/couch_replicator_parse.erl @@ -583,6 +583,13 @@ check_convert_options_fail_test() -> convert_options([{<<"query_params">>, 42}]) ). +rep_user_ctx_test() -> + RepDoc = {[{<<"user_ctx">>, {[]}}]}, + ?assertEqual( + #user_ctx{name = null, roles = [], handler = undefined}, + rep_user_ctx(RepDoc) + ). + local_replication_endpoint_error_test_() -> { foreach,
