use of org.apache.pulsar.admin.cli.CmdFunctions.UpdateFunction in project incubator-pulsar by apache.
the class CmdFunctionsTest method testUpdateFunction.
@Test
public void testUpdateFunction() throws Exception {
String fnName = TEST_NAME + "-function";
String inputTopicName = TEST_NAME + "-input-topic";
String outputTopicName = TEST_NAME + "-output-topic";
cmd.run(new String[] { "update", "--name", fnName, "--inputs", inputTopicName, "--output", outputTopicName, "--jar", "SomeJar.jar", "--tenant", "sample", "--namespace", "ns1", "--className", DummyFunction.class.getName() });
UpdateFunction updater = cmd.getUpdater();
assertEquals(fnName, updater.getFunctionName());
assertEquals(inputTopicName, updater.getInputs());
assertEquals(outputTopicName, updater.getOutput());
verify(functions, times(1)).updateFunction(any(FunctionConfig.class), anyString());
}
Aggregations