Skip to content

Commit

Permalink
Make some order to the directory structure of the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Arturo Filastò committed May 28, 2012
1 parent c042338 commit e00625d
Show file tree
Hide file tree
Showing 123 changed files with 40 additions and 5 deletions.
12 changes: 12 additions & 0 deletions docs/writing_tests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
There are two modes of writing tests.

The first kind of mechanism relied of writing a test that uses blocking code
and each instance of it is run inside of a separate thread. Beware that your
blocking code must be thread safe to run properly (as is obvious :P)

The other menthod invloves having some knowledge about twisted. The test you
will write will be written in twisted and should implement async style non
blocking architecture.

It is recommended that tests are written using the second pattern and the first
should only be used for runnign tests that have been previously written.
4 changes: 0 additions & 4 deletions install.txt

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions ooni/assets/bridgetests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
213.151.89.102:9001
108.166.106.156:443
217.150.224.213:443
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion ooni-probe.conf → ooni/ooni-probe.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
reportdir = reports/
logfile = ooniprobe.log
assetdir = assets/
testdir = tests/
testdir = oonitests/

loglevel = DEBUG
consoleloglevel = DEBUG
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions ooni/ooniprobe.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2012-05-29 01:32:22,811 ooniprobe INFO Started ooni-probe
2012-05-29 01:32:22,972 ooniprobe WARNING Soft fail 'module' object has no attribute '__plugoo__'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added ooni/plugins/.bridget.py.swp
Binary file not shown.
Binary file added ooni/plugins/.dnstamper.py.swp
Binary file not shown.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions ooni/plugins/dnstamper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from zope.interface import implements
from twisted.python import usage
from twisted.plugin import IPlugin
from plugoo.tests import ITest, TwistedTest

class SkelArgs(usage.Options):
optParameters = [['hosts', 'f', None, 'Hostname asset file'],
['dnsservers', 'd', None, 'DNS server asset file'],
['resume', 'r', 0, 'Resume at this index'],
['other', 'o', None, 'Other arguments']]

class SkelTest(TwistedTest):
implements(IPlugin, ITest)

shortName = "skeleton"
description = "Skeleton plugin"
requirements = None
options = SkelArgs

# We need to instantiate it otherwise getPlugins does not detect it
# XXX Find a way to load plugins without instantiating them.
skel = SkelTest(None, None)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e00625d

Please sign in to comment.