Spec tests issue for puppet notify rabbit

Bug #1312054 reported by Bogdan Dobrelya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-glance
Fix Released
Undecided
Bogdan Dobrelya

Bug Description

1)There is a typo in rspec tests for glance::notify::rabbitmq causing the "when passing params" stanza being skipped (ignored).
To reproduce this, just run spec tests and count the # of test cases for glance_notify_rabbitmq_spec.rb - it would be 8, but as you can see, there are more.

2)Default test cases should be wrapped by the corresponding 'describe do' stanza as well.

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

Please consider this one as triaged

Changed in puppet-glance:
assignee: nobody → Bogdan Dobrelya (bogdando)
Changed in puppet-glance:
status: New → In Progress
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

Addressed by: https://review.openstack.org/90022

Was before (wrong!)
glance::notify::rabbitmq
  should contain Glance_api_config[DEFAULT/notifier_driver] with value => "rabbit"
  should contain Glance_api_config[DEFAULT/rabbit_password] with value => "pass"
  should contain Glance_api_config[DEFAULT/rabbit_userid] with value => "guest"
  should contain Glance_api_config[DEFAULT/rabbit_host] with value => "localhost"
  should contain Glance_api_config[DEFAULT/rabbit_port] with value => "5672"
  should contain Glance_api_config[DEFAULT/rabbit_virtual_host] with value => "/"
  should contain Glance_api_config[DEFAULT/rabbit_notification_exchange] with value => "glance"
  should contain Glance_api_config[DEFAULT/rabbit_notification_topic] with value => "notifications"

With the fix(right)
glance::notify::rabbitmq
  when defaults with rabbit pass specified
    should contain Glance_api_config[DEFAULT/notifier_driver] with value => "rabbit"
    should contain Glance_api_config[DEFAULT/rabbit_password] with value => "pass"
    should contain Glance_api_config[DEFAULT/rabbit_userid] with value => "guest"
    should contain Glance_api_config[DEFAULT/rabbit_host] with value => "localhost"
    should contain Glance_api_config[DEFAULT/rabbit_port] with value => "5672"
    should contain Glance_api_config[DEFAULT/rabbit_hosts] with value => "localhost:5672"
    should contain Glance_api_config[DEFAULT/rabbit_ha_queues] with value => "false"
    should contain Glance_api_config[DEFAULT/amqp_durable_queues] with value => "false"
    should contain Glance_api_config[DEFAULT/rabbit_virtual_host] with value => "/"
    should contain Glance_api_config[DEFAULT/rabbit_notification_exchange] with value => "glance"
    should contain Glance_api_config[DEFAULT/rabbit_notification_topic] with value => "notifications"
  when passing params for single rabbit host
    should contain Glance_api_config[DEFAULT/rabbit_userid] with value => "guest2"
    should contain Glance_api_config[DEFAULT/rabbit_host] with value => "localhost2"
    should contain Glance_api_config[DEFAULT/rabbit_port] with value => "5673"
    should contain Glance_api_config[DEFAULT/rabbit_hosts] with value => "localhost2:5673"
    should contain Glance_api_config[DEFAULT/rabbit_use_ssl] with value => "true"
    should contain Glance_api_config[DEFAULT/amqp_durable_queues] with value => "true"
  when passing params for multiple rabbit hosts
    should contain Glance_api_config[DEFAULT/rabbit_userid] with value => "guest3"
    should contain Glance_api_config[DEFAULT/rabbit_hosts] with value => "nonlocalhost3:5673,nonlocalhost4:5673"
    should contain Glance_api_config[DEFAULT/rabbit_ha_queues] with value => "true"
    should not contain Glance_api_config[DEFAULT/rabbit_port]
    should not contain Glance_api_config[DEFAULT/rabbit_host]

description: updated
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to puppet-glance (master)

Reviewed: https://review.openstack.org/90022
Committed: https://git.openstack.org/cgit/stackforge/puppet-glance/commit/?id=d40f3d8622378c08aa89a557b75cfa7d5a0525cb
Submitter: Jenkins
Branch: master

commit d40f3d8622378c08aa89a557b75cfa7d5a0525cb
Author: Bogdan Dobrelya <email address hidden>
Date: Thu Apr 24 10:50:43 2014 +0300

    Add multiple rabbit hosts support

    * Use new oslo.messaging conf options for rabbit_hosts and
      rabbit_ha_queues for glance::notify::rabbitmq class
    * Warn on deprecated rabbit_durable_queues and use amqp_* instead
    * Fix/add rspecs
    * Fix a mess with wrong notification_driver usage
    * Update README with usage example

    DocImpact
    Closes-bug: #1259193
    Closes-bug: #1312054
    Closes-bug: #1312658
    Closes-bug: #1313553

    Change-Id: I16b8e71db20602986a7afe8d24e7faba91a0997f
    Signed-off-by: Bogdan Dobrelya <email address hidden>

Changed in puppet-glance:
status: In Progress → Fix Committed
Mathieu Gagné (mgagne)
Changed in puppet-glance:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.