use of org.apache.pulsar.admin.cli.CmdFunctions.DeleteFunction in project incubator-pulsar by apache.
the class CmdFunctionsTest method testDeleteFunction.
@Test
public void testDeleteFunction() throws Exception {
String tenant = TEST_NAME + "-tenant";
String namespace = TEST_NAME + "-namespace";
String fnName = TEST_NAME + "-function";
cmd.run(new String[] { "delete", "--name", fnName, "--tenant", tenant, "--namespace", namespace });
DeleteFunction deleter = cmd.getDeleter();
assertEquals(fnName, deleter.getFunctionName());
assertEquals(tenant, deleter.getTenant());
assertEquals(namespace, deleter.getNamespace());
verify(functions, times(1)).deleteFunction(eq(tenant), eq(namespace), eq(fnName));
}
Aggregations