devmadhuu commented on code in PR #11066:
URL: https://github.com/apache/ozone/pull/11066#discussion_r3868445717
##########
hadoop-ozone/cli-admin/src/test/java/org/apache/hadoop/hdds/scm/cli/datanode/TestListInfoSubcommand.java:
##########
@@ -459,6 +466,54 @@ private void validateOrderingFromTextOutput(String output,
String orderDirection
}
}
+ @ParameterizedTest
+ @EnumSource(value = StorageTier.class, names = {"EMPTY"}, mode =
EnumSource.Mode.EXCLUDE)
+ public void testRelatedPipelineShowsStorageTier(StorageTier tier) throws
Exception {
+ List<HddsProtos.Node> nodes = getNodeDetails();
+ HddsProtos.Node node = nodes.get(0);
+
+ ScmClient scmClient = mock(ScmClient.class);
+ when(scmClient.queryNode(any(), any(), any(), any())).thenReturn(nodes);
+ when(scmClient.listPipelines()).thenReturn(
+ Collections.singletonList(pipelineContaining(node, tier)));
+
+ CommandLine c = new CommandLine(cmd);
+ c.parseArgs();
+ cmd.execute(scmClient);
+
+ String output = outContent.toString(DEFAULT_ENCODING);
+ assertThat(output).contains("/[" + tier.getTierName() + "]");
+ }
+
+ @Test
+ public void testRelatedPipelineOmitsTierWhenNull() throws Exception {
Review Comment:
okay. makes sense. Thanks again.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]