Skip to content

Commit

Permalink
Add negative test for missing auth
Browse files Browse the repository at this point in the history
  • Loading branch information
malliaridis committed Nov 19, 2024
1 parent 26e1ba9 commit cfee850
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions solr/packaging/test/test_stream.bats
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,17 @@ teardown() {
assert_output --partial 'Apple 60 GB iPod'
refute_output --partial 'ERROR'
}

@test "searching solr without credentials fails with error" {

local solr_stream_file="${BATS_TEST_TMPDIR}/search.expr"
echo 'search(techproducts,' > "${solr_stream_file}"
echo 'q="name:memory",' >> "${solr_stream_file}"
echo 'fl="name,price",' >> "${solr_stream_file}"
echo 'sort="price desc"' >> "${solr_stream_file}"
echo ')' >> "${solr_stream_file}"

run solr stream --execution local --header ${solr_stream_file}

assert_output --partial 'ERROR'
}

0 comments on commit cfee850

Please sign in to comment.