-
Notifications
You must be signed in to change notification settings - Fork 87
Fixes #14307 - Change katello id resolver to not use 'name' parameters #1013
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
base: main
Are you sure you want to change the base?
Conversation
gformisa
commented
Nov 15, 2025
- Delete override to allow katello api to use search: {name: 'foo'}
- Now katello api use search from Foreman super class
23a605f to
2012259
Compare
* Delete override to allow katello api to use search: {name: 'foo'}
* Now katello api use search from Foreman super class
|
The tests are failing, below one example about error: The test expects something like this: But from my change now is receiving the correct form support, from foreman: |
|
I think the key to fixing the tests is to compare: vs The test helpers likely need updates, or perhaps the methods they use within. For example, for products:
|
|
To fix the test API expectations that are looking for the old style parameters, it looks like these files need updating: The arguments passed into expect_generic_product_search should match what hammer is actually sending to the fake API in the tests (i.e. the unexpected parameters failing the test). To fix the undefined method test errors, we need to do one of the following:
|
| alias_method :create_search_options, :create_search_options_with_katello_api | ||
| # alias_method :create_search_options_without_katello_api, :create_search_options | ||
| # alias_method :create_search_options, :create_search_options_with_katello_api | ||
| def create_search_options(options, resource, mode = nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method can likely be removed. Calling it with super alone is just calling the parent, which means the wrapper should be unnecessary.
| module SearchOptionsCreators | ||
| include HammerCLIKatello::ForemanSearchOptionsCreators | ||
|
|
||
| #include HammerCLIKatello::ForemanSearchOptionsCreators |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only place where HammerCLIKatello::ForemanSearchOptionsCreators is included, so perhaps the entire HammerCLIKatello::ForemanSearchOptionsCreators can be deleted.