[tor-bugs] #6950 [pyonionoo]: write tests for pyonionoo

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Dec 3 15:59:10 UTC 2012


#6950: write tests for pyonionoo
-----------------------+----------------------------------------------------
 Reporter:  gsathya    |          Owner:  gsathya 
     Type:  task       |         Status:  accepted
 Priority:  major      |      Milestone:          
Component:  pyonionoo  |        Version:          
 Keywords:             |         Parent:          
   Points:             |   Actualpoints:          
-----------------------+----------------------------------------------------

Comment(by karsten):

 And the rest:

 3 Ordering and limiting parameter tests

  - 3.1 Request all details documents ordered by consensus weight in
 ascending order (default).  Make sure the ordering is correct.  Also make
 sure that relays without consensus weight and bridges are appended to the
 end in no specific ordering.

  - 3.2 Same as 3.1, but in descending order.  Similarly, make sure that
 relays without consensus weight and bridges are still appended to the end
 in no specific ordering.

  - 3.3 Specify the "order" parameter twice.  The result is yet
 unspecified.  What should it be?  Probably error.

  - 3.4 Specify "consensus_weight,-consensus_weight" as parameter value for
 "order".  The result should be an error.

  - 3.5 Specify "consensus_weight,nickname" as parameter value for "order",
 which should also be an error (because nickname is not listed as possible
 field for ordering).

  - 3.6 Specify "CONSENSUS_WEIGHT" as parameter.  Unclear if it is and/or
 should be permitted.  Probably should be allowed.

  - 3.7 Request all summary documents ordered by consensus weight in
 ascending order and make sure they're also ordered correctly.  May need to
 hard-code ordering for example data, or request details documents before
 and memorize the ordering.

  - 3.8 Request summary documents with an offset of 1 and compare to result
 without offset.  The first relay (or bridge?!) should be gone.  (TODO:
 Specify whether relays or bridges are skipped first.)

  - 3.9 Request summary documents with an offset greater than or equal to
 the expected number of relays and bridges.  The result should be empty.

  - 3.10 Request summary documents with a negative offset.  The result
 should probably be an error code.  TODO Specify what should happen.

  - 3.11 Specify a non-numeric offset value.  Should result in error.

  - 3.12 Specify offset and order together, e.g., skipping the relay with
 lowest consensus weight and making sure that the relay with second-lowest
 consensus weight is first in the result.

  - 3.13 Request summary documents and limit them to 1 result.  TODO
 Specify whether relays or bridges are the first to be cut off.

  - 3.14 Set a negative limit; should result in error.

  - 3.15 Set a limit that's great than or equal to the expected number of
 relays and bridges, and make sure that all of them are returned.

  - 3.16 Combine order by consensus weight, offset 1, and limit 1 to make
 sure we get the relay with second-lowest consensus weight.

  - 3.17 Specify a non-numeric limit value.  Should result in error.

 Feel free to add more cases.  Also, feel free to leave out those that
 don't make sense to you.  I'll help implementing them later.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6950#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list