Test Scenarios¶
Prereqs¶
Subscriptions Queue ( if katello-installer was used the queue name would be katello_event_queue )¶
qpid_messaging gem requires that qpid-cpp-client-devel and qpid-cpp-client be present and can be found in the katello-pulp nighties repo.
ensure that /etc/qpid/qpidc.conf exists
if it doens't exist create one using this example: https://gist.github.com/dustint-rh/7115f89cba4f389ab470
ensure your foreman user (the user rails starts as) is in the qpidd group.
May need to re-login to the shell to refresh the group membership for your user.
test to see if there is a 'subscriptions' queue bound to *.* event
qpid-config --ssl-certificate /etc/pki/katello/certs/java-client.crt --ssl-key /etc/pki/katello/private/java-client.key -b 'amqps://localhost:5671' queues -r
and check that output has
(if katello-installer was used the queue name would be katello_event_queue)
Queue 'subscriptions'
bind [subscriptions] => ''
bind [*.*] => event
if subscriptions queue isn't present add the queue using
pid-config --ssl-certificate /etc/pki/katello/certs/java-client.crt --ssl-key /etc/pki/katello/private/java-client.key -b 'amqps://localhost:5671' add queue subscriptions --durable
and bind to messages in the event topic with the subject matching *.*
qpid-config --ssl-certificate /etc/pki/katello/certs/java-client.crt --ssl-key /etc/pki/katello/private/java-client.key -b 'amqps://localhost:5671' bind event subscriptions "*.*"
Katello config¶
in katello.yml ensure that qpid configurations are present under common.
(if katello-installer was used the queue name would be katello_event_queue instead of subscriptions)
common:
qpid:
url: 'amqp:ssl:<fqdn>:5671'
subscriptions_queue_address: subscriptions
Test Scenario¶
1. create a new org
2. create/upload a new manifest with a rhel subscription
3. register a content host
subscription-manager register --org="mouse" --environment="Library"
4. go to the Content -> Red Hat Subscriptions ensure that the quantity consumed is 0 for the rhel subscription
5. on the content-host attach to the rhel subscription
subscription-manager attach --pool xxx
6.refresh the page on the browser
=> verify that quantity consumed has been incremented.
7. under Hosts -> Content Hosts, click on the content-host
8. under the subscriptions tab
=> verify the quantity consumed