Closed overag3 closed 3 years ago
Test already exists in auth_spec.rb file but i found the real problem...
In params manifest(L62, L168), the type of auth_users variable is hash but in spec tests and in real.properties.erb template file, the type of auth_users needs to be a array not hash.
Besides, is line 62 necessary ?
Good finds. Yeah, looks like auth_users
in params.pp line 62 is unused. The template also treats it as a hash, in addition to an array: https://github.com/voxpupuli/puppet-rundeck/blob/8b257e4507eaafae349544080d9ee6ecfc664835/templates/realm.properties.erb#L35
This module needs better data typing and better testing. :unamused:
Am I modifying the params.pp file in this PR ?
I have never written spec tests before. :worried:
Good finds. Yeah, looks like
auth_users
in params.pp line 62 is unused. The template also treats it as a hash, in addition to an array:This module needs better data typing and better testing. unamused
Yes, auth_users
is a array of hashes. Example is available in :
Tell me what I can do to solve this issue.
Regards
I think this PR is fine as is since it fixes the problem. We can make other PRs for overhauling the data types and testing. I'm just waiting for anyone else to provide feedback here, otherwise I think we can merge this soon.
Pull Request (PR) description
This changeset fix issue when @auth_config['file']['auth_users'] hash is empty, a colon added in realm.properties file when it shouldn't. Fix also wrong indentation.
This Pull Request (PR) fixes the following issues
Fixes #459