Updated Lint and Unit testing for Havana

Registered by Matt Ray

For the Havana release we need to establish a base level of lint and unit testing for the cookbooks. The following tests and configurations need to be updated and supported.

Ruby lint: Rubocop
  Update dependency to '>= 0.18.1'
  .rubocop.yml files providing coverage for the metadata.rb, Gemfile, attributes/, libraries/, providers/, spec/ and recipes/
  Remove any tailor references remaining
  Usage, configuration and any exceptions need to be documented in the TESTING.md.
  Enable these chef-style tests once everything is working https://github.com/openstack-infra/config/commit/868275fbba23c01355a9e2043cd9d8b738214c9a

Chef lint: Foodcritic
  Update dependency to '>= 3.0'
  Ensure all tests are passing.
  Usage, configuration and any exceptions need to be documented in the TESTING.md.

Chef unit tests: ChefSpec
  Update dependency to '>= 3.1'
  Ensure all tests are passing.
  Coverage tool should be added like in https://review.openstack.org/#/c/65011/
  Usage, configuration and any exceptions need to be documented in the TESTING.md.

Update the Gemfile, Gemfile.lock, Strainerfile and .gitignore as necessary. Once the cookbook has all of the lint and unit tests passing, ensure all the gates are turned on and notify the mailing list per cookbook.

Blueprint information

Status:
Complete
Approver:
Matt Ray
Priority:
High
Drafter:
None
Direction:
Approved
Assignee:
Justin Shepherd
Definition:
Approved
Series goal:
Accepted for havana
Implementation:
Implemented
Milestone target:
milestone icon havana-stable
Started by
Justin Shepherd
Completed by
Justin Shepherd

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/s,n,z

Addressed by: https://review.openstack.org/65516
    Initial rubocop support for recipes.

Addressed by: https://review.openstack.org/65551
    Filling out initial rubocop support.

Addressed by: https://review.openstack.org/65555
    Filling out initial rubocop support.

Addressed by: https://review.openstack.org/65563
    Filling out initial rubocop support.

Addressed by: https://review.openstack.org/65564
    Filling out initial rubocop support for metadata.rb and the Gemfile.

Addressed by: https://review.openstack.org/65570
    Filling out initial rubocop support for metadata.rb and the Gemfile.

Addressed by: https://review.openstack.org/65571
    Filling out initial rubocop support for metadata.rb and the Gemfile.

Addressed by: https://review.openstack.org/65572
    Filling out initial rubocop support for metadata.rb and the Gemfile.

Addressed by: https://review.openstack.org/65568
    Filling out initial rubocop support for metadata.rb and the Gemfile.

Addressed by: https://review.openstack.org/65569
    Filling out initial rubocop support for metadata.rb and the Gemfile.

Addressed by: https://review.openstack.org/66966
    Initial Rubocop cleanup.

Addressed by: https://review.openstack.org/65562
    Filling out initial rubocop support.

== Changes Needing Reviews ==

Gerrit topic: https://review.openstack.org/#q,topic:bp/lint-and-unit-testing-for-havana,n,z

Addressed by: https://review.openstack.org/74346
    Adding ChefSpec::Coverage to spec_helper.rb

Addressed by: https://review.openstack.org/74349
    Adding ChefSpec::Coverage to spec_helper.rb

Addressed by: https://review.openstack.org/74355
    Adding ChefSpec::Coverage to spec_helper.rb

Addressed by: https://review.openstack.org/74374
    Adding ChefSpec::Converge to spec_helper.rb

Addressed by: https://review.openstack.org/74377
    Adding ChefSpec::Coverage to spec_helper.rb

Addressed by: https://review.openstack.org/74379
    Adding ChefSpec::Converge to spec_helper.rb

Addressed by: https://review.openstack.org/74381
    Adding ChefSpec::Coverage to spec_helper.rb

Addressed by: https://review.openstack.org/74390
    Adding ChefSpec::Coverage to spec_helper.rb

Addressed by: https://review.openstack.org/74400
    Add ChefSpec::Coverate to spec_helper.rb

Addressed by: https://review.openstack.org/74402
    Adding ChefSpec::Coverage to spec_helper.rb

Addressed by: https://review.openstack.org/74405
    Restricting ChefSpec::Coverage to this cookbook

Addressed by: https://review.openstack.org/74410
    Adding ChefSpec::Coverage to spec_helper.rb

Addressed by: https://review.openstack.org/76953
    Adding tests for untouched resources

(?)

Work Items

Work items:
Rubocop: DONE
Update Foodcritic: DONE
Update Chefspec: DONE
Add Chefspec::Coverage: INPROGRESS

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.