This document summarizes a presentation given by Jordan Moldow and Nadeem Ahmad at PuppetConf 2016 titled "From Pain To Gain: A Puppet Unit Testing Story". The presentation discusses the challenges the team at Box faced with manually testing Puppet configurations and their process of implementing unit testing to improve the testing workflow. Some of the key challenges addressed included long wait times for manual tests, inability to test all configurations, and lack of repeatability. The team started with basic unit testing using rspec-puppet but encountered issues with undefined facts, default attributes, and production-only functions. They created the box_spec_helper tool to address these problems and enable tests to run automatically and in parallel. This significantly reduced test
26. Running tests
~/puppet $ rake spec
Run all tests in a directory
~/puppet $ rake spec SPEC=spec/classes/foo
Run all tests in a file
~/puppet $ rake spec SPEC=spec/classes/foo/bar_spec.rb
Run all tests
56. Running tests
~/puppet $ rake spec
Run all tests in a directory
~/puppet $ rake spec SPEC=spec/classes/foo
Run all tests in a file
~/puppet $ rake spec SPEC=spec/classes/foo/init_spec.rb
Run all tests
60. Unlocking Paralleliza8on
rake spec is actually a combinaBon of three subcommands:
~/puppet $ rake spec_standalone
Runs the actual test
(assumes test fixtures are present)
73. Color and Font Themes
How to Save Themes…
Start by opening the Box
Corporate Template and
clicking on the Design tab.
Save the colors from the
template to your system by
clicking Colors and Create New
Theme Colors and save as Box.
Do the same thing for
the template fonts.
Create New Theme
Fonts and save as Box.
85. Enter Btle for secBon one here and use sentence case
Agenda Slide Design
Enter Btle for secBon two here and use sentence case
Enter Btle for secBon three here and use sentence case
Enter Btle for secBon four here and use sentence case
Enter Btle for secBon five here and use sentence case
1
2
3
4
5
86. Enter Btle for secBon one here and use sentence case
Agenda Slide Design With Highlight for Each Sec8on
Enter Btle for secBon two here and use sentence case
Enter Btle for secBon three here and use sentence case
Enter Btle for secBon four here and use sentence case
Enter Btle for secBon five here and use sentence case
1
2
3
4
5
87. Enter Btle for secBon one here and use sentence case
Agenda Slide Design With Highlight for Each Sec8on
Enter Btle for secBon two here and use sentence case
Enter Btle for secBon three here and use sentence case
Enter Btle for secBon four here and use sentence case
Enter Btle for secBon five here and use sentence case
1
2
3
4
5
88. Enter Btle for secBon one here and use sentence case
Agenda Slide Design With Highlight for Each Sec8on
Enter Btle for secBon two here and use sentence case
Enter Btle for secBon three here and use sentence case
Enter Btle for secBon four here and use sentence case
Enter Btle for secBon five here and use sentence case
1
2
3
4
5
89. Enter Btle for secBon one here and use sentence case
Agenda Slide Design With Highlight for Each Sec8on
Enter Btle for secBon two here and use sentence case
Enter Btle for secBon three here and use sentence case
Enter Btle for secBon four here and use sentence case
Enter Btle for secBon five here and use sentence case
1
2
3
4
5
90. Enter Btle for secBon one here and use sentence case
Agenda Slide Design With Highlight for Each Sec8on
Enter Btle for secBon two here and use sentence case
Enter Btle for secBon three here and use sentence case
Enter Btle for secBon four here and use sentence case
Enter Btle for secBon five here and use sentence case
1
2
3
4
5
92. Chart Slide With Mul8ple Colors
Sub-Btle or Chart Title Here in Title Case
76
60
44
57
65
86
72
0
20
40
60
80
100
Category 1
Axis Title Goes Here in Title Case Calibri 16pt
Series 1
Series 2
Series 3
Series 4
Series 5
Series 6
Series 7
96. Process Diagram Treatment
See Style Page for More Color OpBons
96
1 2 3 4
Suppor4ng text
goes here under
the number
Suppor4ng text
goes here under
the number
Suppor4ng text
goes here under
the number
Suppor4ng text
goes here under
the number
97. Process Diagram Treatment
You Can Use the Blue Bar to House Heavy Content
Title Goes Here
• One bullet
• Two bullet
• Three bullet
Title Goes Here
• One bullet
• Two bullet
• Three bullet
Title Goes Here
• One bullet
• Two bullet
• Three bullet
Title Goes Here
• One bullet
• Two bullet
• Three bullet
1 2 3 4
99. Table Layout Treatment
SubBtle Text Placeholder Title Case (Calibri 20pt)
Header Header Header Header
Title One Informa4on Informa4on Informa4on
Title Two Informa4on Informa4on Informa4on
Title Three Informa4on Informa4on Informa4on
Title Four Informa4on Informa4on Informa4on
Title Five Informa4on Informa4on Informa4on
Title Six Informa4on Informa4on Informa4on
Title Seven Informa4on Informa4on Informa4on
109. Image Treatment With Cap8on Layout
How to Add Your Own Photos and Crop Properly…
Insert one of the Picture with
Cap4on layouts. Click on the icon
at the center to add your image.
Your image will populate the
container but you will likely need
to adjust the crop.
Click on the image and the format
tab and then select crop.
110. Image Treatment With Cap8on Layout (Con8nued)
How to Add Your Own Photos and Crop Properly…
Click on the grayed out por4on of
the image and drag to the les or
right un4l you are happy with the
crop.
Click out of the cropped image to
set it and your image is ready to
go.
116. Mul8ple Image Treatment
How to Insert MulBple Images…
This layout will appear. Next, click
the icon to insert an image.
Navigate to your image and
insert it. Repeat for all the image
boxes. For instruc4ons on how
to crop your image see page 39.
Click the New Slide tab and select
Mul4ple Image Layout.
118. Screen Shot Treatment With Browser Window
How to Drop in Your Screen Shot…
The browser window is like a frame
so anything you drop behind it will
show through.
Drop in your screen shot, go to
the format menu and crop it to
show only what you want.
Last, be sure to right click on your
screen shot and send to back so it
tucks behind the browser window
frame.
121. Video in Your Presenta8on
How to Insert Video and Set Your Playback SeFngs…
To insert a video click insert on
the menu bar
Next select video and navigate to
your video.
Once your video is on the slide and
you click on it, you will get a new
menu tab. You can now make
changes to both the format and
playback of your video.
Use these sefngs for video playback:
Start Automa4cally, Play Full Screen,
and Hide While Not Playing. This will
ensure a consistent look within all Box
presenta4ons.