RSpec 3.0.0 broke rspec-puppet unit tests

Bug #1326034 reported by Mathieu Gagné
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
puppet-neutron
Fix Released
Undecided
Sebastien Badia
Havana
Fix Committed
Undecided
Unassigned
Icehouse
Fix Released
Undecided
Unassigned
puppet-openstack
In Progress
Undecided
François Charlier

Bug Description

Our gate installs and uses rspec-puppet which installs the rspec >= 2.9.

RSpec deprecated a bunch of stuff and broke rspec-puppet.

Example of broken jobs:
http://logs.openstack.org/53/82353/6/check/gate-puppet-neutron-puppet-unit-3.4/57a302d/console.html

RSpec::Puppet::ManifestMatchers::CreateGeneric implements a legacy RSpec matcher
protocol. For the current protocol you should expose the failure messages
via the `failure_message` and `failure_message_when_negated` methods.

The `:example_group` key in an example group's metadata hash is deprecated. Use the example group's hash directly for the computed keys and `:parent_example_group` to access the parent example group metadata instead.

Using `should` from rspec-expectations' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /Users/mgagne/Development/Projects/StackForge/puppet-neutron/spec/unit/provider/neutron_l3_ovs_bridge/neutron_spec.rb:25:in `block (3 levels) in <top (required)>'.

The main issue is caused by this failure:

Failure/Error: expect(provider.exists?).to be_false
        expected false to respond to `false?`

A change was brought in RSpec 3.0.0 related to built-in matchers (thanks Sebastian Badia for those links):

  Rename be_true and be_false to be_truthy and be_falsey. (Sam Phippen)

References:
* https://www.relishapp.com/rspec/rspec-expectations/v/3-0/docs/built-in-matchers
* https://www.relishapp.com/rspec/rspe​c-expectations/v/3-0/docs/changelog

Related issues in rspec-puppet project:
* https://github.com/rodjek/rspec-puppet/issues/198
* https://github.com/rodjek/rspec-puppet/pull/199
* https://github.com/rodjek/rspec-puppet/issues/200
* https://github.com/rodjek/rspec-puppet/pull/201

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/97559

Changed in puppet-neutron:
assignee: nobody → Sebastien Badia (sbadia)
status: New → In Progress
Revision history for this message
Sebastien Badia (sbadia) wrote :
Changed in puppet-openstack:
status: New → In Progress
assignee: nobody → Sebastien Badia (sbadia)
Mathieu Gagné (mgagne)
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-neutron (master)

Reviewed: https://review.openstack.org/97559
Committed: https://git.openstack.org/cgit/stackforge/puppet-neutron/commit/?id=40f98eee3f53b6ecb878d27ffcecabd776ddb713
Submitter: Jenkins
Branch: master

commit 40f98eee3f53b6ecb878d27ffcecabd776ddb713
Author: Sebastien Badia <email address hidden>
Date: Tue Jun 3 19:01:22 2014 +0200

    Fix puppet-neutron rspec test for RSpec >= 3.0.0

    Since rspec 3.0.0.beta1 (2013-11-07) be_true and be_false
    are now renamed to be_truthy and be_falsey.

    Closes-bug #1326034
    Change-Id: I6ca0d3f7529c6d4596ab10dd9e55157bad9ace86

Changed in puppet-neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/99552

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on puppet-neutron (master)

