Project

General

Profile

Bug #25407

Katello::Resources::Candlepin::Consumer.get not always returns HashWithIndifferentAccess

Added by Evgeni Golov almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:

Description

ActiveSupport::HashWithIndifferentAccess allows to access Hashes in Ruby by either 'string' or :symbol Katello::Resources::Candlepin::Consumer.get will return a HashWithIndifferentAccess when called with a String param, but will only return a regular Hash when called with a Hash full of params.

As we use symbol-access in many places (like in Katello::Actions::Katello::Host::HypervisorsUpdate), but the data comes from JSON.parse originally, we should always map to HashWithIndifferentAccess

Associated revisions

Revision 8d3cad2f (diff)
Added by Evgeni Golov almost 2 years ago

Fixes #25407 - always return HashWithIndifferentAccess

Revision 1c21a097 (diff)
Added by Evgeni Golov almost 2 years ago

Refs #25407 - update tests to return HashWithIndifferentAccess

History

#1 Updated by The Foreman Bot almost 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7817 added

#2 Updated by Evgeni Golov almost 2 years ago

  • Triaged changed from Yes to No

#3 Updated by Justin Sherrill almost 2 years ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.10.0

#4 Updated by Evgeni Golov almost 2 years ago

  • Status changed from Ready For Testing to Closed

#5 Updated by The Foreman Bot almost 2 years ago

  • Pull request https://github.com/Katello/katello/pull/7872 added

#6 Updated by John Mitsch almost 2 years ago

  • Bugzilla link set to 1653386

Also available in: Atom PDF