From bb1e5bdccc0b9b6658db924399bcbc2bf1bef057 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 10 Sep 2013 11:33:33 +0200 Subject: [PATCH] Update test_solr, due to regression when query is omitted --- test/test_solr.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/test_solr.c b/test/test_solr.c index 6b156a2..e4f1c74 100644 --- a/test/test_solr.c +++ b/test/test_solr.c @@ -8,6 +8,7 @@ #include #include +#include #if YAZ_HAVE_XML2 #include #endif @@ -65,9 +66,10 @@ void tst_encoding(void) Z_SRW_PDU *sr = yaz_srw_get_pdu(odr, Z_SRW_searchRetrieve_request, "1.2"); + sr->u.request->query = "title:solr"; YAZ_CHECK(compare_solr_req( odr, sr, 0, - "GET Default/select? HTTP/1.1\r\n" + "GET Default/select?q=title%3Asolr HTTP/1.1\r\n" "User-Agent: YAZ/" YAZ_VERSION "\r\n" "Host: localhost\r\n" "Content-Type: text/xml\r\n\r\n")); @@ -76,9 +78,10 @@ void tst_encoding(void) { Z_SRW_PDU *sr = yaz_srw_get_pdu(odr, Z_SRW_searchRetrieve_request, "1.2"); + sr->u.request->query = "title:solr"; YAZ_CHECK(compare_solr_req( odr, sr, "utf-8", - "GET Default/select? HTTP/1.1\r\n" + "GET Default/select?q=title%3Asolr HTTP/1.1\r\n" "User-Agent: YAZ/" YAZ_VERSION "\r\n" "Host: localhost\r\n" "Content-Type: text/xml; charset=utf-8\r\n\r\n")); @@ -88,8 +91,7 @@ void tst_encoding(void) Z_SRW_PDU *sr = yaz_srw_get_pdu(odr, Z_SRW_searchRetrieve_request, "1.2"); - sr->u.request->query_type = Z_SRW_query_type_cql; - sr->u.request->query.cql = "title:solr"; + sr->u.request->query = "title:solr"; sr->u.request->startRecord = odr_intdup(odr, 3); sr->u.request->maximumRecords = odr_intdup(odr, 10); @@ -106,8 +108,7 @@ void tst_encoding(void) Z_SRW_PDU *sr = yaz_srw_get_pdu(odr, Z_SRW_searchRetrieve_request, "1.2"); - sr->u.request->query_type = Z_SRW_query_type_cql; - sr->u.request->query.cql = "title:solr"; + sr->u.request->query = "title:solr"; sr->u.request->startRecord = odr_intdup(odr, 3); sr->u.request->maximumRecords = odr_intdup(odr, 10); sr->u.request->facetList = yaz_pqf_parse_facet_list( -- 1.7.10.4