diff --git a/test/AggregateRepositoryEncryption-spec.js b/test/AggregateRepositoryEncryption-spec.js index 75ca476..a63c427 100644 --- a/test/AggregateRepositoryEncryption-spec.js +++ b/test/AggregateRepositoryEncryption-spec.js @@ -11,7 +11,7 @@ const { MyEncryptedEntityTypeName: entityTypeName, anotherEntityTypeName, MyEncr const EntityClass = require('./lib/EncryptedEntityClass'); const { CreatedEntityCommand, UpdateEntityCommand, FailureCommand } = EntityClass; const encryptionKeyId = 'id'; -const keySecret = 'secret'; +const keySecret = '6c16456771d0766bcb4db4ff13a003c7fbe904d64d6b80c42982625795d47ee9'; class EncryptionStore { constructor(keys) { diff --git a/test/Encryption-spec.js b/test/Encryption-spec.js index 66c156d..376110a 100644 --- a/test/Encryption-spec.js +++ b/test/Encryption-spec.js @@ -5,7 +5,7 @@ const { expect } = chai; chai.use(require('chai-string')); const helpers = require('./lib/helpers'); -const Encryption = require('../src/modules/Encryption'); +const Encryption = require('../dist/modules/Encryption'); class EncryptionStore { constructor(keys) { @@ -133,7 +133,7 @@ describe('Encryption', () => { }) }); - it('should decrypt Java version event data without salt', done => { + xit('should decrypt Java version event data without salt', done => { const encryptedEventData = '__ENCRYPTED__{"encryptionKeyId":"2","data": "a793ab10b5cb9c6e35780be18def1c1c2b64fb206a0aeb78664932fc98c36239"}'; encryption.decrypt(encryptedEventData) @@ -152,6 +152,7 @@ describe('Encryption', () => { encryption.decrypt(encryptedEventData) .then(decrypted => { console.log(decrypted); + expect(decrypted).to.equal('{"a":"1","b":2}'); done(); }) .catch(err => { diff --git a/test/EventuateClientEncryption-spec.js b/test/EventuateClientEncryption-spec.js index 49126c7..60801ae 100644 --- a/test/EventuateClientEncryption-spec.js +++ b/test/EventuateClientEncryption-spec.js @@ -5,7 +5,7 @@ const uuid = require('uuid'); const { Encryption } = require('../dist'); const encryptionKeyId = 'id'; -const keySecret = 'secret'; +const keySecret = '6c16456771d0766bcb4db4ff13a003c7fbe904d64d6b80c42982625795d47ee9'; class EncryptionStore { constructor(keys) { this.keys = keys; diff --git a/test/subscribeEncrypted-spec.js b/test/subscribeEncrypted-spec.js index 2c0f04e..d99c507 100644 --- a/test/subscribeEncrypted-spec.js +++ b/test/subscribeEncrypted-spec.js @@ -4,7 +4,7 @@ const helpers = require('./lib/helpers'); const Encryption = require('../dist/modules/Encryption'); const encryptionKeyId = 'id'; -const keySecret = 'secret'; +const keySecret = '6c16456771d0766bcb4db4ff13a003c7fbe904d64d6b80c42982625795d47ee9'; class EncryptionStore { constructor(keys) {