diff --git a/xCAT-server/xCAT-wsapi/xcatws-test.sh b/xCAT-server/xCAT-wsapi/xcatws-test.sh index 6504576b7..b18edf98e 100755 --- a/xCAT-server/xCAT-wsapi/xcatws-test.sh +++ b/xCAT-server/xCAT-wsapi/xcatws-test.sh @@ -1,11 +1,13 @@ #!/bin/bash # IBM(c) 2014 EPL license http://www.eclipse.org/legal/epl-v10.html -# Test driver for xcatws.cgi +# Test driver for xcatws.cgi, pass two arguments to it, user and password. +# Usage example: ./xcatws-test.sh wsuer cluster -user = '' -pw = '' -format = 'format=json&pretty=1' + +user=$1 +pw=$2 +format='format=json&pretty=1' #todo: add a test case for every api call that is documented #todo: figure out why i currently have to specify -k @@ -27,4 +29,4 @@ curl -X GET -k "https://127.0.0.1/xcatws/images/bp-netboot?userName=$user&passwo #todo: remove when these test cases are in xcatws-test.pl ./xcatws-test.pl -u "https://127.0.0.1/xcatws/nodes/test001?userName=$user&password=$pw" -m GET -./xcatws-test.pl -u "https://127.0.0.1/xcatws/nodes/test001?userName=$user&password=$pw" -m PUT "nodepos.room=foo" \ No newline at end of file +./xcatws-test.pl -u "https://127.0.0.1/xcatws/nodes/test001?userName=$user&password=$pw" -m PUT "nodepos.room=foo"