From 786439761992711f1af3064e48279e638571dae4 Mon Sep 17 00:00:00 2001 From: Jonathan Shook Date: Thu, 10 Feb 2022 15:11:11 -0600 Subject: [PATCH] improve template var expansion test --- .../engine/cli/NBCLIScenarioParserTemplateVarTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/engine-cli/src/test/java/io/nosqlbench/engine/cli/NBCLIScenarioParserTemplateVarTest.java b/engine-cli/src/test/java/io/nosqlbench/engine/cli/NBCLIScenarioParserTemplateVarTest.java index 51e9bd960..9bdb05ea4 100644 --- a/engine-cli/src/test/java/io/nosqlbench/engine/cli/NBCLIScenarioParserTemplateVarTest.java +++ b/engine-cli/src/test/java/io/nosqlbench/engine/cli/NBCLIScenarioParserTemplateVarTest.java @@ -38,8 +38,16 @@ public class NBCLIScenarioParserTemplateVarTest { OpTemplate optpl1 = workload1.getStmts().get(0); System.out.println("op from cmd1:"+optpl1); assertThat(optpl1.getStmt()).contains("cycle {cycle} overridden overridden\n"); + } - + @Test + public void testThatAdditionalCLIParamIsAdded() { + NBCLIOptions opts = new NBCLIOptions(new String[]{"local/example-scenarios-templatevars", "tvar3=tval3"}); + List cmds = opts.getCommands(); + cmds.forEach(System.out::println); + assertThat(cmds).hasSize(2); + assertThat(cmds.get(0).getParams().get("tvar3")).isEqualTo("tval3"); + assertThat(cmds.get(1).getParams().get("tvar3")).isEqualTo("tval3"); } }