epugh commented on code in PR #4067:
URL: https://github.com/apache/solr/pull/4067#discussion_r2712783982
##########
solr/packaging/test/test_start_solr.bats:
##########
@@ -107,3 +110,36 @@ teardown() {
# Verify the techproducts configset was uploaded
config_exists "techproducts"
}
+
+@test "start with custom implicit plugins" {
+ # Create custom implicit plugins file inline
+ local custom_plugins_file="${SOLR_HOME}/custom-implicit-plugins.json"
+
+ cat > "${custom_plugins_file}" <<EOF
+ {
+ "requestHandler": {
+ "/custom-select": {
+ "useParams":"_UPDATE",
+ "class": "solr.SearchHandler"
+ }
+ }
+ }
+EOF
+
+ # Start Solr with custom implicit plugins configuration
+ solr start -Dsolr.implicitPluginsFile=custom-implicit-plugins.json
+ solr assert --started http://localhost:${SOLR_PORT} --timeout 5000
+
+
+ # Create a collection to test the custom handlers
+ solr create -c custom_plugins_test
+
+ # Verify the custom handler is available and default handlers like /update
are not
+ run curl -s
"http://localhost:${SOLR_PORT}/solr/custom_plugins_test/custom-select"
+ assert_output --partial '"status":0'
+
+ run curl -s "http://localhost:${SOLR_PORT}/solr/custom_plugins_test/update"
+ assert_output --partial 'Searching for Solr'
Review Comment:
thanks for suggestion.
--
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]