-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adapt lifecycle tests to support transition topic
Issue: BB-467
- Loading branch information
Showing
9 changed files
with
97 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
tests/unit/lifecycle/LifecycleObjectExpirationProcessor.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const assert = require('assert'); | ||
const config = require('../../config.json'); | ||
const LifecycleObjectExpirationProcessor = | ||
require('../../../extensions/lifecycle/objectProcessor/LifecycleObjectExpirationProcessor'); | ||
|
||
describe('LifecycleObjectExpirationProcessor', () => { | ||
let objectProcessor; | ||
|
||
beforeEach(() => { | ||
objectProcessor = new LifecycleObjectExpirationProcessor( | ||
config.zookeeper, | ||
config.kafka, | ||
config.extensions.lifecycle, | ||
config.s3, | ||
); | ||
}); | ||
|
||
it('should contain object tasks topic in consumer params', () => { | ||
const consumerParams = objectProcessor.getConsumerParams(); | ||
assert.deepStrictEqual(Object.keys(consumerParams), [config.extensions.lifecycle.objectTasksTopic]); | ||
assert.strictEqual( | ||
consumerParams[config.extensions.lifecycle.objectTasksTopic].topic, | ||
config.extensions.lifecycle.objectTasksTopic, | ||
); | ||
}); | ||
}); |
26 changes: 26 additions & 0 deletions
26
tests/unit/lifecycle/LifecycleObjectTransitionProcessor.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const assert = require('assert'); | ||
const config = require('../../config.json'); | ||
const LifecycleObjectTransitionProcessor = | ||
require('../../../extensions/lifecycle/objectProcessor/LifecycleObjectTransitionProcessor'); | ||
|
||
describe('LifecycleObjectExpirationProcessor', () => { | ||
let objectProcessor; | ||
|
||
beforeEach(() => { | ||
objectProcessor = new LifecycleObjectTransitionProcessor( | ||
config.zookeeper, | ||
config.kafka, | ||
config.extensions.lifecycle, | ||
config.s3, | ||
); | ||
}); | ||
|
||
it('should contain transition tasks topic in consumer params', () => { | ||
const consumerParams = objectProcessor.getConsumerParams(); | ||
assert.deepStrictEqual(Object.keys(consumerParams), [config.extensions.lifecycle.transitionTasksTopic]); | ||
assert.strictEqual( | ||
consumerParams[config.extensions.lifecycle.transitionTasksTopic].topic, | ||
config.extensions.lifecycle.transitionTasksTopic | ||
); | ||
}); | ||
}); |