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:
parent
7c22110a7e
commit
a6a6c1371f
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user