Adjust test for Luke request handler response

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@540685 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2007-05-22 18:30:23 +00:00
parent 6bd5301ed5
commit 1e0e887878
1 changed files with 8 additions and 39 deletions

View File

@ -10,57 +10,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.
require 'test/unit'
require 'flare'
class Flare::Context
def index_info
Solr::Response::IndexInfo.new(<<RUBY_CODE
Solr::Response::IndexInfo.new(
<<SOLR_RESPONSE
{
'responseHeader'=>{
'status'=>0,
'QTime'=>7},
'fields'=>{
'body_zh_text'=>{'type'=>'text_zh'},
'type_zh_facet'=>{'type'=>'string'},
'subject_era_facet'=>{'type'=>'string'},
'call_number_display'=>{'type'=>'text'},
'id'=>{'type'=>'string'},
'title_text'=>{'type'=>'text'},
'isbn_text'=>{'type'=>'text'},
'source_facet'=>{'type'=>'string'},
'subject_geographic_facet'=>{'type'=>'string'},
'author_text'=>{'type'=>'text'},
'marc_text'=>{'type'=>'text'},
'body_en_text'=>{'type'=>'text'},
'author_zh_facet'=>{'type'=>'string'},
'title_en_text'=>{'type'=>'text'},
'subject_topic_facet'=>{'type'=>'string'},
'library_facet'=>{'type'=>'string'},
'subject_genre_facet'=>{'type'=>'string'},
'external_url_display'=>{'type'=>'text'},
'format_facet'=>{'type'=>'string'},
'type_en_facet'=>{'type'=>'string'},
'author_en_facet'=>{'type'=>'string'},
'text'=>{'type'=>'text'},
'call_number_facet'=>{'type'=>'string'},
'year_facet'=>{'type'=>'string'},
'location_facet'=>{'type'=>'string'},
'title_zh_text'=>{'type'=>'text_zh'}},
'index'=>{
'maxDoc'=>1337165,
'numDocs'=>1337159,
'version'=>'1174965134952'}}
RUBY_CODE
'responseHeader'=>{'status'=>0, 'QTime'=>7},
'fields'=>{'id'=>{'type'=>'string'}, 'text'=>{'type'=>'text'}},
'index'=>{'maxDoc'=>1337165, 'numDocs'=>1337159, 'version'=>'1174965134952'}
}
SOLR_RESPONSE
)
end
end
class FlareContextTest < Test::Unit::TestCase
def setup
@flare_context = Flare::Context.new({:solr_url => 'http://localhost:8983/solr'})
@flare_context = Flare::Context.new({:solr_url => 'http://server:8983/solr'})
end
def test_clear