adoroszlai commented on code in PR #6168:
URL: https://github.com/apache/ozone/pull/6168#discussion_r1479541255
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerListVolumesSecure.java:
##########
@@ -313,40 +313,40 @@ private static void doAs(UserGroupInformation ugi,
public void testListVolumeWithOtherUsersListAllAllowed() throws Exception {
setupEnvironment(true, true);
- // Login as user1, list other users' volumes
+ // Login as USER_1, list other users' volumes
Review Comment:
```suggestion
// Login as user1, list other users' volumes
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerListVolumesSecure.java:
##########
@@ -313,40 +313,40 @@ private static void doAs(UserGroupInformation ugi,
public void testListVolumeWithOtherUsersListAllAllowed() throws Exception {
setupEnvironment(true, true);
- // Login as user1, list other users' volumes
+ // Login as USER_1, list other users' volumes
doAs(userUGI1, () -> {
- checkUser(user2, Arrays.asList("volume2", "volume3", "volume4",
+ checkUser(USER_2, Arrays.asList("volume2", "volume3", "volume4",
"volume5"), true);
- checkUser(adminUser, Arrays
+ checkUser(ADMIN_USER, Arrays
.asList("volume1", "volume2", "volume3", "volume4", "volume5",
"volume6", "s3v"), true);
return true;
});
- // Login as user2, list other users' volumes
+ // Login as USER_2, list other users' volumes
Review Comment:
```suggestion
// Login as user2, list other users' volumes
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerListVolumesSecure.java:
##########
@@ -361,39 +361,39 @@ public void testListVolumeWithOtherUsersListAllAllowed()
throws Exception {
public void testListVolumeWithOtherUsersListAllDisallowed() throws Exception
{
setupEnvironment(true, false);
- // Login as user1, list other users' volumes, expect failure
+ // Login as USER_1, list other users' volumes, expect failure
doAs(userUGI1, () -> {
- checkUser(user2, Arrays.asList("volume2", "volume3", "volume4",
+ checkUser(USER_2, Arrays.asList("volume2", "volume3", "volume4",
"volume5"), false);
- checkUser(adminUser, Arrays.asList("volume1", "volume2", "volume3",
+ checkUser(ADMIN_USER, Arrays.asList("volume1", "volume2", "volume3",
"volume4", "volume5", "volume6", "s3v"), false);
return true;
});
- // Login as user2, list other users' volumes, expect failure
+ // Login as USER_2, list other users' volumes, expect failure
Review Comment:
```suggestion
// Login as user2, list other users' volumes, expect failure
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerListVolumesSecure.java:
##########
@@ -471,28 +471,28 @@ public void testAclEnabledListAllDisallowed() throws
Exception {
public void testAclDisabledListAllAllowed() throws Exception {
setupEnvironment(false, true);
- // Login as user1, list their own volumes
+ // Login as USER_1, list their own volumes
doAs(userUGI1, () -> {
- checkUser(user1, Arrays.asList("volume1", "volume3", "volume5"),
+ checkUser(USER_1, Arrays.asList("volume1", "volume3", "volume5"),
true);
return true;
});
- // Login as user2, list their own volumes
+ // Login as USER_2, list their own volumes
Review Comment:
```suggestion
// Login as user2, list their own volumes
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerListVolumesSecure.java:
##########
@@ -142,18 +142,18 @@ private void createPrincipals() throws Exception {
String host = InetAddress.getLocalHost()
.getCanonicalHostName().toLowerCase();
String hostAndRealm = host + "@" + this.realm;
- this.adminPrincipal = adminUser + "/" + hostAndRealm;
- this.adminPrincipalInOtherHost = adminUser + "/otherhost@" + this.realm;
- this.adminKeytab = new File(workDir, adminUser + ".keytab");
- this.adminKeytabInOtherHost = new File(workDir, adminUser +
+ this.adminPrincipal = ADMIN_USER + "/" + hostAndRealm;
+ this.adminPrincipalInOtherHost = ADMIN_USER + "/otherhost@" + this.realm;
+ this.adminKeytab = new File(workDir, ADMIN_USER + ".keytab");
+ this.adminKeytabInOtherHost = new File(workDir, ADMIN_USER +
"InOtherHost.keytab");
createPrincipal(this.adminKeytab, adminPrincipal);
createPrincipal(this.adminKeytabInOtherHost, adminPrincipalInOtherHost);
- this.userPrincipal1 = this.user1 + "/" + hostAndRealm;
- this.userPrincipal2 = this.user2 + "/" + hostAndRealm;
- this.userKeytab1 = new File(workDir, this.user1 + ".keytab");
- this.userKeytab2 = new File(workDir, this.user2 + ".keytab");
+ this.userPrincipal1 = this.USER_1 + "/" + hostAndRealm;
+ this.userPrincipal2 = this.USER_2 + "/" + hostAndRealm;
+ this.userKeytab1 = new File(workDir, this.USER_1 + ".keytab");
+ this.userKeytab2 = new File(workDir, this.USER_2 + ".keytab");
Review Comment:
Better not access `static` via instance (`this`):
```suggestion
this.userPrincipal1 = USER_1 + "/" + hostAndRealm;
this.userPrincipal2 = USER_2 + "/" + hostAndRealm;
this.userKeytab1 = new File(workDir, USER_1 + ".keytab");
this.userKeytab2 = new File(workDir, USER_2 + ".keytab");
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerListVolumesSecure.java:
##########
@@ -361,39 +361,39 @@ public void testListVolumeWithOtherUsersListAllAllowed()
throws Exception {
public void testListVolumeWithOtherUsersListAllDisallowed() throws Exception
{
setupEnvironment(true, false);
- // Login as user1, list other users' volumes, expect failure
+ // Login as USER_1, list other users' volumes, expect failure
Review Comment:
```suggestion
// Login as user1, list other users' volumes, expect failure
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerListVolumesSecure.java:
##########
@@ -502,28 +502,28 @@ public void testAclDisabledListAllAllowed() throws
Exception {
public void testAclDisabledListAllDisallowed() throws Exception {
setupEnvironment(false, false);
- // Login as user1, list their own volumes
+ // Login as USER_1, list their own volumes
Review Comment:
```suggestion
// Login as user1, list their own volumes
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerListVolumesSecure.java:
##########
@@ -471,28 +471,28 @@ public void testAclEnabledListAllDisallowed() throws
Exception {
public void testAclDisabledListAllAllowed() throws Exception {
setupEnvironment(false, true);
- // Login as user1, list their own volumes
+ // Login as USER_1, list their own volumes
Review Comment:
```suggestion
// Login as user1, list their own volumes
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerListVolumesSecure.java:
##########
@@ -502,28 +502,28 @@ public void testAclDisabledListAllAllowed() throws
Exception {
public void testAclDisabledListAllDisallowed() throws Exception {
setupEnvironment(false, false);
- // Login as user1, list their own volumes
+ // Login as USER_1, list their own volumes
doAs(userUGI1, () -> {
- checkUser(user1, Arrays.asList("volume1", "volume3", "volume5"),
+ checkUser(USER_1, Arrays.asList("volume1", "volume3", "volume5"),
true);
return true;
});
- // Login as user2, list their own volumes
+ // Login as USER_2, list their own volumes
Review Comment:
```suggestion
// Login as user2, list their own volumes
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerListVolumesSecure.java:
##########
@@ -403,30 +403,30 @@ public void
testListVolumeWithOtherUsersListAllDisallowed() throws Exception {
public void testAclEnabledListAllAllowed() throws Exception {
setupEnvironment(true, true);
- // Login as user1, list their own volumes
+ // Login as USER_1, list their own volumes
doAs(userUGI1, () -> {
- checkUser(user1, Arrays.asList("volume1", "volume3", "volume4",
+ checkUser(USER_1, Arrays.asList("volume1", "volume3", "volume4",
"volume5"), true);
return true;
});
- // Login as user2, list their own volumes
+ // Login as USER_2, list their own volumes
Review Comment:
```suggestion
// Login as user2, list their own volumes
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerListVolumesSecure.java:
##########
@@ -403,30 +403,30 @@ public void
testListVolumeWithOtherUsersListAllDisallowed() throws Exception {
public void testAclEnabledListAllAllowed() throws Exception {
setupEnvironment(true, true);
- // Login as user1, list their own volumes
+ // Login as USER_1, list their own volumes
Review Comment:
```suggestion
// Login as user1, list their own volumes
```
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerListVolumesSecure.java:
##########
@@ -436,14 +436,14 @@ public void testAclEnabledListAllAllowed() throws
Exception {
public void testAclEnabledListAllDisallowed() throws Exception {
setupEnvironment(true, false);
- // Login as user1, list their own volumes
+ // Login as USER_1, list their own volumes
Review Comment:
```suggestion
// Login as user1, list their own volumes
```
--
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]