Skip to content

Instantly share code, notes, and snippets.

@johnpmitsch
Last active January 27, 2020 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnpmitsch/10b43c50adf6024130bda869807a29d3 to your computer and use it in GitHub Desktop.
Save johnpmitsch/10b43c50adf6024130bda869807a29d3 to your computer and use it in GitHub Desktop.
hammer testing probs

For Katello/hammer-cli-katello#720

Using partha's debug hack: https://gist.github.com/parthaa/3e981aa2e9eb4370d2076bb5ff63f36d

Caller -> /home/vagrant/hammer-cli-katello/test/functional/repository/create_test.rb:20:in `block (2 levels) in <top (required)>'
resource - repositories, action_name, - create, params - {"name"=>"repo1", "product_id"=>2, "content_type"=>"yum"}, head - {}, options - {:fake_response=>nil} 

test fails with:

 1) Failure:
create repository#test_0001_with basic options [/home/vagrant/.gem/ruby/gems/apipie-bindings-0.3.0/lib/apipie_bindings/api.rb:190]:
unexpected invocation: #<AnyInstance:ApipieBindings::API>.call_action(<Action repositories:create>, {"name" => "repo1", "product_id" => 2, "content_type" => "yum"}, {}, {:fake_response => nil})
unsatisfied expectations:
- expected exactly once, not yet invoked: create a repository
  #<AnyInstance:ApipieBindings::API>.call_action(:repository, :create, &block)
  expected params to match block at: /home/vagrant/hammer-cli-katello/test/functional/repository/create_test.rb:10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment