Skip to content

Commit 59e90e6

Browse files
jiangpengchengmukesh-ctds
authored andcommitted
[improve][fn] Set default tenant and namespace for ListFunctions cmd (apache#23881)
(cherry picked from commit 66d1bb0) (cherry picked from commit 1abbc3c)
1 parent b697140 commit 59e90e6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pulsar-client-tools-test/src/test/java/org/apache/pulsar/admin/cli/CmdFunctionsTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,19 @@ public void testListFunctions() throws Exception {
632632
verify(functions, times(1)).getFunctions(eq(TENANT), eq(NAMESPACE));
633633
}
634634

635+
@Test
636+
public void testListFunctionsWithDefaultValue() throws Exception {
637+
cmd.run(new String[] {
638+
"list",
639+
});
640+
641+
ListFunctions lister = cmd.getLister();
642+
assertEquals("public", lister.getTenant());
643+
assertEquals("default", lister.getNamespace());
644+
645+
verify(functions, times(1)).getFunctions(eq("public"), eq("default"));
646+
}
647+
635648
@Test
636649
public void testStateGetter() throws Exception {
637650
String key = TEST_NAME + "-key";

0 commit comments

Comments
 (0)