From 92e35e55d82e7cbb125da0c32eacec080eea2a54 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 6 Oct 2015 15:44:13 +0200 Subject: Add support for using listening on TCP sockets The server can be now configured using a new parameter called "server_url". Setting server_url to "http://0.0.0.0:80/" will make the server listen on TCP port 80, while setting it to "http+unix://%2fsocket" will make the server listen on the unix socket named "/socket". The backwards compatible "server_socket" is retained and used if no server_url is provided. The request dict has a new field "client_id" that contains either a PID or a peer name. In the future the field can be augmented with a TLS client cert DN or other similar identifier. Signed-off-by: Christian Heimes Signed-off-by: Simo Sorce --- tests/custodia.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/custodia.py b/tests/custodia.py index ed80010..dc4a662 100644 --- a/tests/custodia.py +++ b/tests/custodia.py @@ -26,8 +26,11 @@ class CustodiaTests(unittest.TestCase): with (open('testlog.txt', 'a')) as logfile: p = subprocess.Popen([pexec, 'custodia/custodia'], env=env, stdout=logfile, stderr=logfile) - cls.custodia_process = p time.sleep(1) + if p.poll() is not None: + raise AssertionError( + "Premature termination of Custodia server, see testlog.txt") + cls.custodia_process = p cls.client = CustodiaClient('http+unix://%2E%2Fserver_socket/secrets') cls.client.headers['REMOTE_USER'] = 'test' cls.fwd = CustodiaClient('http+unix://%2E%2Fserver_socket/forwarder') -- cgit