[Pkg-privacy-commits] [txtorcon] 32/96: fix integration tests
Jérémy Bobbio
lunar at moszumanska.debian.org
Sun Sep 6 18:33:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository txtorcon.
commit 0bfb46d9c6b1eaa36a78eac8260ecf04d66dcae9
Author: meejah <meejah at meejah.ca>
Date: Sat Jan 17 01:58:12 2015 -0700
fix integration tests
---
Dockerfile | 4 +++-
integration/hidden_service_listen_ports/container_run | 13 ++++---------
integration/timeout_tor_launch/README | 2 +-
3 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 069754f..9e1cbb1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,9 @@
FROM dockerbase-wheezy
RUN apt-get update
-RUN `awk '/BEGIN_INSTALL/,/END_INSTALL/' README.rst | /bin/grep apt-get | /bin/grep -v development`
+##RUN `awk '/BEGIN_INSTALL/,/END_INSTALL/' ./README.rst | /bin/grep apt-get | /bin/grep -v development`
+## above fails when run via Docker
+RUN apt-get install -y python-setuptools python-twisted python-ipaddr python-geoip graphviz tor
## we make our code available via a "container volume" (-v option to run)
## at /txtorcon
diff --git a/integration/hidden_service_listen_ports/container_run b/integration/hidden_service_listen_ports/container_run
index 58f56cc..14c21fa 100755
--- a/integration/hidden_service_listen_ports/container_run
+++ b/integration/hidden_service_listen_ports/container_run
@@ -32,12 +32,7 @@ config.ORPort = 0
hs_public_port = 80
#config.DataDirectory = 'tmp_datadir'
## note that TCPHiddenServiceEndpoint adds the config to above...
-hs_endpoint = txtorcon.TCPHiddenServiceEndpoint(reactor, config, hs_public_port)
-
-## register something to clean up our tempdir
-reactor.addSystemEventTrigger('before', 'shutdown',
- functools.partial(txtorcon.util.delete_file_or_tree,
- hs_endpoint.data_dir))
+hs_endpoint = txtorcon.TCPHiddenServiceEndpoint(reactor, config, hs_public_port)
def updates(prog, tag, summary):
p = ('#' * int(10*(prog/100.0))) + ('.'*(10 - int(10*(prog/100.0))))
@@ -51,12 +46,12 @@ def failed(f):
def main():
print "Launching Tor"
proto = yield txtorcon.launch_tor(config, reactor, progress_updates=updates)
-
+
print "Starting site"
site = server.Site(Simple())
port = yield hs_endpoint.listen(site)
-
- print port.onion_uri, port.onion_port, port.port
+
+ print port.address.onion_uri, port.address.onion_port, port.local_address
print "liftoff"
os.system("netstat -pltn")
diff --git a/integration/timeout_tor_launch/README b/integration/timeout_tor_launch/README
index 7c58428..9481f29 100644
--- a/integration/timeout_tor_launch/README
+++ b/integration/timeout_tor_launch/README
@@ -2,7 +2,7 @@ Tor Timeout Test
================
In issue #59 it is reported that killing a Tor process launched with
-launch_tor() can become wedged if we disconnect due to a timeout.
+launch_tor() can become wedged if we disconnect due to a timeout.
That is, if you provide a timeout to launch_tor() and tor hasn't
launched by the time that timeout fires then the underlying Tor isn't
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/txtorcon.git
More information about the Pkg-privacy-commits
mailing list