Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pluggable credential types method call #1259

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

nasark
Copy link
Member

@nasark nasark commented Apr 16, 2024

Originally credential types were hard coded in the Authentication class. With this change we can define credential types in the respective classes and then pull the info for the OPTIONS call from the new Authentications.credential_types method

Needed for:

@miq-bot assign @agrare
@miq-bot add_reviewer @agrare
@miq-bot add_labels enhancement

@nasark nasark force-pushed the pluggable_credential_type_options branch from f831148 to 968f4c0 Compare April 17, 2024 14:28
Comment on lines +482 to 486
if defined? klass::API_OPTIONS
klass::API_OPTIONS.tap do |options|
options[:attributes].each do |_k, val|
val[:type] = val[:type].to_s if val && val[:type]
end
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was needed in the specs because the nested hashes in the response contain string keys

@nasark
Copy link
Member Author

nasark commented Apr 17, 2024

miq-bot pushed a commit to ManageIQ/manageiq-cross_repo-tests that referenced this pull request Apr 17, 2024
@miq-bot
Copy link
Member

miq-bot commented Apr 17, 2024

Checked commit nasark@968f4c0 with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
2 files checked, 1 offense detected

spec/requests/authentications_spec.rb

@agrare agrare merged commit d0e0d70 into ManageIQ:master Apr 18, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants