Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cookbook to current development practices #15

Merged
merged 3 commits into from
May 12, 2015
Merged

Update cookbook to current development practices #15

merged 3 commits into from
May 12, 2015

Conversation

jtimberman
Copy link

This commit modernizes the cookbook in a number of ways

  • Pass rubocop
  • Pass foodcritic
  • Convert from minitest-chef-handler to Serverspec
  • Update the Kitchen configuration

More detail is provided to summarize the changes:

  • Use chef_zero because this cookbook supports data bags and that is
    easier to support tests with zero than with solo
  • Update the platform versions to current releases (centos 5.11/6.6/7.1
    debian 7.8, ubuntu 14.04)
  • Add fedora-21
  • Remove EOL unsupported platform versions (ubuntu 10.04, 13.04)
  • Move attribute setting from dnsmasq_test recipe to kitchen config
  • Update supermarket source in Berksfile
  • Use single quotes for attribute keys instead of double quotes or symbols
  • Remove long description from metadata because it's not needed for
    anything and reads in the entire readme
  • Add rubocop configuration to ignore hash rockets and line length
  • Resolve several findings for Rubocop
  • Use inline if statements for recipe inclusion
  • Ignore FC023, because we don't want to have the resource in the
    collection if tftp-root isn't enabled, use an inline conditional to
    make the resource in column 0
  • Include the config recipes because otherwise they can't fix a config
    problem before chef attempts to start dnsmasq service
  • use "resource_type[resource_name]" syntax for resource lookup in notifications
  • remove apt cookbook from berks and kitchen, and use execute resource
    in dnsmasq_test recipe
  • Add tests for listening ports 53, 67, and 69

The change to have the nameserver 8.8.8.8 and test for that is because DNS resolution wasn't working with 127.0.0.1, so busser couldn't even install. The default attribute value is unchanged so actual behavior is no different.

jtimberman added 2 commits May 7, 2015 00:46
This commit modernizes the cookbook in a number of ways

- Pass rubocop
- Pass foodcritic
- Convert from minitest-chef-handler to Serverspec
- Update the Kitchen configuration

More detail is provided to summarize the changes:

- Use chef_zero because this cookbook supports data bags and that is
  easier to support tests with zero than with solo
- Update the platform versions to current releases (centos 5.11/6.6/7.1
  debian 7.8, ubuntu 14.04)
- Add fedora-21
- Remove EOL unsupported platform versions (ubuntu 10.04, 13.04)
- Move attribute setting from dnsmasq_test recipe to kitchen config
- Update supermarket source in Berksfile
- Use single quotes for attribute keys instead of double quotes or symbols
- Remove long description from metadata because it's not needed for
  anything and reads in the entire readme
- Add rubocop configuration to ignore hash rockets and line length
- Resolve several findings for Rubocop
- Use inline if statements for recipe inclusion
- Ignore FC023, because we don't want to have the resource in the
  collection if tftp-root isn't enabled, use an inline conditional to
  make the resource in column 0
- Include the config recipes because otherwise they can't fix a config
  problem before chef attempts to start dnsmasq service
- use "resource_type[resource_name]" syntax for resource lookup in notifications
- remove apt cookbook from berks and kitchen, and use execute resource
  in dnsmasq_test recipe
- Add tests for listening ports 53, 67, and 69
We're no longer using minitest-handler, and the hosts_file cookbook is a dependency of dnsmasq so it will get picked up via `metadata`.
@jtimberman
Copy link
Author

Note that the box filtering in Test Kitchen's vagrant plugin has been made fuzzier.

- Add a Gemfile
- Remove driver_config, kitchen-vagrant 0.18 via bundler, or chefdk
  0.5.1 is expected
@cwjohnston
Copy link
Contributor

Looking good. Ran into a couple of exceptions, which I believe exist under the previous testing regime as well:

cwjohnston added a commit that referenced this pull request May 12, 2015
Update cookbook to current development practices
@cwjohnston cwjohnston merged commit 9fd2f0a into sous-chefs:master May 12, 2015
@jtimberman
Copy link
Author

Huh. I swear I tested those. Maybe I'm imagining things and live in fantasy land.

Thanks for the merge 😄 🍺 🍰!

@jtimberman jtimberman deleted the update-test-harnesses branch May 12, 2015 22:06
@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants