From 9fd9bd53fde47129a43fa1416c48c4843721ea09 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 16 Aug 2019 10:20:26 +0200 Subject: [PATCH] api-test: update curl examples Signed-off-by: Wolfgang Bumiller --- api-test/example.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api-test/example.sh b/api-test/example.sh index 8cea72df..55a70a39 100644 --- a/api-test/example.sh +++ b/api-test/example.sh @@ -20,3 +20,11 @@ curl -XPOST -H 'Content-type: application/json' \ -d '{"entry":{"mount_type":"volume","source":"/source","destination":"/destination","ro":true}}' \ 'http://127.0.0.1:3000/api/1/mount/rootfs' echo + +echo "Calling /api/1/mount/rootfs again, but with a destination which does NOT match the regex" +echo "Expect an error:" +# with the optional 'ro' field +curl -XPOST -H 'Content-type: application/json' \ + -d '{"entry":{"mount_type":"volume","source":"/source","destination":"./foo","ro":true}}' \ + 'http://127.0.0.1:3000/api/1/mount/rootfs' +echo