Errata

Test-Driven Infrastructure with Chef

Errata for Test-Driven Infrastructure with Chef

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
N/A
4th paragraph

(I don't know if this appears in the printed or pdf version).

"we have an eval, the p function prints the output of the eva," ->
"we have an eval, the p function prints the output of the eval,"

Jon Forrest  May 23, 2014 
Printed Page 41
Second bullet of Ruby code

In the second bullet point, there is an erroneous slash in the code before the close quote.

Jeanne Boyarsky  Nov 17, 2013 
Printed, PDF Page 114
Instruction # 18

Step 18 instructs us to "install the omnibus-berkshelf" plugin for Vagrant. Unfortunately, this plugin does not appear to exist. After some experimentation (confirmed by looking later in the 'Worked Example' section), it appears the correct plugin name should be "vagrant-omnibus".

Lee Whalen  Feb 13, 2014 
Printed Page 127
First paragraph following numbered list

Typo in title of "Extreme Programming Explained" written as "Programmng".

Daniel Givens  Dec 08, 2013 
Printed Page 130-154
All code samples

All code samples in chapter 5 are improperly formatted, missing newlines and proper indentation.

Daniel Givens  Dec 08, 2013 
PDF Page 137
The last block of example code on the page.

ruby will raise NameError for HipsterAssessor unless you add a require for '../hipsterassessor' before the "describe HipsterAssessor" line.

Doug Knight  Mar 10, 2015 
PDF Page 141
bottom

Unreadable formatted code, missing indentation and newlines

Dennis de Klerk  Oct 27, 2013 
PDF Page 141

Screenshot http://imgur.com/HqsT9Fg

Dennis de Klerk  Oct 27, 2013 
PDF Page 144
1st paragraph

Cucumber feature is hard to read, missing newlines and indentation

Dennis de Klerk  Oct 27, 2013 
PDF Page 146
start

Cucumber feature is hard to read, missing newlines and indentation

Dennis de Klerk  Oct 27, 2013 
PDF Page 146, 147, 150, 151, 154

It seems like all features and step definitions lack proper indentation and new lines.

Dennis de Klerk  Oct 27, 2013 
PDF Page 153
The first line in the second block of example code. (The second line of code if the formating was unmangled.)

This code does not do what is intended. The has_phoney_specs? method should check @hipster_credentials[:glasses_prescription], not @hipster_credentials[:gears_on_bike] .

Minitest did not alert the author to this error due to a subtle issue with the test design. The tests for "can award ten points for phoney spectacles" and "can establish if the developer has phoney spectacles" begin by setting :glasses_prescription to nil in the @developer object. This does not substantially change the state of the @developer object; its @hipster_credentials[:glasses_prescription] instance variable already evaluated to nil before its value was set. The calls to @developer.set are essentially no-ops, reducing the remainder of the tests to checks about the initial state of @developer, not whether has_phoney_specs? properly interprets the value of :glasses_prescription, as intended.

Doug Knight  Mar 10, 2015 
Printed Page 171
Diagram step #7

"refractor" should be "refactor"

Jeanne Boyarsky  Nov 17, 2013 
PDF Page 184
2nd paragraph

"metadata,rb" should read "metadata.rb"

"straightforward approch" should read "straightforward approach"

Duncan Hutty  Oct 09, 2014 
PDF Page 202
2nd paragraph

On 202, the author introduces the content of a serverspec integration test without describing what the file should be called or anything about what serverspec requires to work. Only later on 241 does he describe how to create a spec_helper.rb file and how, to execute serverspec tests against a converged system the convention is to write tests inside a file like test/integration/default/serverspec/localhost/foo.rb. Sure, I'm supposed to look at docs and figure things out for my own, but this is supposed to be a worked example of the main point that the book had been working up to for about 7 chapters. Please rejigger this content so that serverspec is introduced appropriately.

Note from the Author or Editor:
Hi there,

Thanks for the submission. I will take a look at this section over the weekend and see if I can undertstand exactly what you mean, and then perhaps we can work together on agreeing the most appropriate improvement.

Bill Findley  Oct 25, 2013 
Printed, PDF Page 202
halfway down

Just to more fully flesh out Bill F's comment, if you're trying to implement the "spec_helper" integration test on p202 and are getting a failure along the lines of:

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sh -c 'BUSSER_ROOT="/tmp/busser" GEM_HOME="/tmp/busser/gems" GEM_PATH="/tmp/busser/gems" GEM_CACHE="/tmp/busser/gems/cache" ; export BUSSER_ROOT GEM_HOME GEM_PATH GEM_CACHE; sudo -E /tmp/busser/bin/busser test']
>>>>>> ----------------------

with no mention of the expected-failing rspec tests, you will need to do the following:

* create <cookbookname>/test/integration/default/serverspec/spec_helper.rb, and populate it with the contents found on p241.
* create <cookbookname>/test/integration/default/serverspec/localhost/default_spec.rb, and populate it with the lighttpd integration tests from p202.

p240-241+ goes into detail as to why this is. I believe the pattern is along the lines of /test/integration/SUITENAME/TYPE/, so if my kitchen suite was called 'shazbot', serverspec tests would live in /test/integration/shazbot/serverspec/localhost/shazbot_spec.rb, and so forth. Hopefully this will help save future readers the couple of days of troubleshooting (and tracking down the author, who was MOST receptive to helping me out for several hours on an evening and sorting this whole mess out. Thanks Stephen!)

Lee Whalen  Feb 17, 2014