Create user demo if he doesn't exist and force his passord. 69/21769/1
authorThomas Duval <thomas.duval@orange.com>
Thu, 8 Sep 2016 14:04:45 +0000 (16:04 +0200)
committerThomas Duval <thomas.duval@orange.com>
Tue, 20 Sep 2016 08:38:38 +0000 (10:38 +0200)
Change-Id: Ifbf1514e7694d241e85a151a2aab5e00bfd06043
(cherry picked from commit bbe7fc7d91252ad454df8c7b3407cd7478badddd)

moonclient/moonclient/tests/tests_empty_policy_new_user.json

index b5a762c..311f59e 100644 (file)
         "result": "",
         "description": "Create a new tenant"
       },
+      {
+        "name": "create user demo",
+        "external_command": "openstack user create --password console",
+        "result": "",
+        "description": "Create user demo"
+      },
       {
         "name": "add role admin to demo",
         "external_command": "openstack role add --project admin --user demo admin",
 
       {
         "name": "demo: check nova command",
-        "external_command": "nova --os-user-name demo --os-project-name demo list",
+        "external_command": "nova --os-user-name demo --os-project-name demo --os-password console list",
         "result": "test_moonclient",
         "description": "Check demo can list nova servers due to the current rules"
       },
       {
         "name": "demo: try to pause nova instance",
-        "external_command": "nova --os-username demo --os-project-name demo pause $uuid_server",
+        "external_command": "nova --os-username demo --os-project-name demo --os-password console pause $uuid_server",
         "result": "^$",
         "description": "Pausing the server must be impossible due to the current rules"
       },
       {
         "name": "check nova command",
-        "external_command": "nova --os-user-name demo  --os-project-name demo list",
+        "external_command": "nova --os-user-name demo  --os-project-name demo --os-password console list",
         "result": "\\| (?P<uuid_server>[\\w\\-]+)\\s+\\| test_moonclient\\s+\\| ACTIVE\\s+\\| [\\w\\-]+\\s+\\| Running",
         "description": "Check that nova server is still in running state."
       },