allow template params to remain in expanded command

This commit is contained in:
Jonathan Shook
2022-01-19 14:50:12 -06:00
parent b16620d021
commit b2c0a4930f

View File

@@ -82,14 +82,17 @@ public class NBCLIScenarioParserTest {
}
@Test
public void testThatTemplateParamsAreExpandedAndRemovedOverride() {
public void testThatTemplateParamsAreExpandedAndNotRemovedOverride() {
NBCLIOptions opts = new NBCLIOptions(new String[]{ "scenario-test", "template-test", "cycles-test=20"});
List<Cmd> cmds = opts.getCommands();
assertThat(cmds.size()).isEqualTo(1);
assertThat(cmds.get(0).getArg("driver")).isEqualTo("stdout");
assertThat(cmds.get(0).getArg("cycles")).isEqualTo("20");
assertThat(cmds.get(0).getArg("cycles-test")).isNull();
assertThat(cmds.get(0).getArg("workload")).isEqualTo("scenario-test");
assertThat(cmds.get(0).getParams()).isEqualTo(Map.of(
"alias","scenariotest_templatetest_withtemplate",
"cycles","20",
"cycles-test","20",
"driver","stdout",
"workload","scenario-test"
));
}
@Test
@@ -99,6 +102,7 @@ public class NBCLIScenarioParserTest {
assertThat(cmds.size()).isEqualTo(1);
assertThat(cmds.get(0).getParams()).isEqualTo(Map.of(
"alias","scenariotest_schemaonly_000",
"cycles-test","20",
"driver","stdout",
"tags","phase:schema",
"workload","scenario-test"