Skip to content

Instantly share code, notes, and snippets.

@parthaa
Created January 27, 2020 16:15
Show Gist options
  • Save parthaa/3e981aa2e9eb4370d2076bb5ff63f36d to your computer and use it in GitHub Desktop.
Save parthaa/3e981aa2e9eb4370d2076bb5ff63f36d to your computer and use it in GitHub Desktop.
cd hammer-cli-katello
vi $(bundle list apipie-binding)/lib/apipie_bindings/api.rb
locate "def call(resource_name, action_name, params={}, headers={}, options={})
just add these magical lines after
File.open("/tmp/call-logs","a") do |f|
f.puts "\n\nCaller -> #{caller.grep(/katello/).join('\n')}"
f.puts "resource - #{resource_name}, action_name, - #{action_name}, params - #{params.inspect}, head - #{headers.inspect}, options - #{options.inspect} "
end
just after the call before ohter stuff in call method gets run
tail /tmp/call-logs and run your tests to see what exactly gets sent over
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment