From cb414a9655e1229faffe74ffb555247739d1b920 Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Fri, 10 Nov 2017 10:26:32 +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: I559ffa40c37f8e073a8e7fcb5186f2270e5ccd72 --- recipes/identity_registration.rb | 2 -- spec/identity_registration_spec.rb | 2 -- 2 files changed, 4 deletions(-) diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb index 186eba88..c98660da 100644 --- a/recipes/identity_registration.rb +++ b/recipes/identity_registration.rb @@ -101,14 +101,12 @@ end # Register Service Users openstack_user service_user do project_name service_project_name - role_name service_role password service_pass connection_params connection_params end openstack_user placement_service_user do project_name service_project_name - role_name service_role password placement_service_pass connection_params connection_params end diff --git a/spec/identity_registration_spec.rb b/spec/identity_registration_spec.rb index d06644a3..94d7741f 100644 --- a/spec/identity_registration_spec.rb +++ b/spec/identity_registration_spec.rb @@ -95,7 +95,6 @@ describe 'openstack-compute::identity_registration' do service_user ).with( project_name: project_name, - role_name: role_name, password: password, connection_params: connection_params ) @@ -106,7 +105,6 @@ describe 'openstack-compute::identity_registration' do placement_service_user ).with( project_name: project_name, - role_name: role_name, password: placement_password, connection_params: connection_params )