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

Fixes #14637 - taxonomy to rules API added #280

Closed
wants to merge 1 commit into from

Conversation

shlomizadok
Copy link
Member

No description provided.

@dLobatog
Copy link
Member

@shlomizadok Please check out test failures - although currently there's a problem that's throwing more failures because of https://github.com/theforeman/foreman/pull/3574/files#diff-07cbb99bfdb4bed86ad02486bb5adde2R174

@lzap
Copy link
Member

lzap commented Jul 11, 2016

We actually have two issues:

undefined local variable or method `accessible_hostgroups'

PR is pending for this one, I'd like to merge it ASAP. Then:

undefined method `enable_orchestration!'

I have reported this one as http://projects.theforeman.org/issues/15645

Edit: @dLobatog created the same report a minute ago :-) Dupe of http://projects.theforeman.org/issues/15644 then.

@lzap lzap changed the title Fixes #14637 - Adds Taxonomy to API Fixes #14637 - taxonomy to rules API added Jul 20, 2016
@lzap
Copy link
Member

lzap commented Jul 20, 2016

@shlomizadok develop is green again, please rebase and also reword the commit message to Fixes #14637 - taxonomy to rules API added thank you!

@shlomizadok
Copy link
Member Author

@lzap - Thanks. Rebased and reworded

organization = FactoryGirl.create(:organization)
put :update, { :id => rule.to_param, :discovery_rule => { :organization_ids => [organization.id] } }
assert_response :success
assert_equal(rule.organization_id, organization.id)
Copy link
Member

Choose a reason for hiding this comment

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

  1) Error:
Api::V2::DiscoveryRulesControllerTest#test_0005_should update taxonomy for discovery rule:
NoMethodError: undefined method `organization_id' for #<DiscoveryRule:0x0055e20df64cb8>
Did you mean?  organization_ids
               organization_ids=
               organization_ids_was
               organizations
               organizations=
    /home/lzap/work/foreman_discovery/test/functional/api/v2/discovery_rules_controller_test.rb:56:in `block in <class:DiscoveryRulesControllerTest>'

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, have a typo there... will fix soon

2016-07-21 11:24 GMT+03:00 Lukáš Zapletal notifications@github.com:

In test/functional/api/v2/discovery_rules_controller_test.rb
#280 (comment)
:

@@ -48,6 +48,14 @@ class Api::V2::DiscoveryRulesControllerTest < ActionController::TestCase
assert_response :success
end

  • test "should update taxonomy for discovery rule" do
  • rule = FactoryGirl.create(:discovery_rule)
  • organization = FactoryGirl.create(:organization)
  • put :update, { :id => rule.to_param, :discovery_rule => { :organization_ids => [organization.id] } }
  • assert_response :success
  • assert_equal(rule.organization_id, organization.id)
  1. Error:
    Api::V2::DiscoveryRulesControllerTest#test_0005_should update taxonomy for discovery rule:
    NoMethodError: undefined method organization_id' for #<DiscoveryRule:0x0055e20df64cb8> Did you mean? organization_ids organization_ids= organization_ids_was organizations organizations= /home/lzap/work/foreman_discovery/test/functional/api/v2/discovery_rules_controller_test.rb:56:inblock in class:DiscoveryRulesControllerTest'


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/theforeman/foreman_discovery/pull/280/files/47fc7d899fd416aae8c8a29cde45ceff72329966#r71664975,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAadr7GV3RBOkn_1a8oUKxMedNlRy9dqks5qXyyngaJpZM4JAC6R
.

@dLobatog
Copy link
Member

👍 pending Jenkins

@dLobatog
Copy link
Member

Merged as 2aea550, thanks @shlomizadok!

@dLobatog dLobatog closed this Jul 21, 2016
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.

5 participants