epugh commented on code in PR #1951:
URL: https://github.com/apache/solr/pull/1951#discussion_r1335007286
##########
solr/packaging/test/test_create_collection.bats:
##########
@@ -50,6 +50,33 @@ teardown() {
refute_output --partial "assuming solrUrl is http://localhost:${SOLR_PORT}"
}
+@test "create collection using port" {
+ tmp_port=${SOLR_PORT}
+ export SOLR_PORT=3090
+ run solr create -c COLL_NAME -p "${tmp_port}"
+ assert_output --partial "Created collection 'COLL_NAME'"
+ refute_output --partial "assuming solrUrl is http://localhost:${SOLR_PORT}"
+}
+
+@test "create collection with -p and --host" {
+ tmp_port=${SOLR_PORT}
+ export SOLR_PORT=
+ export SOLR_HOST=
+ export SOLR_TOOL_HOST=
+
+ run solr create -c "COLL_NAME" -p ${tmp_port} --host localhost
+ assert_output --partial "Created collection 'COLL_NAME'"
+ assert_output --partial "assuming solrUrl is http://localhost:${tmp_port}"
+}
+
+@test "create collection with port scanning" {
Review Comment:
Is port scanning really a feature we want? Do people just randomly launch
solr on random port, and then scan to find it? If poeple do, then great
feature, and I LOVE the test... Just kind of wondering about that use case...
(Look, I used the word "use case" ;-). )
--
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]