summaryrefslogtreecommitdiffstats
path: root/src/tests/intg
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2017-03-14 15:34:57 +0100
committerJakub Hrozek <jhrozek@redhat.com>2017-03-27 09:58:40 +0200
commitc9db8b8b19827c3d492b8d2769aa77a37dbc12d3 (patch)
tree16a80ecdd3478ba6dfc03b667628439e52540a13 /src/tests/intg
parent60612b5fbdaaa62ebe6c7f4c27200316f08506d6 (diff)
downloadsssd-c9db8b8b19827c3d492b8d2769aa77a37dbc12d3.tar.gz
sssd-c9db8b8b19827c3d492b8d2769aa77a37dbc12d3.tar.xz
sssd-c9db8b8b19827c3d492b8d2769aa77a37dbc12d3.zip
TCURL: Support HTTP POST for creating containers
The curl integration must allow us to create containers, therefore we also add support of the POST HTTP request type. Reviewed-by: Michal Židek <mzidek@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/tests/intg')
-rw-r--r--src/tests/intg/test_secrets.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/tests/intg/test_secrets.py b/src/tests/intg/test_secrets.py
index cbc1a1f06..d71c19045 100644
--- a/src/tests/intg/test_secrets.py
+++ b/src/tests/intg/test_secrets.py
@@ -271,6 +271,34 @@ def test_curlwrap_crd_ops(setup_for_secrets,
'http://localhost/secrets/foo'],
404)
+ # Create a container
+ run_curlwrap_tool([curlwrap_tool, '-o',
+ '-v', '-s', sock_path,
+ 'http://localhost/secrets/cont/'],
+ 200)
+
+ # set a secret foo:bar
+ run_curlwrap_tool([curlwrap_tool, '-p',
+ '-v', '-s', sock_path,
+ 'http://localhost/secrets/cont/cfoo',
+ 'foo_under_cont'],
+ 200)
+
+ # list secrets
+ output = run_curlwrap_tool([curlwrap_tool,
+ '-v', '-s', sock_path,
+ 'http://localhost/secrets/cont/'],
+ 200)
+ assert "cfoo" in output
+
+ # get the foo secret
+ output = run_curlwrap_tool([curlwrap_tool,
+ '-v', '-s', sock_path,
+ 'http://localhost/secrets/cont/cfoo'],
+ 200)
+ assert "foo_under_cont" in output
+
+
def test_curlwrap_parallel(setup_for_secrets,
curlwrap_tool):