hemantk-12 commented on code in PR #4042:
URL: https://github.com/apache/ozone/pull/4042#discussion_r1042905660
##########
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/api/TestNSSummaryEndpointWithLegacy.java:
##########
@@ -389,15 +399,47 @@ public void testUtility() {
@Test
public void testGetBasicInfoRoot() throws Exception {
+ String username = "myuser";
+ OmPrefixInfo omPrefixInfo = getOmPrefixInfoForTest(ROOT_PATH,
+ IAccessAuthorizer.ACLIdentityType.USER,
+ username,
+ IAccessAuthorizer.ACLType.WRITE,
+ ACCESS);
+ omPrefixInfo.getMetadata().put("key", "value");
+ reconOMMetadataManager.getPrefixTable()
+ .put(OzoneConsts.OM_KEY_PREFIX, omPrefixInfo);
// Test root basics
Response rootResponse = nsSummaryEndpoint.getBasicInfo(ROOT_PATH);
NamespaceSummaryResponse rootResponseObj =
(NamespaceSummaryResponse) rootResponse.getEntity();
Assert.assertEquals(EntityType.ROOT, rootResponseObj.getEntityType());
- Assert.assertEquals(2, rootResponseObj.getNumVolume());
- Assert.assertEquals(4, rootResponseObj.getNumBucket());
- Assert.assertEquals(5, rootResponseObj.getNumTotalDir());
- Assert.assertEquals(10, rootResponseObj.getNumTotalKey());
+ Assert.assertEquals(2, rootResponseObj.getCountStats().getNumVolume());
+ Assert.assertEquals(4, rootResponseObj.getCountStats().getNumBucket());
+ Assert.assertEquals(5, rootResponseObj.getCountStats().getNumTotalDir());
+ Assert.assertEquals(10, rootResponseObj.getCountStats().getNumTotalKey());
Review Comment:
My bad, it has been 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]