diff options
author | asteroide <thomas.duval@orange.com> | 2015-09-17 17:01:52 +0200 |
---|---|---|
committer | asteroide <thomas.duval@orange.com> | 2015-09-17 17:01:52 +0200 |
commit | 6386ff9b606ddee37c14a1e8e7306d2d8c2bbcfd (patch) | |
tree | f65639e873c227e5e5f5fd9349d5600773fc759f | |
parent | b48cd70f5c2c115e1ed401492eaa62aa610ceaeb (diff) |
Fix some bugs in subjects tests and add objects and actions tests
Change-Id: Ie9c1954f7989385dee3fc909a65ee36ccc893626
-rw-r--r-- | moonclient/moonclient/tests/tests_actions.json | 236 | ||||
-rw-r--r-- | moonclient/moonclient/tests/tests_objects.json | 236 | ||||
-rw-r--r-- | moonclient/moonclient/tests/tests_subjects.json | 4 |
3 files changed, 474 insertions, 2 deletions
diff --git a/moonclient/moonclient/tests/tests_actions.json b/moonclient/moonclient/tests/tests_actions.json new file mode 100644 index 00000000..17fd886f --- /dev/null +++ b/moonclient/moonclient/tests/tests_actions.json @@ -0,0 +1,236 @@ +{ + "command_options": "-f value", + "tests_group": { + "authz": [ + { + "name": "list tenant", + "command": "tenant list", + "result": "(?!alt_demo)", + "description": "Check if tenant alt_demo is used." + }, + { + "name": "add tenant alt_demo", + "command": "tenant add alt_demo", + "result": "^$", + "description": "Add a new tenant", + "command_options": "" + }, + { + "name": "check tenant alt_demo", + "command": "tenant list", + "result": "(?P<uuid>\\w+)\\s+alt_demo", + "description": "Check that tenant alt_demo has been correctly added" + }, + { + "name": "create_intraextension_authz", + "command": "intraextension create --policy_model policy_authz authz_test", + "result": "IntraExtension created: (?P<uuid_authz>\\w+)", + "description": "Create an authz intra extension", + "command_options": "" + }, + { + "name": "list_intraextension_authz", + "command": "intraextension list", + "result": "$uuid_authz", + "description": "Check the existence of that authz intra extension" + }, + { + "name": "set_tenant_authz", + "command": "tenant set --authz $uuid_authz $uuid", + "result": "", + "description": "Connect the authz intra extension to the tenant alt_demo", + "command_options": "" + }, + { + "name": "select_authz_ie", + "command": "intraextension select $uuid_authz", + "result": "Select $uuid_authz IntraExtension.", + "description": "Select the authz IntraExtension", + "command_options": "" + }, + { + "name": "check_select_authz_ie", + "command": "intraextension show selected", + "result": "$uuid_authz", + "description": "Check the selected authz IntraExtension", + "command_options": "-c id -f value" + }, + { + "name": "add_action", + "command": "action add new_action_1", + "result": "", + "description": "Add a new action.", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action>\\w+)\\s+new_action_1", + "description": "Check that new_action_1 action was added." + }, + { + "name": "delete_action", + "command": "action delete $uuid_action", + "result": "^$", + "description": "Delete new_action_1 action.", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?!$uuid_action)", + "description": "Check that new_action_1 action was deleted." + }, + { + "name": "delete_authz_intra_extension", + "command": "intraextension delete $uuid_authz", + "result": "", + "description": "Delete the authz intra extension", + "command_options": "" + }, + { + "name": "delete_tenant", + "command": "tenant delete $uuid", + "result": "", + "description": "Delete the tenant alt_demo", + "command_options": "" + } + ], + "authz_and_admin": [ + { + "name": "list tenant", + "command": "tenant list", + "result": "(?!alt_demo)", + "description": "Check if tenant alt_demo is used." + }, + { + "name": "add tenant alt_demo", + "command": "tenant add alt_demo", + "result": "^$", + "description": "Add a new tenant", + "command_options": "" + }, + { + "name": "check tenant alt_demo", + "command": "tenant list", + "result": "(?P<uuid>\\w+)\\s+alt_demo", + "description": "Check that tenant alt_demo has been correctly added" + }, + { + "name": "create_intraextension_authz", + "command": "intraextension create --policy_model policy_authz authz_test", + "result": "IntraExtension created: (?P<uuid_authz>\\w+)", + "description": "Create an authz intra extension", + "command_options": "" + }, + { + "name": "list_intraextension_authz", + "command": "intraextension list", + "result": "$uuid_authz", + "description": "Check the existence of that authz intra extension" + }, + { + "name": "create_intraextension_admin", + "command": "intraextension create --policy_model policy_admin admin_test", + "result": "IntraExtension created: (?P<uuid_admin>\\w+)", + "description": "Create an admin intra extension", + "command_options": "" + }, + { + "name": "list_intraextension_admin", + "command": "intraextension list", + "result": "$uuid_admin", + "description": "Check the existence of that admin intra extension" + }, + { + "name": "set_tenant_authz", + "command": "tenant set --authz $uuid_authz $uuid", + "result": "", + "description": "Connect the authz intra extension to the tenant demo", + "command_options": "" + }, + { + "name": "set_tenant_admin", + "command": "tenant set --admin $uuid_admin $uuid", + "result": "", + "description": "Connect the authz intra extension to the tenant alt_demo", + "command_options": "" + }, + { + "name": "check tenant alt_demo and authz ie", + "command": "tenant list", + "result": "alt_demo $uuid_authz", + "description": "Check that authz intra extension has been correctly added to the tenant.", + "command_options": "-c name -c intra_authz_extension_id -f value" + }, + { + "name": "check tenant alt_demo and admin ie", + "command": "tenant list", + "result": "$uuid_admin", + "description": "Check that admin intra extension has been correctly added to the tenant.", + "command_options": "-c intra_admin_extension_id -f value" + }, + { + "name": "select_authz_ie", + "command": "intraextension select $uuid_authz", + "result": "Select $uuid_authz IntraExtension.", + "description": "Select the authz IntraExtension", + "command_options": "" + }, + { + "name": "check_select_authz_ie", + "command": "intraextension show selected", + "result": "$uuid_authz", + "description": "Check the selected authz IntraExtension", + "command_options": "-c id -f value" + }, + { + "name": "add_action", + "command": "action add new_action_1", + "result": "", + "description": "Add a new action.", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action>\\w+)\\s+new_action_1", + "description": "Check that new_action_1 action was added." + }, + { + "name": "delete_action", + "command": "action delete $uuid_action", + "result": "^$", + "description": "Delete new_action_1 action.", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?!$uuid_action)", + "description": "Check that new_action_1 action was deleted." + }, + { + "name": "delete_admin_intra_extension", + "command": "intraextension delete $uuid_admin", + "result": "", + "description": "Delete the admin intra extension", + "command_options": "" + }, + { + "name": "delete_authz_intra_extension", + "command": "intraextension delete $uuid_authz", + "result": "", + "description": "Delete the authz intra extension", + "command_options": "" + }, + { + "name": "delete_tenant", + "command": "tenant delete $uuid", + "result": "", + "description": "Delete the tenant alt_demo", + "command_options": "" + } + ] + } +}
\ No newline at end of file diff --git a/moonclient/moonclient/tests/tests_objects.json b/moonclient/moonclient/tests/tests_objects.json new file mode 100644 index 00000000..cb4e766a --- /dev/null +++ b/moonclient/moonclient/tests/tests_objects.json @@ -0,0 +1,236 @@ +{ + "command_options": "-f value", + "tests_group": { + "authz": [ + { + "name": "list tenant", + "command": "tenant list", + "result": "(?!alt_demo)", + "description": "Check if tenant alt_demo is used." + }, + { + "name": "add tenant alt_demo", + "command": "tenant add alt_demo", + "result": "^$", + "description": "Add a new tenant", + "command_options": "" + }, + { + "name": "check tenant alt_demo", + "command": "tenant list", + "result": "(?P<uuid>\\w+)\\s+alt_demo", + "description": "Check that tenant alt_demo has been correctly added" + }, + { + "name": "create_intraextension_authz", + "command": "intraextension create --policy_model policy_authz authz_test", + "result": "IntraExtension created: (?P<uuid_authz>\\w+)", + "description": "Create an authz intra extension", + "command_options": "" + }, + { + "name": "list_intraextension_authz", + "command": "intraextension list", + "result": "$uuid_authz", + "description": "Check the existence of that authz intra extension" + }, + { + "name": "set_tenant_authz", + "command": "tenant set --authz $uuid_authz $uuid", + "result": "", + "description": "Connect the authz intra extension to the tenant alt_demo", + "command_options": "" + }, + { + "name": "select_authz_ie", + "command": "intraextension select $uuid_authz", + "result": "Select $uuid_authz IntraExtension.", + "description": "Select the authz IntraExtension", + "command_options": "" + }, + { + "name": "check_select_authz_ie", + "command": "intraextension show selected", + "result": "$uuid_authz", + "description": "Check the selected authz IntraExtension", + "command_options": "-c id -f value" + }, + { + "name": "add_object", + "command": "object add nova_server_1", + "result": "", + "description": "Add a new object.", + "command_options": "" + }, + { + "name": "list_object", + "command": "object list", + "result": "(?P<uuid_object>\\w+)\\s+nova_server_1", + "description": "Check that nova_server_1 object was added." + }, + { + "name": "delete_object", + "command": "object delete $uuid_object", + "result": "^$", + "description": "Delete nova_server_1 object.", + "command_options": "" + }, + { + "name": "list_object", + "command": "object list", + "result": "(?!$uuid_object)", + "description": "Check that nova_server_1 object was deleted." + }, + { + "name": "delete_authz_intra_extension", + "command": "intraextension delete $uuid_authz", + "result": "", + "description": "Delete the authz intra extension", + "command_options": "" + }, + { + "name": "delete_tenant", + "command": "tenant delete $uuid", + "result": "", + "description": "Delete the tenant alt_demo", + "command_options": "" + } + ], + "authz_and_admin": [ + { + "name": "list tenant", + "command": "tenant list", + "result": "(?!alt_demo)", + "description": "Check if tenant alt_demo is used." + }, + { + "name": "add tenant alt_demo", + "command": "tenant add alt_demo", + "result": "^$", + "description": "Add a new tenant", + "command_options": "" + }, + { + "name": "check tenant alt_demo", + "command": "tenant list", + "result": "(?P<uuid>\\w+)\\s+alt_demo", + "description": "Check that tenant alt_demo has been correctly added" + }, + { + "name": "create_intraextension_authz", + "command": "intraextension create --policy_model policy_authz authz_test", + "result": "IntraExtension created: (?P<uuid_authz>\\w+)", + "description": "Create an authz intra extension", + "command_options": "" + }, + { + "name": "list_intraextension_authz", + "command": "intraextension list", + "result": "$uuid_authz", + "description": "Check the existence of that authz intra extension" + }, + { + "name": "create_intraextension_admin", + "command": "intraextension create --policy_model policy_admin admin_test", + "result": "IntraExtension created: (?P<uuid_admin>\\w+)", + "description": "Create an admin intra extension", + "command_options": "" + }, + { + "name": "list_intraextension_admin", + "command": "intraextension list", + "result": "$uuid_admin", + "description": "Check the existence of that admin intra extension" + }, + { + "name": "set_tenant_authz", + "command": "tenant set --authz $uuid_authz $uuid", + "result": "", + "description": "Connect the authz intra extension to the tenant demo", + "command_options": "" + }, + { + "name": "set_tenant_admin", + "command": "tenant set --admin $uuid_admin $uuid", + "result": "", + "description": "Connect the authz intra extension to the tenant alt_demo", + "command_options": "" + }, + { + "name": "check tenant alt_demo and authz ie", + "command": "tenant list", + "result": "alt_demo $uuid_authz", + "description": "Check that authz intra extension has been correctly added to the tenant.", + "command_options": "-c name -c intra_authz_extension_id -f value" + }, + { + "name": "check tenant alt_demo and admin ie", + "command": "tenant list", + "result": "$uuid_admin", + "description": "Check that admin intra extension has been correctly added to the tenant.", + "command_options": "-c intra_admin_extension_id -f value" + }, + { + "name": "select_authz_ie", + "command": "intraextension select $uuid_authz", + "result": "Select $uuid_authz IntraExtension.", + "description": "Select the authz IntraExtension", + "command_options": "" + }, + { + "name": "check_select_authz_ie", + "command": "intraextension show selected", + "result": "$uuid_authz", + "description": "Check the selected authz IntraExtension", + "command_options": "-c id -f value" + }, + { + "name": "add_object", + "command": "object add nova_server_1", + "result": "", + "description": "Add a new object.", + "command_options": "" + }, + { + "name": "list_object", + "command": "object list", + "result": "(?P<uuid_object>\\w+)\\s+nova_server_1", + "description": "Check that nova_server_1 object was added." + }, + { + "name": "delete_object", + "command": "object delete $uuid_object", + "result": "^$", + "description": "Delete nova_server_1 object.", + "command_options": "" + }, + { + "name": "list_object", + "command": "object list", + "result": "(?!$uuid_object)", + "description": "Check that nova_server_1 object was deleted." + }, + { + "name": "delete_admin_intra_extension", + "command": "intraextension delete $uuid_admin", + "result": "", + "description": "Delete the admin intra extension", + "command_options": "" + }, + { + "name": "delete_authz_intra_extension", + "command": "intraextension delete $uuid_authz", + "result": "", + "description": "Delete the authz intra extension", + "command_options": "" + }, + { + "name": "delete_tenant", + "command": "tenant delete $uuid", + "result": "", + "description": "Delete the tenant alt_demo", + "command_options": "" + } + ] + } +}
\ No newline at end of file diff --git a/moonclient/moonclient/tests/tests_subjects.json b/moonclient/moonclient/tests/tests_subjects.json index 284d1409..5c2a2294 100644 --- a/moonclient/moonclient/tests/tests_subjects.json +++ b/moonclient/moonclient/tests/tests_subjects.json @@ -130,14 +130,14 @@ }, { "name": "set_tenant_authz", - "command": "tenant set --authz $uuid_authz alt_demo", + "command": "tenant set --authz $uuid_authz $uuid", "result": "", "description": "Connect the authz intra extension to the tenant demo", "command_options": "" }, { "name": "set_tenant_admin", - "command": "tenant set --admin $uuid_admin alt_demo", + "command": "tenant set --admin $uuid_admin $uuid", "result": "", "description": "Connect the authz intra extension to the tenant alt_demo", "command_options": "" |