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 README.md to reflect test/recipes structure #96

Conversation

davidcpell
Copy link

@davidcpell davidcpell commented Aug 8, 2016

Recently, when starting a new project kitchen-inspec as my
verifier rather than serverspec, I noticed that it was looking in
test/recipes/default for tests. This directory did exist because I
had created the cookbook with chef generate cookbook, but I had
written my initial test in test/integration/default out of habit.

In the commit history I noticed that d2b2742 changed the
test_base_path to test/recipes but it doesn't look like the
documentation was updated to reflect this.

Recently, when starting a new project `kitchen-inspec` as my
verifier rather than `serverspec`, I noticed that it was looking in
`test/recipes/default` for tests`. This directory *did* exist because I
had created the cookbook with `chef generate cookbook`, but I had
written my initial test in `test/integration/default` out of habit.

In the commit history I noticed that d2b2742 changed the
`test_base_path` to `test/recipes` but it doesn't look like the
documentation was updated to reflect this.
@chef-supermarket
Copy link

Hi. I am an automated pull request bot named Curry. There are commits in this pull request whose authors are not yet authorized to contribute to Chef Software, Inc. projects or are using a non-GitHub verified email address. To become authorized to contribute, you will need to sign the Contributor License Agreement (CLA) as an individual or on behalf of your company. You can read more on Chef's blog.

GitHub Users Who Are Not Authorized To Contribute

The following GitHub users do not appear to have signed a CLA:

Please sign the CLA here.

@chef-supermarket
Copy link

Hi. Your friendly Curry bot here. Just letting you know that all commit authors have become authorized to contribute. I have added the "Signed CLA" label to this issue so it can easily be found in the future.

@charlesjohnson
Copy link

Both locations should be valid, with kitchen-inspec preferring test/recipes/ first.

@davidcpell
Copy link
Author

@charlesjohnson I suppose so, but the readme doesn't mention test/recipes at all. It only mentions that kitchen-inspec looks in test/integration, which is true but not the whole story. Seems like the user should be aware of the preferred location.

@epcim
Copy link

epcim commented Aug 9, 2016

I am not much happy with the change integration -> recipes as for alternative provisioning drivers (ansible, salt, puppet) have equivalents of recipes named like formulas, playbooks, etc...

@chris-rock
Copy link
Collaborator

test/integration will still be the standard for non-chef environments. test/recipes is a good choice for cases where you use Chef cookbooks and Chef Automate. Instead of replacing the current documentation for test/integration, I would like to add a new section, that is optimized for Chef environments

@davidcpell
Copy link
Author

davidcpell commented Aug 11, 2016

@chris-rock regardless of what is a good structure to use with Chef cookbooks and Automate, kitchen-inspec still looks in test/recipes now by default (I assume this is because the structure generated by chef generate cookbook is also test/recipes) and this fact is not documented in the readme at all. In one sense the current documentation could be considered wrong because it makes it seem like test/integration is the first choice when that's not the case. The part that I changed in my PR was the part beginning with "By default..." so IMO that change still needs to happen even if another section is added to describe particular chef and non-chef environments.

@chris-rock
Copy link
Collaborator

@davidcpell I am with you, that it should be in our documentation. Lets just wait with merging until chef-boneyard/chef-dk#964 (comment) is solved

@chris-rock
Copy link
Collaborator

@davidcpell can you open an extra section for your additions, since test/integration will stay a valid solution?

@davidcpell
Copy link
Author

davidcpell commented Sep 1, 2016

Hi @chris-rock, sorry for letting this start to collect dust. I'm still interested in helping out with the documentation if I can.

As for test/integration, I did add a bolded note on line 83 that mentions test/integration/%suite% as the fall-back, and there was already a section on using test/integration/%suite%/serverspec on what's now line 85. Does that take care of what you were thinking of re: an extra section?

@chris-rock
Copy link
Collaborator

@davidcpell test/integration and test/recipes are equal partners and cover different use cases. Therefore we should move the adaption to a specific section for Chef cookbooks and Chef Automate.

@davidcpell davidcpell closed this May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants