malliaridis commented on code in PR #2712:
URL: https://github.com/apache/solr/pull/2712#discussion_r1799446120
##########
solr/packaging/test/test_status.bats:
##########
@@ -37,18 +37,27 @@ teardown() {
solr stop
run solr status
assert_output --partial "No Solr nodes are running."
+}
+@test "status with --solr-url from user" {
+ solr start
+ run solr status --solr-url http://localhost:${SOLR_PORT}
+ assert_output --partial "Found 1 Solr nodes:"
+ assert_output --partial "running on port ${SOLR_PORT}"
+ solr stop
}
-@test "status shell script ignores passed in --solr-url cli parameter from
user" {
+@test "status with --port from user" {
solr start
- run solr status --solr-url http://localhost:9999
+ run solr status --port ${SOLR_PORT}
assert_output --partial "Found 1 Solr nodes:"
assert_output --partial "running on port ${SOLR_PORT}"
+ solr stop
}
Review Comment:
For the mentioned scenario, this would be the negative test that should pass
but fails now.
```suggestion
@test "status with invalid --solr-url from user" {
solr start
run solr status --solr-url http://invalidhost:${SOLR_PORT}
assert_output --partial "No Solr nodes are running."
solr stop
}
```
--
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]