summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Luethi <rl@patchworkscience.org>2017-11-13 09:48:44 +0100
committerRoger Luethi <rl@patchworkscience.org>2017-11-13 15:53:27 +0100
commit9ad24ffd47d236e566533078cbcec167d4f2ba01 (patch)
treef77a8fcc86057beadc3749790f3e6fd33ed2190e
parent7f4f94e57b893fd9ffed6243314528dc5b257cc5 (diff)
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: I45754d269598b821f0b86b6257556ebfe74dcd6b
Notes
Notes (review): Code-Review+2: Christoph Albers <c.albers@x-ion.de> Code-Review+2: Samuel Cassiba <s@cassiba.com> Workflow+1: Samuel Cassiba <s@cassiba.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 17 Nov 2017 19:30:40 +0000 Reviewed-on: https://review.openstack.org/519374 Project: openstack/cookbook-openstack-telemetry Branch: refs/heads/master
-rw-r--r--recipes/identity_registration.rb1
-rw-r--r--spec/identity_registration_spec.rb1
2 files changed, 0 insertions, 2 deletions
diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb
index 0dd3034..2e4de77 100644
--- a/recipes/identity_registration.rb
+++ b/recipes/identity_registration.rb
@@ -90,7 +90,6 @@ connection_params = {
90 # Register Service User 90 # Register Service User
91 openstack_user service_user do 91 openstack_user service_user do
92 project_name service_tenant_name 92 project_name service_tenant_name
93 role_name service_role
94 password service_pass 93 password service_pass
95 connection_params connection_params 94 connection_params connection_params
96 end 95 end
diff --git a/spec/identity_registration_spec.rb b/spec/identity_registration_spec.rb
index d455ffd..c2f5992 100644
--- a/spec/identity_registration_spec.rb
+++ b/spec/identity_registration_spec.rb
@@ -76,7 +76,6 @@ describe 'openstack-telemetry::identity_registration' do
76 service_user 76 service_user
77 ).with( 77 ).with(
78 project_name: project_name, 78 project_name: project_name,
79 role_name: role_name,
80 password: password, 79 password: password,
81 connection_params: connection_params 80 connection_params: connection_params
82 ) 81 )