summaryrefslogtreecommitdiffstats
path: root/tests/custodia.py
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2015-10-06 15:44:13 +0200
committerSimo Sorce <simo@redhat.com>2015-10-19 12:18:30 -0400
commit92e35e55d82e7cbb125da0c32eacec080eea2a54 (patch)
tree9c030734543e3d618fc12999dd2648286e363ee4 /tests/custodia.py
parentb20b47b100b2716273a5abfe2850e994c1d3e69d (diff)
downloadcustodia-92e35e55d82e7cbb125da0c32eacec080eea2a54.tar.gz
custodia-92e35e55d82e7cbb125da0c32eacec080eea2a54.tar.xz
custodia-92e35e55d82e7cbb125da0c32eacec080eea2a54.zip
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 <cheimes@redhat.com> Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'tests/custodia.py')
-rw-r--r--tests/custodia.py5
1 files changed, 4 insertions, 1 deletions
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')