Skip to content

Commit

Permalink
Integration test: sync event is handled in integration test (IBM#16)
Browse files Browse the repository at this point in the history
Co-authored-by: Rushil <[email protected]>
  • Loading branch information
Rishi-web and Rushil authored May 23, 2022
1 parent c4f708a commit 9b83a50
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/integration/key-protect.v2.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,18 @@ describe('key protect v2 integration', () => {
done();
});

// syncAssociatedResource key should be done 1 hrs after any key operations, so expect to get error
it('syncAssociatedResource', async done => {
try {
const syncParams = Object.assign({}, options);
syncParams.id = keyId;
await keyProtectClient.syncAssociatedResources(syncParams);
} catch (err) {
expect(err.body).toContain('REQ_TOO_EARLY_ERR');
}
done();
});

it('retoreKey', async done => {
// wait for 30 seconds after the key was deleted
await new Promise(r => setTimeout(r, 30000));
Expand Down

0 comments on commit 9b83a50

Please sign in to comment.