Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Make chef generate app set cookbook name #86

Merged
merged 6 commits into from
Jul 9, 2014

Conversation

mcquin
Copy link
Contributor

@mcquin mcquin commented Jun 30, 2014

Currently chef generate app app_name doesn't set cookbook_name = app_name. This sets cookbook_name and cookbook_root to app defaults, if not otherwise set.

@mcquin
Copy link
Contributor Author

mcquin commented Jun 30, 2014

\cc @opscode/client-eng

@danielsdeleo
Copy link
Contributor

Looks good to me overall. Would be nice to have a regression test that makes sure we have the right strings inside the generated files (kitchen.yml and such).

@danielsdeleo
Copy link
Contributor

About the strategy of running the templates with bindings generated in the tests, I think it's okay, but we need to be aware that we're involving the system under test in the test itself because the template is part of the system we're testing. To account for this we probably ought to also check for specific strings in the template output to make sure important data is included.

@mcquin
Copy link
Contributor Author

mcquin commented Jul 8, 2014

@danielsdeleo Decided to go with the simpler approach of just checking lines directly...

@danielsdeleo
Copy link
Contributor

Cool, this looks good modulo travis issue.

@@ -19,6 +19,7 @@
require 'rspec/mocks'
require 'pry-debugger'
require 'test_helpers'
require 'support/generated_file_support'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we need to remove this since we got rid of that file when we switched back to just matching strings in the generated files.

mcquin added a commit that referenced this pull request Jul 9, 2014
Make `chef generate app` set cookbook name
@mcquin mcquin merged commit 367d6a9 into master Jul 9, 2014
@sethvargo sethvargo deleted the mcquin/generator-improvements branch July 9, 2014 22:47
ksubrama pushed a commit that referenced this pull request Jan 11, 2016
@chef-boneyard chef-boneyard locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants