From 2aabbf40e654b94a8589564dac36dc28c2892913 Mon Sep 17 00:00:00 2001 From: yinle Date: Tue, 27 May 2014 14:40:18 -0700 Subject: [PATCH] add cases0 --- .../autotest/testcase/restapi/policy/cases0 | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 xCAT-test/autotest/testcase/restapi/policy/cases0 diff --git a/xCAT-test/autotest/testcase/restapi/policy/cases0 b/xCAT-test/autotest/testcase/restapi/policy/cases0 new file mode 100644 index 000000000..d007d40e3 --- /dev/null +++ b/xCAT-test/autotest/testcase/restapi/policy/cases0 @@ -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 + + + + + +