Skip to content

Commit

Permalink
Merge pull request #356 from caskdata/feature/testing-md
Browse files Browse the repository at this point in the history
Add TESTING.md
  • Loading branch information
wolf31o2 authored Dec 5, 2017
2 parents c0ed7d4 + 111841e commit f3c7cf7
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
This cookbook uses a variety of testing components:

- Unit tests: [ChefSpec](https://docs.chef.io/chefspec.html)
- Integration tests: [Test Kitchen](http://kitchen.ci/)
- Chef Style lints: [Foodcritic](http://www.foodcritic.io/)
- Ruby Style lints: [cookstyle](https://github.com/chef/cookstyle)


Prerequisites
-------------
You can install the [Chef Development Kit (Chef-DK)](http://downloads.chef.io/chef-dk/) to more easily install the above components.

You must also have Vagrant and VirtualBox installed:

- [Vagrant](https://vagrantup.com)
- [VirtualBox](https://virtualbox.org)


Development
-----------
1. Clone the git repository from GitHub:

- `git clone [email protected]:caskdata/hadoop_cookbook.git`

2. Install the dependencies using bundler:

- `chef exec bundle install --path ../vendor`

3. Create a branch for your changes:

- `git checkout -b my_bug_fix`

4. Make any changes
5. Write tests to support those changes. It is highly recommended you write both unit and integration tests.
6. Run the tests:

- `chef exec bundle exec rspec`
- `chef exec bundle exec foodcritic .`
- `chef exec bundle exec rubocop`
- `chef exec bundle exec kitchen test`

7. Assuming the tests pass, open a Pull Request on GitHub

For more information, see [the cookbook's Contribution Guidelines](https://github.com/caskdata/hadoop_cookbook/blob/master/CONTRIBUTING.md)

0 comments on commit f3c7cf7

Please sign in to comment.