-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #356 from caskdata/feature/testing-md
Add TESTING.md
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |