jkeczan opened a new issue, #322:
URL: https://github.com/apache/couchdb-nano/issues/322
We are having issues with creating replications using
```replication.enable```. The server accepts the request but the replication
document does not contain the correct replication information therefore it
doesn't start
## Expected Behavior
When we call ```replication.enable(source, target, {create_target:
false})```, we expect the source of the replication document to look like the
following:
```
{
"_id": "9d2ad6fedf2c919a28463cef8800086c",
"_rev": "1-1a6c06225aca25efad513b58ee0866bd",
"user_ctx": {
"name": "admin",
"roles": [
"_admin",
"_reader",
"_writer"
]
},
"source": {
"url": "https://test.url.com:5984/soloDB-5-63",
"headers": {
"Authorization": "Basic JIMBOB=="
}
},
"target": {
"url": "mainDB",
"headers": {
"Authorization": "Basic JOHNSMITH=="
}
},
"create_target": false,
"continuous": true,
"owner": "admin"
}
```
## Current Behavior
However, we are currently getting this document instead with the replication
failing to launch and the UI showing it does NOT see any credentials.
```
{
"_id": "7131260c0b1a10fddb66464ce802eb2d",
"_rev": "1-7d100014ab0dc2b18548e06d63f17940",
"continuous": true,
"create_target": false,
"source": "https://user:[email protected]:5984/soloDB-5-27",
"target": "mainDB",
"owner": "admin"
}
```
## Possible Solution
At this point, I do not have a possible solution other than potentially
dropping down to make a custom request. However, I feel like I am doing
something incorrect here and wanted to reach out first.
## Steps to Reproduce (for bugs)
```
const url = 'test.url.com';
const sourceURL = `https://user:pass@${url}/soloDB-5-27`;
const targetURL = `mainDB`;
return database.db.replication.enable(sourceURL, targetURL, {
continuous: true,
create_target: false,
});
```
## Context
Right now, this is preventing me from writing an automated onboarding tool
that creates the database for a user when they are added to our HR databases.
## Your Environment
<!--- Include as many relevant details about the environment you experienced
the bug in -->
* Version used: 10.1.0
* Browser Name and version:
* Operating System and version (desktop or mobile): ECS w/latest Docker Image
* Link to your project: N/A
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]