• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

node-casbin / mongoose-adapter / 74
82%

Build:
DEFAULT BRANCH: master
Ran 22 Jun 2020 04:14PM UTC
Jobs 4
Files 3
Run time 18min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
74

push

travis-ci

web-flow
WIP: Synced Adapter (#8)

* feat(newsyncedadapter): add support for synced adapter based on mongodb transactions
- Check that mongodb connection string defines replicaset
- when using setTransaction, check that replica exists
- When saving or loading policies, use session when available
- Add transaction abort and commit functions to abort/save transactioned changes

* improvement: enforce StandardJS, change useTransaction to synced, improve transaction detection

- enforce StandardJS: semicolons removed
- useTransaction changed to useSynced so that it shares the name with adapter and separates it from mongo session transactions
- Use of native `session._serverSession.isTxnActive` -function instead of looking at the error message
- Added function descriptions for all functions

BREAKING CHANGE: Function name changed to separate it from mongo session transactions

* fix(adapter.js:savepolicy): empty model should not throw an MongoError, it should return false

Previously MongoError would have been thrown since it's trying to save an empty list.

* refactor(debug): add a warning when transaction starts or aborts instead of constant debugging

* test(unit/adapter.test.js): add unit tests for missing functions and add lcov reporter to nyc

* test(integration/adapter.test.js:savepolicy): add sinon to improve empty savePolicy testing

* test(integration/adapter.test.js): add more complex model and policy to test populated v0-v4 values

Previous models only populated fields 0-2

* test(integration/adapter.test.js): failing tests for non-synced adapter transactions

* feat(adapter.js): add support for addPolicies and removePolicies in replicaset environments

* feat(.travis.yml): initial replicaset configuration

- Try rs.initiate and then loop over rs.status to check whether replicaset has been configured

* test(helpers.js): change tests to replicaset for now

* test(.travis.yml): try Bottle-Mongo's Travis-CI setup

... (continued)

119 of 170 branches covered (70.0%)

Branch coverage included in aggregate %.

110 of 110 new or added lines in 2 files covered. (100.0%)

155 of 177 relevant lines covered (87.57%)

123.23 hits per line

Jobs
ID Job ID Ran Files Coverage
1 74.1 22 Jun 2020 04:14PM UTC 0
78.96
Travis Job 74.1
2 74.2 22 Jun 2020 04:14PM UTC 0
78.96
Travis Job 74.2
3 74.3 22 Jun 2020 04:14PM UTC 0
78.96
Travis Job 74.3
4 74.4 22 Jun 2020 04:14PM UTC 0
78.96
Travis Job 74.4
Source Files on build 74
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #74
  • 6b46b3a3 on github
  • Prev Build on master (#12)
  • Next Build on master (#77)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc