You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/02/01 14:40:03 UTC

[GitHub] [accumulo] Manno15 opened a new pull request #1894: Add user test to ShellIT

Manno15 opened a new pull request #1894:
URL: https://github.com/apache/accumulo/pull/1894


   This fixes [ACCUMULO-1119](https://issues.apache.org/jira/browse/ACCUMULO-1119?orderby=cf[12310200]+ASC%2C+priority+DESC%2C+updated+DESC). Since `ShellTest` became `ShellIT` (in 2.0), this test can be uncommented, assuming this is still something worthwhile to test. I confirmed it passes now, even without having to properly enter any passwords. 
   
   `ShellServerIT` also has a user test but doesn't directly test for the "User Exists" exception. This could be added to that if it fits better or it can stay here. 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] Manno15 merged pull request #1894: Add user test to ShellIT

Posted by GitBox <gi...@apache.org>.
Manno15 merged pull request #1894:
URL: https://github.com/apache/accumulo/pull/1894


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] Manno15 commented on a change in pull request #1894: Add user test to ShellIT

Posted by GitBox <gi...@apache.org>.
Manno15 commented on a change in pull request #1894:
URL: https://github.com/apache/accumulo/pull/1894#discussion_r567982243



##########
File path: test/src/main/java/org/apache/accumulo/test/ShellIT.java
##########
@@ -352,10 +352,11 @@ public void authsTest() throws Exception {
   }
 
   @Test
-  public void userTest() {
+  public void userTest() throws IOException {
     Shell.log.debug("Starting user test --------------------------");
-    // Test cannot be done via junit because createuser only prompts for password
-    // exec("createuser root", false, "user exists");
+    exec("createuser root", false, "user exists");
+    exec("createuser test", true);
+    exec("createuser test", false, "user exists");

Review comment:
       Good ideas. I will implement.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] ctubbsii commented on a change in pull request #1894: Add user test to ShellIT

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #1894:
URL: https://github.com/apache/accumulo/pull/1894#discussion_r567980047



##########
File path: test/src/main/java/org/apache/accumulo/test/ShellIT.java
##########
@@ -352,10 +352,11 @@ public void authsTest() throws Exception {
   }
 
   @Test
-  public void userTest() {
+  public void userTest() throws IOException {
     Shell.log.debug("Starting user test --------------------------");
-    // Test cannot be done via junit because createuser only prompts for password
-    // exec("createuser root", false, "user exists");
+    exec("createuser root", false, "user exists");
+    exec("createuser test", true);
+    exec("createuser test", false, "user exists");

Review comment:
       Should probably use a unique user name for this, to reduce the liklihood of collision with another test. The base class should be able to provide a unique name, based on the name of the test method.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] Manno15 merged pull request #1894: Add user test to ShellIT

Posted by GitBox <gi...@apache.org>.
Manno15 merged pull request #1894:
URL: https://github.com/apache/accumulo/pull/1894


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] ctubbsii commented on a change in pull request #1894: Add user test to ShellIT

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #1894:
URL: https://github.com/apache/accumulo/pull/1894#discussion_r567980723



##########
File path: test/src/main/java/org/apache/accumulo/test/ShellIT.java
##########
@@ -352,10 +352,11 @@ public void authsTest() throws Exception {
   }
 
   @Test
-  public void userTest() {
+  public void userTest() throws IOException {
     Shell.log.debug("Starting user test --------------------------");
-    // Test cannot be done via junit because createuser only prompts for password
-    // exec("createuser root", false, "user exists");
+    exec("createuser root", false, "user exists");
+    exec("createuser test", true);
+    exec("createuser test", false, "user exists");

Review comment:
       Could also delete the created user when done.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org