diff --git a/tests/test.bats b/tests/test.bats index c1486b7..3d9bac0 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -12,8 +12,16 @@ setup() { } health_checks() { - ddev exec "curl -u solr:SolrRocks -s http://ddev-${PROJNAME}-solr:8983/solr/# | grep Admin" - ddev solr --help | grep COMMAND + # Make sure the solr admin UI is working + ddev exec "curl -sSf -u solr:SolrRocks -s http://solr:8983/solr/# | grep Admin >/dev/null" + # Make sure the custom `ddev solr` command works + ddev solr --help | grep COMMAND >/dev/null + #echo "# curl -v -sSf -u solr:SolrRocks -X POST --header \"Content-Type:application/octet-stream\" --data-binary \"@${DIR}/tests/testdata/techproducts_configset.zip\" \"http://${PROJNAME}.ddev.site:8983/solr/admin/configs?action=UPLOAD&name=techproducts_configset\"" >&3 + # Upload the techproducts configset + # Use `curl -v` to learn more about what's going wrong + curl -sSf -u solr:SolrRocks -X POST --header "Content-Type:application/octet-stream" --data-binary "@${DIR}/tests/testdata/techproducts_configset.zip" "http://${PROJNAME}.ddev.site:8983/solr/admin/configs?action=UPLOAD&name=techproducts_configset" + # Check to make sure the configset was uploaded and can be used + curl -v -sSf -u solr:SolrRocks "http://${PROJNAME}.ddev.site:8983/solr/admin/collections?action=CREATE&name=newCollection&numShards=1&replicationFactor=1&collection.configName=techproducts_configset" } teardown() { @@ -35,7 +43,7 @@ teardown() { @test "install from release" { set -eu -o pipefail cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) - echo "# ddev get ddev/ddev-solr with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 + echo "# ddev get mkalkbrenner/ddev-solr with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 ddev get mkalkbrenner/ddev-solr ddev restart >/dev/null health_checks