#!/bin/bash # set -euo pipefail TEST_DIR="${TEST_DIR:-$(dirname -- "${BASH_SOURCE[0]}")}" source "${TEST_DIR}/../../shared.sh" echo "Running $container_name" docker run --name "$container_name" -d "$tag" "solr-demo" wait_for_container_and_solr "$container_name" echo "Checking data" data=$(docker exec --user=solr "$container_name" wget -q -O - 'http://localhost:8983/solr/demo/select?q=id%3Adell') if ! grep -E -q 'One Dell Way Round Rock, Texas 78682' <<<"$data"; then echo "Test $TEST_NAME $tag failed; data did not load" exit 1 fi container_cleanup "$container_name" echo "Test $TEST_NAME $tag succeeded"