couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex aka Sinm <sinm.s...@gmail.com>
Subject Query server spec - empty headers
Date Wed, 06 Feb 2013 05:25:30 GMT
Hi all!

I'm implementing a query server now. Several tests in query_server_spec.rb won't pass while
comparing results to empty or other way absent headers hash. It's easy to repair that but
i wonder is there any reason to expect empty/absent headers in tests which are not about the
headers at all? 

Examples:

-- suppressing empty headers, but they are expected to be

 query server normal case ddoc list should end after 2
     Failure/Error: should == ["start", ["first chunk", "ok"], {"headers"=>{}}]
       expected: ["start", ["first chunk", "ok"], {"headers"=>{}}]
            got: ["start", ["first chunk", "ok"], {}] (using ==)

 query server that exits raw list should exit if it gets a non-row in the middle
     Failure/Error: should == ["start", ["first chunk", "ok"], {"headers"=>{}}]
       expected: ["start", ["first chunk", "ok"], {"headers"=>{}}]
            got: ["start", ["first chunk", "ok"], {}] (using ==)

-- passing empty headers, but they are not expected in other tests

  query server normal case should not erase ddocs on reset
     Failure/Error: ["resp", {"body" => "Best ever - Doc body"}]
       expected: ["resp", {"body"=>"Best ever - Doc body"}]
            got: ["resp", {"headers"=>{}, "body"=>"Best ever - Doc body"}] (using ==)


  query server normal case show should show
     Failure/Error: ["resp", {"body" => "Best ever - Doc body"}]
       expected: ["resp", {"body"=>"Best ever - Doc body"}]
            got: ["resp", {"headers"=>{}, "body"=>"Best ever - Doc body"}] (using ==)





Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message