Change abandoned by Clayton O'Neill (<email address hidden>) on branch: master
Review: https://review.openstack.org/99552
Reason: Intended to be against stable/icehouse.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-neutron (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/99554

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/99653

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on puppet-neutron (stable/icehouse)

Change abandoned by Yanis Guenane (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/99653
Reason: In favor of https://review.openstack.org/#/c/99554

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-neutron (stable/icehouse)

Reviewed: https://review.openstack.org/99554
Committed: https://git.openstack.org/cgit/stackforge/puppet-neutron/commit/?id=55ef5b5d8f9e53149c0551e96a53beae615ccac3
Submitter: Jenkins
Branch: stable/icehouse

commit 55ef5b5d8f9e53149c0551e96a53beae615ccac3
Author: Clayton O'Neill <email address hidden>
Date: Wed Jun 11 22:28:08 2014 -0400

    Pin neutron gem versions for stable branch

    This intends to pin all the major gems to the version they were during
    development cycle. This should isolate the existing tests from changes in
    rspec, etc.

    Partial-Bug: 1326034
    Change-Id: I17ffd9255de6e04d0b036fa9466bf59171b1a762

tags: added: in-stable-icehouse
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-neutron (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/99748

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-neutron (stable/havana)

Reviewed: https://review.openstack.org/99748
Committed: https://git.openstack.org/cgit/stackforge/puppet-neutron/commit/?id=d8429080f2523679628ba4df9e01448000587573
Submitter: Jenkins
Branch: stable/havana

commit d8429080f2523679628ba4df9e01448000587573
Author: Clayton O'Neill <email address hidden>
Date: Wed Jun 11 22:28:08 2014 -0400

    Pin neutron gem versions for stable branch

    This intends to pin all the major gems to the version they were during
    development cycle. This should isolate the existing tests from changes in
    rspec, etc.

    Partial-Bug: 1326034
    Change-Id: I17ffd9255de6e04d0b036fa9466bf59171b1a762

tags: added: in-stable-havana
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-neutron (master)

Reviewed: https://review.openstack.org/100882
Committed: https://git.openstack.org/cgit/stackforge/puppet-neutron/commit/?id=dd301f635a0081ae0fbc75a981bfa003f7c8c617
Submitter: Jenkins
Branch: master

commit dd301f635a0081ae0fbc75a981bfa003f7c8c617
Author: Clayton O'Neill <email address hidden>
Date: Wed Jun 18 08:32:24 2014 -0400

    Pin tests to rspec < 2.99

    Pin to rspec < 2.99 until rspec-puppet officially supports rspec 3.x.
    This is to avoid warnings due to deprecated matchers in the
    rspec-puppet gem.

    This patch also reverts the change of be_false to be_falsey that was
    temporarily required for rspec 3 compability.

    Partial-Bug: #1326034
    Change-Id: I1f7a754cf285c598169059e757c1a905762e2ce0

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/101500

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-neutron (master)

Reviewed: https://review.openstack.org/101500
Committed: https://git.openstack.org/cgit/stackforge/puppet-neutron/commit/?id=33798065544f3e23508c12d8a3bda1db09980ba3
Submitter: Jenkins
Branch: master

commit 33798065544f3e23508c12d8a3bda1db09980ba3
Author: Clayton O'Neill <email address hidden>
Date: Fri Jun 20 07:57:18 2014 -0400

    Normalize Gemfile & pin tests to rspec < 2.99

    Pin to rspec < 2.99 until rspec-puppet officially supports rspec 3.x.
    This is to avoid warnings due to deprecated matchers in the
    rspec-puppet gem.

    This change is also intended to normalize the Gemfile for all stackforge
    puppet modules. This should facilitate pinning gem versions when
    releasing new stable branches, since the same diff can be used for all
    repos.

    Change-Id: Id8595fc2fd8b4e4bec4ba60d85696983fb632a18
    Partial-Bug: #1326034

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-openstack (master)

Fix proposed to branch: master
Review: https://review.openstack.org/101704

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on puppet-openstack (master)

Change abandoned by Sebastien Badia (<email address hidden>) on branch: master
Review: https://review.openstack.org/97567
Reason: Abandonned for https://review.openstack.org/101704

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-neutron (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/112400

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-neutron (stable/havana)

Reviewed: https://review.openstack.org/112400
Committed: https://git.openstack.org/cgit/stackforge/puppet-neutron/commit/?id=16682d963580397fa526be4ba296f9e1a62c08eb
Submitter: Jenkins
Branch: stable/havana

commit 16682d963580397fa526be4ba296f9e1a62c08eb
Author: Clayton O'Neill <email address hidden>
Date: Fri Jun 20 07:57:18 2014 -0400

    Normalize Gemfile & pin tests to rspec < 2.99

    Pin to rspec < 2.99 until rspec-puppet officially supports rspec 3.x.
    This is to avoid warnings due to deprecated matchers in the
    rspec-puppet gem.

    This change is also intended to normalize the Gemfile for all stackforge
    puppet modules. This should facilitate pinning gem versions when
    releasing new stable branches, since the same diff can be used for all
    repos.

    Conflicts:
      Gemfile

    Change-Id: Id8595fc2fd8b4e4bec4ba60d85696983fb632a18
    Partial-Bug: #1326034
    (cherry picked from commit 33798065544f3e23508c12d8a3bda1db09980ba3)

Revision history for this message
Mathieu Gagné (mgagne) wrote :

Change for puppet-openstack: https://review.openstack.org/#/c/101704/

Changed in puppet-neutron:
milestone: none → 5.0.0
status: Fix Committed → Fix Released
Changed in puppet-openstack:
assignee: Sebastien Badia (sbadia) → François Charlier (francois-charlier)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-openstack (master)

Reviewed: https://review.openstack.org/101704
Committed: https://git.openstack.org/cgit/stackforge/puppet-openstack/commit/?id=96917bcbe030fc856cc89069bb8daf68055e9ffd
Submitter: Jenkins
Branch: master

commit 96917bcbe030fc856cc89069bb8daf68055e9ffd
Author: Sebastien Badia <email address hidden>
Date: Sat Jun 21 15:25:08 2014 +0200

    Fix unit-test in order to prepare module for deprecation

    * Update spec tests in order to match rspec 3.x syntax (and puppet-rspec 2.x)
    * Remove gems over-specifications (puppetlabs_spec_helper already add
      runtime deps on rpsec, puppet-rspec and rake)
    * Fix RedHat fact (cherry-pick of commit
      https://review.openstack.org/106555/)
    * Pin fixtures to stable/icehouse (this module is EOL)
    * Pin concat to 1.2.1

    Partial-Bug: #1326034
    Change-Id: If299e1f9591f21d9410f2a5744d29823f913c000

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.