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

node-casbin / mongoose-adapter / 74 / 2
82%
master: 82%

Build:
DEFAULT BRANCH: master
Ran 22 Jun 2020 04:14PM UTC
Files 3
Run time 7min
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

22 Jun 2020 04:12PM UTC coverage: 78.963% (-0.5%) from 79.487%
74.2

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 %.

155 of 177 relevant lines covered (87.57%)

30.81 hits per line

Source Files on job 74.2
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 28
  • Travis Job 74.2
  • 6b46b3a3 on github
  • Prev Job for on master (#12.1)
  • Next Job for on master (#77.1)
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