-
Notifications
You must be signed in to change notification settings - Fork 900
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
Specify the FQ class name for the provisioning manager #23330
Specify the FQ class name for the provisioning manager #23330
Conversation
Rails 7.1 added validations here that raise in the foreman provider specs. This commit resolves it for those specs: 3) ManageIQ::Providers::Foreman::Provider#destroy will remove all child objects Failure/Error: provider.provisioning_manager.operating_system_flavors = NameError: Missing model class ProvisioningManager for the OperatingSystemFlavor#provisioning_manager association. You can specify a different model class with the :class_name option. # ./spec/models/manageiq/providers/foreman/provider_spec.rb:50:in `block (3 levels) in <top (required)>' # ------------------ # --- Caused by: --- # NameError: # uninitialized constant OperatingSystemFlavor::ProvisioningManager # ./spec/models/manageiq/providers/foreman/provider_spec.rb:50:in `block (3 levels) in <top (required)>'
@miq-bot cross-repo-tests /providers |
From Pull Request: ManageIQ/manageiq#23330
@@ -1,6 +1,6 @@ | |||
class OperatingSystemFlavor < ApplicationRecord | |||
acts_as_miq_taggable | |||
belongs_to :provisioning_manager | |||
belongs_to :provisioning_manager, :class_name => "ManageIQ::Providers::ProvisioningManager" |
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.
I believe this is a problem because this class is outside of the ManageIQ::Provider namespace so it doesn't resolve the name solely by the name of the association.
I'm kind of amazed this ever worked |
Agreed. It makes me worried how we can find others if they're not covered by tests. 🤔 |
Rails 7.1 added validations here that raise in the foreman provider specs. This commit resolves it for those specs:
Extracted from #23225