From 5d48aba7b65dfad09bfc639e3434f03227b8bd50 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Tue, 11 Apr 2017 16:41:33 +0530 Subject: create: support 'auth enable' option This patch add support to enable auth while create. The schematics of authentication setting for/while create, looks like $ gluster-block create block-test/sample-block ha 1 auth enable \ 192.168.0.105 1GiB --json-pretty { "IQN":"iqn.2016-12.org.gluster-block:dc6cca79-f9b7-44f5-acaf-ac81c9cc7c2e", "USERNAME":"dc6cca79-f9b7-44f5-acaf-ac81c9cc7c2e", "PASSWORD":"ae48635a-6902-454c-949a-f2ad0e056086", "PORTAL(S)":[ "192.168.0.105:3260" ], "RESULT":"SUCCESS" } Change-Id: Ib8f5ddd904cb879e0ee05f6a7c3c381c6615a0e4 Fixes: #5 Signed-off-by: Prasanna Kumar Kalever --- tests/basic.t | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/basic.t b/tests/basic.t index 6d8aa1a..3b8e677 100755 --- a/tests/basic.t +++ b/tests/basic.t @@ -94,6 +94,12 @@ TEST gluster-block modify ${VOLNAME}/${BLKNAME} auth disable # Block delete gluster-block delete ${VOLNAME}/${BLKNAME} +# Block create with auth set +TEST gluster-block create ${VOLNAME}/${BLKNAME} ha 1 auth enable ${HOST} 1GiB + +# Block delete +TEST gluster-block delete ${VOLNAME}/${BLKNAME} + echo -e "\n*** JSON responses ***\n" # Block create and expect json response @@ -111,4 +117,10 @@ TEST gluster-block info ${VOLNAME}/${BLKNAME} --json-pretty # Modify Block with auth disable and expect json response TEST gluster-block modify ${VOLNAME}/${BLKNAME} auth disable --json-pretty +# Block delete and expect json response +TEST gluster-block delete ${VOLNAME}/${BLKNAME} --json-pretty + +# Block create with auth set and expect json response +TEST gluster-block create ${VOLNAME}/${BLKNAME} ha 1 auth enable ${HOST} 1GiB --json-pretty + cleanup; -- cgit