malliaridis commented on code in PR #2710:
URL: https://github.com/apache/solr/pull/2710#discussion_r1779655317


##########
solr/packaging/test/test_create.bats:
##########
@@ -34,8 +34,31 @@ teardown() {
   assert_output --partial "Created new core 'COLL_NAME'"
 }
 
+@test "create_core works" {
+  run solr start
+  run solr create_core -c COLL_NAME
+  assert_output --partial "Created new core 'COLL_NAME'"
+}
+
 @test "create for cloud mode" {
   run solr start -c
   run solr create -c COLL_NAME
   assert_output --partial "Created collection 'COLL_NAME'"
 }
+
+@test "ensure -p port parameter is supported" {
+  solr start -p ${SOLR2_PORT}
+  solr assert --not-started http://localhost:${SOLR_PORT} --timeout 5000
+  solr assert --started http://localhost:${SOLR2_PORT} --timeout 5000
+  
+  run solr create -c COLL_NAME -p ${SOLR2_PORT}
+  assert_output --partial "Created new core 'COLL_NAME'"
+}
+
+@test "ensure -V verbose parameter is supported" {
+  solr start 
+  solr assert --started http://localhost:${SOLR_PORT} --timeout 5000
+  
+  run solr create -c COLL_NAME -v

Review Comment:
   `-V` (uppercase) is mentioned, but `-v` (lowercase) is tested. I am not sure 
if case-sensitivity is a thing at the current CLI parser, but it should be at 
least synced here.
   
   ```suggestion
     run solr create -c COLL_NAME -V
   ```



##########
solr/core/src/java/org/apache/solr/cli/CreateTool.java:
##########
@@ -148,16 +149,36 @@ public List<Option> getOptions() {
             .required(false)
             .desc("Configuration name; default is the collection name.")
             .build(),
+        Option.builder("p")
+            .longOpt("port")
+            .deprecated(
+                DeprecatedAttributes.builder()
+                    .setForRemoval(true)
+                    .setSince("9.7")
+                    .setDescription("Use --solr-url instead")
+                    .get())
+            .argName("PORT")
+            .hasArg()
+            .required(false)
+            .desc("Port of a local Solr instance where you want to create the 
new core.")
+            .build(),
         SolrCLI.OPTION_SOLRURL,
         SolrCLI.OPTION_SOLRURL_DEPRECATED,
         SolrCLI.OPTION_ZKHOST,
-        SolrCLI.OPTION_ZKHOST_DEPRECATED);
+        SolrCLI.OPTION_ZKHOST_DEPRECATED,
+        SolrCLI.OPTION_VERBOSE_DEPRECATED);

Review Comment:
   Should this be eventually
   ```suggestion
           SolrCLI.OPTION_ZKHOST_DEPRECATED,
           SolrCLI.OPTION_VERBOSE,
           SolrCLI.OPTION_VERBOSE_DEPRECATED);
   ```



##########
solr/core/src/java/org/apache/solr/cli/DeleteTool.java:
##########
@@ -122,16 +124,36 @@ public List<Option> getOptions() {
             .desc(
                 "Skip safety checks when deleting the configuration directory 
used by a collection.")
             .build(),
+        Option.builder("p")
+            .longOpt("port")
+            .deprecated(
+                DeprecatedAttributes.builder()
+                    .setForRemoval(true)
+                    .setSince("9.7")
+                    .setDescription("Use --solr-url instead")
+                    .get())
+            .argName("PORT")
+            .hasArg()
+            .required(false)
+            .desc("Port of a local Solr instance where you want to create the 
new core.")
+            .build(),
         SolrCLI.OPTION_SOLRURL,
         SolrCLI.OPTION_SOLRURL_DEPRECATED,
         SolrCLI.OPTION_ZKHOST,
-        SolrCLI.OPTION_ZKHOST_DEPRECATED);
+        SolrCLI.OPTION_ZKHOST_DEPRECATED,
+        SolrCLI.OPTION_VERBOSE_DEPRECATED);

Review Comment:
   Should this be eventually
   Same here:
   ```suggestion
           SolrCLI.OPTION_ZKHOST_DEPRECATED,
           SolrCLI.OPTION_VERBOSE,
           SolrCLI.OPTION_VERBOSE_DEPRECATED);
   ```



-- 
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: issues-unsubscr...@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to