From f41f0b9abdc0851b2dd2f265624ba798f3a166de Mon Sep 17 00:00:00 2001 From: Vivek jha <85884487+duckling69@users.noreply.github.com> Date: Fri, 7 Jun 2024 11:22:31 +0000 Subject: [PATCH] add tests Signed-off-by: Vivek jha <85884487+duckling69@users.noreply.github.com> --- packages/generator-caliper/test/benchmark/config.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/generator-caliper/test/benchmark/config.js b/packages/generator-caliper/test/benchmark/config.js index 9c2d6da57..edadde830 100644 --- a/packages/generator-caliper/test/benchmark/config.js +++ b/packages/generator-caliper/test/benchmark/config.js @@ -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;