-
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
introduce clusterless hosts as an association #20047
Conversation
hosts = FactoryBot.create_list(:host, 2, :ext_management_system => ems) | ||
FactoryBot.create_list(:host, 2, :ext_management_system => ems, :ems_cluster => cluster) | ||
|
||
expect(ems.clusterless_hosts).to match_array(hosts) |
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.
How about 1 host with a cluster and 1 clusterless host and assert only the latter is returned?
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.
Keenan pointed me at line 34 where it's creating a clustered host so we can be sure it's only returning the non-clustered hosts and not the clustered ones. 👍
f1eb50e
to
0eced14
Compare
0eced14
to
b0dc064
Compare
Checked commit kbrock@b0dc064 with ruby 2.5.7, rubocop 0.69.0, haml-lint 0.28.0, and yamllint |
Note, rails 5.1 seems to have just discarded bogus associations when you call preload but 5.2 is very picky and complains. |
introduce clusterless hosts as an association (cherry picked from commit 7320484)
Jansa backport details:
|
This was causing an issue when the association was references (but it wasn't really an association)