epugh commented on code in PR #3706:
URL: https://github.com/apache/solr/pull/3706#discussion_r2623890490


##########
solr/packaging/test/test_extraction.bats:
##########
@@ -18,6 +18,25 @@
 
 load bats_helper
 
+# Apply the ExtractingRequestHandler via Config API and print error body on 
failure
+apply_extract_handler() {
+  local collection="$1"
+  local 
json="{\"add-requesthandler\":{\"name\":\"/update/extract\",\"class\":\"org.apache.solr.handler.extraction.ExtractingRequestHandler\",\"tikaserver.url\":\"http://localhost:${TIKA_PORT}\",\"defaults\":{\"lowernames\":\"true\",\"captureAttr\":\"true\"}}}";
+  local url="http://localhost:${SOLR_PORT}/solr/${collection}/config";
+  # Capture body and status code
+  local resp code body
+  sleep 5
+  resp=$(curl -s -S -w "\n%{http_code}" -X POST -H 
'Content-type:application/json' -d "$json" "$url")
+  code="${resp##*$'\n'}"

Review Comment:
   I wonder if this should be using a `run` and a `assert_success` type bats 
calls?



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

Reply via email to