unknowntpo commented on code in PR #6847:
URL: https://github.com/apache/gravitino/pull/6847#discussion_r2072570285


##########
clients/cli/src/test/java/org/apache/gravitino/cli/output/TestPlainFormat.java:
##########
@@ -251,6 +253,52 @@ void testListColumnWithTableFormatAndEmptyDefaultValues() {
         output);
   }
 
+  @Test
+  void testTagDetailsWithPlainFormat() {
+    CommandContext mockContext = getMockContext();
+    Tag mockTag = getMockTag("tag1", "comment for tag1");
+
+    PlainFormat.output(mockTag, mockContext);
+    String output = new String(outContent.toByteArray(), 
StandardCharsets.UTF_8).trim();
+    Assertions.assertEquals("name,comment\n" + "tag1,comment for tag1", 
output);
+  }
+
+  @Test
+  void testTagDetailsWithPlainFormatWithNullValues() {
+    CommandContext mockContext = getMockContext();
+    Tag mockTag = mock(Tag.class);
+    when(mockTag.name()).thenReturn("tag1");
+    when(mockTag.comment()).thenReturn(null);

Review Comment:
   ok, fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to