2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

Add testcase for nodeshell REST API method

This commit is contained in:
Mark Gurevich 2022-01-06 14:32:34 -05:00
parent 7c22110a7e
commit a6a6c1371f
2 changed files with 9 additions and 0 deletions

View File

@ -24,4 +24,5 @@ restapi_list_invalid_resource
restapi_list_wrong_osimage
restapi_modify_wrong_field_CN
restapi_delete_temp_CN_put
restapi_nodeshell_cmd_root
restapi_cleanup_on_MN_CN

View File

@ -237,3 +237,11 @@ cmd:username=__GETTABLEVALUE(key,system,username,passwd)__;password=__GETTABLEVA
check:rc==0
check:output=~'vmmemori' is not a valid attribute name for an object type
end
start:restapi_nodeshell_cmd_root
description: Call nodeshell method to execute a command by root user
label:restapi
cmd:username=__GETTABLEVALUE(key,system,username,passwd)__;password=__GETTABLEVALUE(key,system,password,passwd)__;xdsh $$CN "curl -X POST -s --cacert /root/ca-cert.pem 'https://$$MN/xcatws/nodes/$$CN/nodeshell?userName=$username&userPW=$password' -H Content-Type:application/json --data '{\"command\":\"id\"}'"
check:rc==0
check:output=~root
end