add cases0
This commit is contained in:
parent
8a6c4b642f
commit
2aabbf40e6
65
xCAT-test/autotest/testcase/restapi/policy/cases0
Normal file
65
xCAT-test/autotest/testcase/restapi/policy/cases0
Normal file
@ -0,0 +1,65 @@
|
||||
start:get_policy_all
|
||||
description: get_policy_all
|
||||
cmd:restapitest -m GET -r /policy
|
||||
check:rc==200
|
||||
cmdcheck:restapitest -o '["1"]' -O ==
|
||||
end
|
||||
|
||||
start:get_policy_attr
|
||||
description: get_policy_attr
|
||||
cmd:restapitest -m GET -r /policy/1
|
||||
check:rc==200
|
||||
cmdcheck:restapitest -o '{"1":{"name":"root"}}' -O ==
|
||||
end
|
||||
|
||||
start:put_policy_attr
|
||||
description: put_policy_attr
|
||||
cmd:restapitest -m PUT -r /policy/1 -d '{"name":"root1"}'
|
||||
check:rc==200
|
||||
end
|
||||
|
||||
start:get_policy_attr_for_put
|
||||
description: get_policy_attr_for_put
|
||||
cmd:restapitest -m GET -r /policy/1
|
||||
check:rc==200
|
||||
cmdcheck:restapitest -o '{"1":{"name":"root1"}}' -O ==
|
||||
end
|
||||
|
||||
start:put_policy_attr_changeback
|
||||
description: put_policy_attr_changeback
|
||||
cmd:restapitest -m PUT -r /policy/1 -d '{"name":"root"}'
|
||||
check:rc==200
|
||||
end
|
||||
|
||||
start:post_policy
|
||||
description: post_policy
|
||||
cmd:restapitest -m POST -r /policy/11 -d '{"name":"root1",,"commands":"rpower"}'
|
||||
check:rc==201
|
||||
end
|
||||
|
||||
start:get_policy_attr_for_post
|
||||
description: get_policy_attr_for_post
|
||||
cmd:restapitest -m GET -r /policy/11
|
||||
check:rc==200
|
||||
cmdcheck:restapitest -o '{"11":{"name":"root1"}}' -O ==
|
||||
end
|
||||
|
||||
start:delete_policy
|
||||
description: delete_policy
|
||||
cmd:restapitest -m DELETE -r /policy/11
|
||||
check:rc==200
|
||||
cmdcheck:restapitest -o '["11"]' -O !=
|
||||
end
|
||||
|
||||
start:get_policy_attrs
|
||||
description: get_policy_attrs
|
||||
cmd:restapitest -m GET -r /policy/1/attrs/name,rule
|
||||
check:rc==200
|
||||
cmdcheck:restapitest -o '{"1":{"name":"root"}}' -O ==
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user