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 #8867 - fixes activation key dynflow update passing in nil variables #4904

Merged
merged 1 commit into from Jan 30, 2015

Conversation

cfouant
Copy link
Member

@cfouant cfouant commented Jan 8, 2015

No description provided.

@@ -15,15 +15,27 @@ module Katello
module ActivationKey
class Update < Actions::EntryAction
def plan(activation_key, activation_key_params)
cp_call = cp_changed?(activation_key.auto_attach, activation_key_params[:auto_attach]) ||
cp_changed?(activation_key.service_level, activation_key_params[:service_level]) ||
cp_changed?(activation_key.release_version, activation_key_params[:release_version])
Copy link
Member

Choose a reason for hiding this comment

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

I might wrap this in a function call itself as well, so that further down you could just do:

if update_candlepin?(activation_key, params)
....
...
end

This encapsulates the logic and allows anyone reading the code to skip over this chunk if they don't need to see the details of it.

@ehelms
Copy link
Member

ehelms commented Jan 15, 2015

A test for the dynflow action would be nice to provide basic confirmation that the Candlepin update task is called in the right scenario and not called in the other scenario.

@cfouant
Copy link
Member Author

cfouant commented Jan 17, 2015

@ehelms - I added tests for the update actions in Katello, wrote tests for all three Dynflow case actions in Candlepin, encapsulated (and commented) code inside the Dynflow update function. Let me know if you have any other questions/suggestions!

@ehelms
Copy link
Member

ehelms commented Jan 30, 2015

Tested and worked great for me! ACK

cfouant added a commit that referenced this pull request Jan 30, 2015
fixes #8867 - fixes activation key dynflow update passing in nil variables
@cfouant cfouant merged commit db5be81 into Katello:master Jan 30, 2015
@cfouant cfouant deleted the actkey-dynflow-fix branch January 30, 2015 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants