Skip to content

Commit

Permalink
Enforce better consistency amongst test naming.
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Apr 30, 2014
1 parent 1ecf348 commit 550a2f0
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion data/decks/complete.deck
Expand Up @@ -20,7 +20,7 @@
reportfile: null
resume: 0
subargs: [-f, 'httpo://ihiderha53f36lsd.onion/input/37e60e13536f6afe47a830bfb6b371b5cf65da66d7ad65137344679b24fdccd1']
test_file: blocking/dnsconsistency
test_file: blocking/dns_consistency
testdeck: null
- options:
collector: null
Expand Down
2 changes: 1 addition & 1 deletion data/decks/complete_no_root.deck
Expand Up @@ -20,7 +20,7 @@
reportfile: null
resume: 0
subargs: [-f, 'httpo://ihiderha53f36lsd.onion/input/37e60e13536f6afe47a830bfb6b371b5cf65da66d7ad65137344679b24fdccd1']
test_file: blocking/dnsconsistency
test_file: blocking/dns_consistency
testdeck: null
- options:
collector: null
Expand Down
4 changes: 2 additions & 2 deletions data/inputs/README
@@ -1,9 +1,9 @@
In here you will find some very simple input lists that are useful for testing
the correct functionality of the various OONIProbe tests.

# DNS Tamper
# DNS Consistency

./bin/ooniprobe -o dns_tamper_test.yamloo data/nettests/blocking/dnsconsistency.py -t
./bin/ooniprobe -o dns_tamper_test.yamloo data/nettests/blocking/dns_consistency.py -t
example_inputs/dns_tamper_test_resolvers.txt -f example_inputs/dns_tamper_file.txt

less dns_tamper_test.yamloo
Expand Down
8 changes: 4 additions & 4 deletions docs/source/tests/dnsconsistency.rst
Expand Up @@ -5,7 +5,7 @@ Details

*Current version*: 0.4

*NetTest*: DNS Consistency Test (https://gitweb.torproject.org/ooni-probe.git/blob/HEAD:/ooni/nettests/blocking/dnsconsistency.py)
*NetTest*: DNS Consistency Test (https://gitweb.torproject.org/ooni-probe.git/blob/HEAD:/nettests/blocking/dns_consistency.py)

*Test Helper*: DNS Test Helper (https://gitweb.torproject.org/oonib.git/blob/HEAD:/oonib/testhelpers/dns_helpers.py)

Expand All @@ -28,7 +28,7 @@ Youtube, etc.
How to run the test
===================

`ooniprobe blocking/dnsconsistency [-t <test resolvers>|-T <test resolver file>-f <input file> -b IP:PORT`
`ooniprobe blocking/dns_consistency [-t <test resolvers>|-T <test resolver file>-f <input file> -b IP:PORT`

*test resolvers* is a single test resolver (IP address)

Expand All @@ -42,7 +42,7 @@ Sample report
=============

From running:
`ooniprobe blocking/dnsconsistency -T test_inputs/dns_tamper_test_resolvers.txt -f test_inputs/http_host_file.txt`
`ooniprobe blocking/dns_consistency -T test_inputs/dns_tamper_test_resolvers.txt -f test_inputs/http_host_file.txt`

::

Expand All @@ -59,7 +59,7 @@ From running:
reportfile: null
resume: 0
subargs: [-t, 8.8.8.8, -f, test_inputs/dns_tamper_file.txt]
test: nettests/blocking/dnsconsistency.py
test: nettests/blocking/dns_consistency.py
probe_asn: null
probe_cc: null
probe_ip: 127.0.0.1
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion ooni/nettests/blocking/http_requests.py
Expand Up @@ -27,7 +27,7 @@ class HTTPRequestsTest(httpt.HTTPTest):
We check to see if the response headers match and if the response body
lengths match.
"""
name = "HTTP Requests Test"
name = "HTTP Requests"
description = "Performs a HTTP GET request over Tor and one over the local network and compares the two results."
author = "Arturo Filastò"
version = "0.2.4"
Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions ooni/nettests/manipulation/traceroute.py
Expand Up @@ -22,9 +22,8 @@ class UsageOptions(usage.Options):
['numPackets', 'n', None, 'Specify the number of packets to send per hop'],
]

class TracerouteTest(scapyt.BaseScapyTest):
name = "Multi Protocol Traceroute Test"

class Traceroute(scapyt.BaseScapyTest):
name = "Traceroute"
description = "Performs a UDP, TCP, ICMP traceroute with destination port number set to 0, 22, 23, 53, 80, 123, 443, 8080 and 65535"

requiredTestHelpers = {'backend': 'traceroute'}
Expand Down
2 changes: 1 addition & 1 deletion ooni/tests/test_director.py
Expand Up @@ -34,7 +34,7 @@ def test_get_net_tests(self):
director = Director()
nettests = director.getNetTests()
assert 'http_requests' in nettests
assert 'dnsconsistency' in nettests
assert 'dns_consistency' in nettests
assert 'http_header_field_manipulation' in nettests
assert 'traceroute' in nettests

Expand Down
2 changes: 1 addition & 1 deletion ooni/tests/test_oonicli.py
Expand Up @@ -93,7 +93,7 @@ def verify_function(entry):
assert 'control_resolver' in entry
assert 'tampering' in entry
assert len(entry['tampering']) == 1
yield self.run_test('blocking/dnsconsistency',
yield self.run_test('blocking/dns_consistency',
['-b', '8.8.8.8:53',
'-t', '8.8.8.8',
'-f', 'example-input.txt'],
Expand Down

0 comments on commit 550a2f0

Please sign in to comment.