[x] Added tests for code changes or test/build only changes
[x] Updated the change log file (CHANGES.md) or test/build only changes
[x] Completed the PR template below:
Description
Change the test server configuration and allow for overriding the token server used by tests.
Fix Cloudant.bluemix() handling of username/account.
1. Steps to reproduce and the simplest code sample possible to demonstrate the issue
Run Jenkins with a custom IAM token server.
2. What you expected to happen
Tests to pass.
3. What actually happened
Test failures.
Approach
Add IAM_TOKEN_URL environment variable to IAM test runs
Add new env vars and cred IDs to Jenkinsfile - use DB_URL instead of CLOUDANT_ACCOUNT
Fix tests to work with above (see "Testing" below)
The Cloudant.bluemix() function was assuming that the username was the account name. This does not work with the new style account credentials where username does not match account name. The URL was already being correctly provided, so just use None as the account name instead.
Schema & API Changes
"No change"
Security and Privacy
"No change"
Testing
Modified existing tests because many made the assumption they would be run with CLOUDANT_ACCOUNT instead of a service URL.
Test run is on the whole pretty stable except:
replication tests which appear to have exposed a regression in Cloudant. I've temporarily disabled checking on replication progress via scheduler docs on this branch to demonstrate that these changes are good pending resolution of that server side problem.
periodically exceeding the rate limit on the account
Checklist
CHANGES.md
) or test/build only changesDescription
Change the test server configuration and allow for overriding the token server used by tests. Fix
Cloudant.bluemix()
handling of username/account.1. Steps to reproduce and the simplest code sample possible to demonstrate the issue
Run Jenkins with a custom IAM token server.
2. What you expected to happen
Tests to pass.
3. What actually happened
Test failures.
Approach
IAM_TOKEN_URL
environment variable to IAM test runsJenkinsfile
- useDB_URL
instead ofCLOUDANT_ACCOUNT
The
Cloudant.bluemix()
function was assuming that the username was the account name. This does not work with the new style account credentials where username does not match account name. The URL was already being correctly provided, so just useNone
as the account name instead.Schema & API Changes
Security and Privacy
Testing
CLOUDANT_ACCOUNT
instead of a service URL.Test run is on the whole pretty stable except:
Monitoring and Logging