Skip to content

Commit

Permalink
Add test for unlocking KeePass file of support team
Browse files Browse the repository at this point in the history
  • Loading branch information
bkimminich committed Oct 23, 2019
1 parent 0ff9c98 commit ae29cb9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ config/*.yml
!config/7ms.yml
!config/mozilla.yml
!config/unsafe.yml
/.dejavurc
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
"jasmine-core": "^3.4.0",
"jasmine-reporters": "^2.3.2",
"jest": "^24.9.0",
"keepass.io": "^1.1.4",
"mocha": "^6.2.0",
"node-fetch": "2.1.2",
"nyc": "^14.1.1",
Expand Down
16 changes: 16 additions & 0 deletions test/server/keePassSpec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const chai = require('chai')
const expect = chai.expect

const path = require('path')
const kpio = require('keepass.io')

describe('keePass', () => {
it('should unlock support team KeePass file with photo of readheaded call center employee', (done) => {
const db = new kpio.Database()
db.addCredential(new kpio.Credentials.Keyfile(path.join(__dirname, '../../frontend/src/assets/public/images/carousel/6.jpg')))
db.loadFile(path.join(__dirname, '../../ftp/incident-support.kdbx'), function (err) {
expect(err).to.equal(undefined)
return done()
})
})
})

0 comments on commit ae29cb9

Please sign in to comment.