From 9bd4339b3b59b29dd532ef98830178320ecd6742 Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Mon, 13 Nov 2017 10:39:19 +0100 Subject: [PATCH] Remove superfluous role_name arguments This patch removes the role_name when using openstack_user's :create action (it gets ignored by the target method). Note that the spec test would still pass if only the line in identity_registration.rb (but not the test) were changed, because the code that actually does grant the role to the resource is executed right after user creation and before any tests check the resource for the existence of the role_name attribute. In other words: if the argument were required in a call but only supplied in another call, the spec tests would not catch it. Something to watch out for. Change-Id: I92b47cd0156e4146a40ca7be89c102a625b5bdf6 --- recipes/setup.rb | 1 - spec/setup_spec.rb | 2 -- 2 files changed, 3 deletions(-) diff --git a/recipes/setup.rb b/recipes/setup.rb index f035420..acfb1cd 100644 --- a/recipes/setup.rb +++ b/recipes/setup.rb @@ -74,7 +74,6 @@ connection_params = { openstack_user service_user do project_name service_project - role_name service_role password service_pass connection_params connection_params end diff --git a/spec/setup_spec.rb b/spec/setup_spec.rb index 40f6542..b17a655 100644 --- a/spec/setup_spec.rb +++ b/spec/setup_spec.rb @@ -41,7 +41,6 @@ describe 'openstack-integration-test::setup' do 'tempest_user1' ).with( project_name: 'tempest_project1', - role_name: 'Member', password: 'tempest_user1_pass', connection_params: connection_params ) @@ -89,7 +88,6 @@ describe 'openstack-integration-test::setup' do 'tempest_user2' ).with( project_name: 'tempest_project2', - role_name: 'Member', password: 'tempest_user2_pass', connection_params: connection_params )