Skip to content

Commit

Permalink
test the full lifecycle of enabling/disabling auth.
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Aug 9, 2023
1 parent 7247f8d commit 8e4846d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions solr/packaging/test/test_auth.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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'


}

0 comments on commit 8e4846d

Please sign in to comment.