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

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Dec 3 15:36:26 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):

 Here's more:

 2 Filtering parameter tests

  - 2.1 Request all summaries of type "relay" and make sure that the
 response has the expected number of relays and no bridges.

  - 2.2 Same as 2.1, but with type "bridge".

  - 2.3 Request all summaries of non-existant type "bridgerelay" and make
 sure that the result is the expected error code.

  - 2.4 Request all summaries of type "relay" and of type "bridge".  Make
 sure the result contains neither relays nor bridges, because multiple
 parameters should be handled with a logical AND.  (TODO This may need some
 clarification in the spec.)

  - 2.5 Add a "type" parameter with no "=" and no value to the request.
 This should return an error code.

  - 2.6 Request all summaries and specify "type=relay" twice in the same
 request.  Make sure that the response is the same as in 2.1.

  - 2.7 Write the parameter name in upper-case letters as "TYPE=relay", and
 make sure the response is, erm, well, what is it supposed to be?

  - 2.8 Write the parameter value in upper-case letters as "type=RELAY",
 and make sure the response is as it's supposed to be.  See 2.7.

  - 2.9--2.16 Same as 2.1--2.8, but with "running" parameter.

  - 2.17 Search relay by fully specified nickname that is unique in the
 example data, and make sure that the result contains that relay and
 nothing else.

  - 2.18 Search relay by non-existant nickname and make sure the result is
 empty.

  - 2.19 Search relay with a unique, long nickname, but only from the
 second nickname character on.  Result should be empty.

  - 2.20 Search relay by specifying only part of its nickname.

  - 2.21 Search relay by single first nickname character.

  - 2.22 Search existing relay by nickname in all upper-/lower-case, and
 make sure it's still contained in the result.

  - 2.23 Search relay by $-prefixed, full fingerprint, and make sure it's
 contained in the result with no other relays or bridges.

  - 2.24 Same as 2.23, but without $-prefixing the full fingerprint.

  - 2.25 Same as 2.23, but with $-prefixed first 39 hex characters of the
 fingerprint (lower-case).

  - 2.26 Same as 2.25, but with hex-characters all being upper-case.

  - 2.27 Same as 2.25, but without $-prefixing the first 39 lower-case hex
 characters.

  - 2.28 Search relay by hashed fingerprint, $-prefixed and all 40
 characters.  Relay should be found.

  - 2.29 Search relay by first 39 $-prefixed hex characters of hashed
 fingerprint.  Relay should be found.

  - 2.30 Search relay by $-prefixed fingerprint consisting of 41
 characters, with the first 40 being an existing relay.  Should result in
 error.

  - 2.31 Search relay by fully specified IPv4 address.

  - 2.32 Search relay by its /24 IPv4 network.

  - 2.33 Search relay by its fully specified IPv4 address that it uses for
 exiting, not as its OR address.

  - 2.34 Same as 2.33, but by searching for the /24 IPv4 network.

  - 2.35 Search relay by fully specified IPv6 address.

  - 2.36 Search relay by its /64 IPv6 network.  (TODO This may or may not
 work in Onionoo.)

  - 2.37 Search relay by fully specified IPv6 address, but without omitting
 any 0's in the address.

  - 2.38 Search relay by fully specified IPv6 address with hex characters
 being upper-case.

  - 2.39 Search relay by illegal IPv6 address, e.g., three subsequent
 colons, more than 8 colon-separated parts, or more than 4 hex characters
 per part.  (TODO This is likely going to fail in Onionoo.)

  - 2.40--2.45 Same as 2.17--2.22, but for bridges.

  - 2.46--2.52 Same as 2.23--2.29, but for bridges.

  - 2.53 Search relays, but include illegal character in search parameter
 value.  Legal characters are "$[0-9][a-z][A-Z].:".

  - 2.54 Same as search cases with fully specified fingerprint, but passed
 to lookup parameter.  This includes upper-/lower-case, existing/non-
 existing relay/bridge, 39/41 hex characters, $-prefixing (not allowed
 here), non-hashed/hashed fingerprint, etc.

  - 2.55 Search for relays by country code with a lower-letter country code
 that is known to result in at least one relays.  Make sure the expected
 relay(s) is/are contained in the response, and make sure there are no
 bridges in the result.

  - 2.56 Search for relays by country code using an existing country code
 that has no relays.

  - 2.57 Same as 2.56, but using a non-existing country code.

  - 2.58 Same as 2.56, but using an upper-case country code.  Result should
 be the same.

  - 2.59 Search by three-letter country code.

  - 2.60 Search by one-letter country code.

  - 2.61 Search by country code containing number, e.g., A1 or A2.  Should
 return relays if they are in the test data (make sure there's at least
 one).

  - 2.62 Search for relays using two different country codes.  Should
 result in empty response.

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


More information about the tor-bugs mailing list