Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
Signed-off-by: Vivek jha <[email protected]>
  • Loading branch information
duckling69 committed Jun 7, 2024
1 parent 307f4d8 commit f41f0b9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/generator-caliper/test/benchmark/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,18 @@ describe ('benchmark configuration generator', () => {
fileContains.should.equal(true);
});

it ('should use the fixed-load controller in config.yaml if user answered "Fixed Load" for rate controller prompt', async () => {
options.txDuration = 30;
options.rateController = 'fixed-load';
await runGenerator();

const config = yaml.safeLoad(fs.readFileSync(tmpConfigPath),'utf8');
const configStr = JSON.stringify(config);
const fileContains = configStr.includes('"type":"fixed-load"');

fileContains.should.equal(true);
});

it ('should ask for the txDuration if user answered "txDuration" for tyType prompt', async () => {
options.txType = 'txDuration';
options.txDuration = 30;
Expand Down

0 comments on commit f41f0b9

Please sign in to comment.