Fix the null error that occurs when creating a replicator with source and target strings.
Properly handle repl_id when only source and target parameters exist
Decide on how source and target dictionaries should be passed in (see below)
How
Added null check on target_db before calling .admin_party. Also set 'user_ctx' if the database object's 'creds' exists.
WIP: improve the logic to set repl_id. When source and target parameters exist, the passed in repl_id value is set in source_db. I've added logic to set repl_id = source_db if source and target exist and source_db is a string.
Testing
Added unit tests to verify that source and target string parameters work as expected
If source or target url do not contain credentials, replication_state should equal error since the user is unauthorized
Issues
fixes #337
TODO: Remove replicator doc that currently exists after tests finish.
TODO: How should source and target dictionaries be passed in?
If this below is the expected way, then this will also require fixing as it's not properly handled:
What
null
error that occurs when creating a replicator with source and target strings.repl_id
when onlysource
andtarget
parameters existsource
andtarget
dictionaries should be passed in (see below)How
target_db
before calling.admin_party
. Also set 'user_ctx' if the database object's 'creds' exists.repl_id
. Whensource
andtarget
parameters exist, the passed inrepl_id
value is set insource_db
. I've added logic to setrepl_id
=source_db
ifsource
andtarget
exist andsource_db
is a string.Testing
error
since the user is unauthorizedIssues
fixes #337
TODO: Remove replicator doc that currently exists after tests finish.TODO: How should
source
andtarget
dictionaries be passed in? If this below is the expected way, then this will also require fixing as it's not properly handled: