From 8e4846dca1dae8cf0cbb8a95ff42d394ce34e673 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Wed, 9 Aug 2023 19:38:48 -0400 Subject: [PATCH] test the full lifecycle of enabling/disabling auth. --- solr/packaging/test/test_auth.bats | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/solr/packaging/test/test_auth.bats b/solr/packaging/test/test_auth.bats index 666fcb8ee7a..8396acba575 100644 --- a/solr/packaging/test/test_auth.bats +++ b/solr/packaging/test/test_auth.bats @@ -33,3 +33,17 @@ setup() { assert_output --partial "Argument [updateIncludeFileOnly] must be either true or false, but was [ture]" } +@test "auth enable/disable lifecycle" { + solr start -c + solr auth enable -type basicAuth -credentials name:password + solr assert --started http://localhost:8983/solr --timeout 5000 + + run curl -u name:password --basic 'http://localhost:8983/solr/admin/collections?action=CREATE&collection.configName=_default&name=test&numShards=2&replicationFactor=1&router.name=compositeId&wt=json' + assert_output --partial '"status":0' + + solr auth disable + run curl 'http://localhost:8983/solr/test/select?q=*:*' + assert_output --partial '"numFound":0' + + +}