Submit Search
Upload
Puppet testing
Report
Share
Bram Vogelaar
Cloud Engineer at Seaplane.io
Follow
•
0 likes
•
61 views
1
of
21
Puppet testing
•
0 likes
•
61 views
Report
Share
Download Now
Download to read offline
Technology
introduction to testing puppet code
Read more
Bram Vogelaar
Cloud Engineer at Seaplane.io
Follow
Recommended
Software Testing by
Software Testing
Lambert Lum
147 views
•
25 slides
PHPUnit by
PHPUnit
Hampton Roads PHP User Grop
665 views
•
19 slides
PhpUnit Best Practices by
PhpUnit Best Practices
Edorian
19.6K views
•
34 slides
PHPUnit best practices presentation by
PHPUnit best practices presentation
Thanh Robi
2.3K views
•
71 slides
Test Driven Development with PHPUnit by
Test Driven Development with PHPUnit
Mindfire Solutions
1.9K views
•
30 slides
PHPUnit: from zero to hero by
PHPUnit: from zero to hero
Jeremy Cook
12.9K views
•
36 slides
More Related Content
What's hot
Better detection of what modules are used by some Perl 5 code by
Better detection of what modules are used by some Perl 5 code
charsbar
3.8K views
•
20 slides
Unit testing PHP apps with PHPUnit by
Unit testing PHP apps with PHPUnit
Michelangelo van Dam
10.6K views
•
107 slides
Unit Testing Presentation by
Unit Testing Presentation
nicobn
629 views
•
29 slides
Mutation Testing: Testing your tests by
Mutation Testing: Testing your tests
Stephen Leigh
394 views
•
14 slides
Introduction to Unit Testing with PHPUnit by
Introduction to Unit Testing with PHPUnit
Michelangelo van Dam
14.9K views
•
49 slides
New Features PHPUnit 3.3 - Sebastian Bergmann by
New Features PHPUnit 3.3 - Sebastian Bergmann
dpc
2.3K views
•
49 slides
What's hot
(20)
Better detection of what modules are used by some Perl 5 code by charsbar
Better detection of what modules are used by some Perl 5 code
charsbar
•
3.8K views
Unit testing PHP apps with PHPUnit by Michelangelo van Dam
Unit testing PHP apps with PHPUnit
Michelangelo van Dam
•
10.6K views
Unit Testing Presentation by nicobn
Unit Testing Presentation
nicobn
•
629 views
Mutation Testing: Testing your tests by Stephen Leigh
Mutation Testing: Testing your tests
Stephen Leigh
•
394 views
Introduction to Unit Testing with PHPUnit by Michelangelo van Dam
Introduction to Unit Testing with PHPUnit
Michelangelo van Dam
•
14.9K views
New Features PHPUnit 3.3 - Sebastian Bergmann by dpc
New Features PHPUnit 3.3 - Sebastian Bergmann
dpc
•
2.3K views
Phpunit testing by Nikunj Bhatnagar
Phpunit testing
Nikunj Bhatnagar
•
1K views
Test-Driven Puppet Development - PuppetConf 2014 by Puppet
Test-Driven Puppet Development - PuppetConf 2014
Puppet
•
2.8K views
Automated code audits by Damien Seguy
Automated code audits
Damien Seguy
•
591 views
Unit Testing using PHPUnit by varuntaliyan
Unit Testing using PHPUnit
varuntaliyan
•
4.7K views
Advanced PHPUnit Testing by Mike Lively
Advanced PHPUnit Testing
Mike Lively
•
23.6K views
Algoritma 5 november wiwik p.l by Wiwik Puji Lestarii
Algoritma 5 november wiwik p.l
Wiwik Puji Lestarii
•
141 views
OSDC.tw 2008 Lightening Talk by Kang-min Liu
OSDC.tw 2008 Lightening Talk
Kang-min Liu
•
705 views
Unit testing with PHPUnit - there's life outside of TDD by Paweł Michalik
Unit testing with PHPUnit - there's life outside of TDD
Paweł Michalik
•
674 views
Buble Sort Classe principal by Elaine Cecília Gatto
Buble Sort Classe principal
Elaine Cecília Gatto
•
81 views
톰캣 #05-배치 by GyuSeok Lee
톰캣 #05-배치
GyuSeok Lee
•
783 views
Test Driven Development with Puppet - PuppetConf 2014 by Puppet
Test Driven Development with Puppet - PuppetConf 2014
Puppet
•
5.4K views
The Challenges of Container Configuration by Gareth Rushgrove
The Challenges of Container Configuration
Gareth Rushgrove
•
908 views
The road to continuous deployment (DomCode September 2016) by Michiel Rook
The road to continuous deployment (DomCode September 2016)
Michiel Rook
•
530 views
Curating Your Cukes by Eric Kessler by QA or the Highway
Curating Your Cukes by Eric Kessler
QA or the Highway
•
436 views
Similar to Puppet testing
PHPUnit testing to Zend_Test by
PHPUnit testing to Zend_Test
Michelangelo van Dam
11.9K views
•
42 slides
Unit Testing Lots of Perl by
Unit Testing Lots of Perl
Workhorse Computing
140 views
•
68 slides
Beijing Perl Workshop 2008 Hiveminder Secret Sauce by
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Jesse Vincent
1.2K views
•
238 slides
YAPC::NA 2007 - Customizing And Extending Perl Critic by
YAPC::NA 2007 - Customizing And Extending Perl Critic
joshua.mcadams
1.5K views
•
70 slides
ES2015のカバレッジ計測 by
ES2015のカバレッジ計測
sinsoku listy
2.7K views
•
27 slides
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules by
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules
Puppet
1.6K views
•
44 slides
Similar to Puppet testing
(20)
PHPUnit testing to Zend_Test by Michelangelo van Dam
PHPUnit testing to Zend_Test
Michelangelo van Dam
•
11.9K views
Unit Testing Lots of Perl by Workhorse Computing
Unit Testing Lots of Perl
Workhorse Computing
•
140 views
Beijing Perl Workshop 2008 Hiveminder Secret Sauce by Jesse Vincent
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Jesse Vincent
•
1.2K views
YAPC::NA 2007 - Customizing And Extending Perl Critic by joshua.mcadams
YAPC::NA 2007 - Customizing And Extending Perl Critic
joshua.mcadams
•
1.5K views
ES2015のカバレッジ計測 by sinsoku listy
ES2015のカバレッジ計測
sinsoku listy
•
2.7K views
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules by Puppet
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules
Puppet
•
1.6K views
DevOps in PHP environment by Evaldo Felipe
DevOps in PHP environment
Evaldo Felipe
•
160 views
Testing Code and Assuring Quality by Kent Cowgill
Testing Code and Assuring Quality
Kent Cowgill
•
3.1K views
Advanced Perl Techniques by Dave Cross
Advanced Perl Techniques
Dave Cross
•
7.7K views
Web Training Aula 02: Introduction to PHP by MozDevz
Web Training Aula 02: Introduction to PHP
MozDevz
•
106 views
Don't RTFM, WTFM - Open Source Documentation - German Perl Workshop 2010 by singingfish
Don't RTFM, WTFM - Open Source Documentation - German Perl Workshop 2010
singingfish
•
497 views
Hiveminder - Everything but the Secret Sauce by Jesse Vincent
Hiveminder - Everything but the Secret Sauce
Jesse Vincent
•
2.9K views
Having Fun with Play by Clinton Dreisbach
Having Fun with Play
Clinton Dreisbach
•
1.1K views
Howto Test A Patch And Make A Difference! by Joel Farris
Howto Test A Patch And Make A Difference!
Joel Farris
•
600 views
Quality Assurance for PHP projects - ZendCon 2012 by Michelangelo van Dam
Quality Assurance for PHP projects - ZendCon 2012
Michelangelo van Dam
•
9.3K views
Workshop quality assurance for php projects tek12 by Michelangelo van Dam
Workshop quality assurance for php projects tek12
Michelangelo van Dam
•
3.2K views
Best Practices in Plugin Development (WordCamp Seattle) by andrewnacin
Best Practices in Plugin Development (WordCamp Seattle)
andrewnacin
•
27.1K views
PHPSpec BDD Framework by Marcello Duarte
PHPSpec BDD Framework
Marcello Duarte
•
3K views
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015) by Ozh
WordPress Plugin Unit Tests (FR - WordCamp Paris 2015)
Ozh
•
37.6K views
Building and Testing Puppet with Docker by carlaasouza
Building and Testing Puppet with Docker
carlaasouza
•
865 views
More from Bram Vogelaar
10 things i learned building nomad-packs by
10 things i learned building nomad-packs
Bram Vogelaar
128 views
•
26 slides
10 things I learned building Nomad packs by
10 things I learned building Nomad packs
Bram Vogelaar
168 views
•
25 slides
Easy Cloud Native Transformation with Nomad by
Easy Cloud Native Transformation with Nomad
Bram Vogelaar
52 views
•
34 slides
Uncomplicated Nomad by
Uncomplicated Nomad
Bram Vogelaar
106 views
•
18 slides
Observability; a gentle introduction by
Observability; a gentle introduction
Bram Vogelaar
78 views
•
28 slides
Running Trusted Payload with Nomad and Waypoint by
Running Trusted Payload with Nomad and Waypoint
Bram Vogelaar
28 views
•
32 slides
More from Bram Vogelaar
(20)
10 things i learned building nomad-packs by Bram Vogelaar
10 things i learned building nomad-packs
Bram Vogelaar
•
128 views
10 things I learned building Nomad packs by Bram Vogelaar
10 things I learned building Nomad packs
Bram Vogelaar
•
168 views
Easy Cloud Native Transformation with Nomad by Bram Vogelaar
Easy Cloud Native Transformation with Nomad
Bram Vogelaar
•
52 views
Uncomplicated Nomad by Bram Vogelaar
Uncomplicated Nomad
Bram Vogelaar
•
106 views
Observability; a gentle introduction by Bram Vogelaar
Observability; a gentle introduction
Bram Vogelaar
•
78 views
Running Trusted Payload with Nomad and Waypoint by Bram Vogelaar
Running Trusted Payload with Nomad and Waypoint
Bram Vogelaar
•
28 views
Easy Cloud Native Transformation using HashiCorp Nomad by Bram Vogelaar
Easy Cloud Native Transformation using HashiCorp Nomad
Bram Vogelaar
•
165 views
Securing Prometheus exporters using HashiCorp Vault by Bram Vogelaar
Securing Prometheus exporters using HashiCorp Vault
Bram Vogelaar
•
398 views
CICD using jenkins and Nomad by Bram Vogelaar
CICD using jenkins and Nomad
Bram Vogelaar
•
230 views
Bootstrapping multidc observability stack by Bram Vogelaar
Bootstrapping multidc observability stack
Bram Vogelaar
•
190 views
Running trusted payloads with Nomad and Waypoint by Bram Vogelaar
Running trusted payloads with Nomad and Waypoint
Bram Vogelaar
•
144 views
Gamification of Chaos Testing by Bram Vogelaar
Gamification of Chaos Testing
Bram Vogelaar
•
75 views
Puppet and the HashiStack by Bram Vogelaar
Puppet and the HashiStack
Bram Vogelaar
•
203 views
Bootstrapping multidc observability stack by Bram Vogelaar
Bootstrapping multidc observability stack
Bram Vogelaar
•
125 views
Creating Reusable Puppet Profiles by Bram Vogelaar
Creating Reusable Puppet Profiles
Bram Vogelaar
•
59 views
Gamification of Chaos Testing by Bram Vogelaar
Gamification of Chaos Testing
Bram Vogelaar
•
108 views
Autoscaling with hashi_corp_nomad by Bram Vogelaar
Autoscaling with hashi_corp_nomad
Bram Vogelaar
•
224 views
Observability with Consul Connect by Bram Vogelaar
Observability with Consul Connect
Bram Vogelaar
•
379 views
Testing your infrastructure with litmus by Bram Vogelaar
Testing your infrastructure with litmus
Bram Vogelaar
•
78 views
Devops its not about the tooling by Bram Vogelaar
Devops its not about the tooling
Bram Vogelaar
•
53 views
Recently uploaded
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue
129 views
•
10 slides
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue
196 views
•
62 slides
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue
152 views
•
23 slides
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue
265 views
•
23 slides
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue
208 views
•
8 slides
Generative AI: Shifting the AI Landscape by
Generative AI: Shifting the AI Landscape
Deakin University
67 views
•
55 slides
Recently uploaded
(20)
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue
•
129 views
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by ShapeBlue
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue
•
196 views
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue
•
152 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue
•
265 views
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue
•
208 views
Generative AI: Shifting the AI Landscape by Deakin University
Generative AI: Shifting the AI Landscape
Deakin University
•
67 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash
•
162 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue
•
224 views
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... by ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue
•
178 views
"Package management in monorepos", Zoltan Kochan by Fwdays
"Package management in monorepos", Zoltan Kochan
Fwdays
•
34 views
Initiating and Advancing Your Strategic GIS Governance Strategy by Safe Software
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software
•
184 views
"Node.js Development in 2024: trends and tools", Nikita Galkin by Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays
•
33 views
Future of AR - Facebook Presentation by Rob McCarty
Future of AR - Facebook Presentation
Rob McCarty
•
65 views
Cencora Executive Symposium by marketingcommunicati21
Cencora Executive Symposium
marketingcommunicati21
•
160 views
The Role of Patterns in the Era of Large Language Models by Yunyao Li
The Role of Patterns in the Era of Large Language Models
Yunyao Li
•
91 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue
•
207 views
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... by ShapeBlue
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
ShapeBlue
•
108 views
Ransomware is Knocking your Door_Final.pdf by Security Bootcamp
Ransomware is Knocking your Door_Final.pdf
Security Bootcamp
•
98 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10
•
146 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue
•
139 views
Puppet testing
1.
Testing for people who hate testing Bram vogelaar TTT 12 May 2017
3.
Does this $h*t even compile? $ puppet parser validate validate.pp Error: Syntax error at ')' at validate.pp:1:13
4.
Does this $h*t look good? gem install puppetlint rubocop $ puppetlint lint.pp lint.pp ERROR: trailing whitespace found on line 1 $ puppetlint fix lint.pp lint.pp FIXED: trailing whitespace found on line 1 $rubocop Inspecting 45 files .WCCCCCCCWWCWWWWCCCCCCCCCCCCCCWCCCCCCWCWCWWCW Offenses: lib/facter/is_master.rb:4:5: C: Do not prefix reader method names with
5.
Does this $h*t do what i think it does? gem install rspecpuppet context 'with service_enable set to true' do it { is_expected.to contain_service('neo4j') } it { is_expected.not_to contain_file('/etc/init.d/neo4j') } it { is_expected.not_to contain_systemd__unit_file('neo4j.service') } it { is_expected.to contain_service('neo4j').with('name' => 'neo4j') }
6.
How much of this $h*t is even tested? at_exit { RSpec::Puppet::Coverage.report! } # Watch the world burn! RSpec::Puppet::Coverage.report!(70)
7.
So this $h*t will work on $laptop gem install rspecpuppetfacts require 'spec_helper' describe 'example::params' do on_os_under_test.each do |os, facts| context "on #{os}" do let(:facts) { facts } context "It should not contain any resources" do it { should contain_class('example::params') } it { should have_resource_count(0) } end end end end
8.
require 'spec_helper' describe 'profiles::selinux' do on_os_under_test.each do |os, facts| context "on #{os}" do let(:facts) do facts.merge({ :selinux_agent_vardir => '/var/lib/puppet', }) end context 'with defaults for all parameters' do it { should contain_class('profiles::selinux') } end end end end
9.
But does this $h*t even work for real gem install testkitchen driver: name: vagrant provisioner: name: puppet_apply require_chef_for_busser: false manifest: init.pp manifests_path: examples verifier: name: inspec suite_name: default platforms: name: ubuntu14.04 provisioner: puppet_apt_collections_repo: https://apt.puppetlabs.com/puppetlabsreleasepc1trusty.deb
10.
Is your $h*t really up control 'service 01' do impact 1.0 title 'neo4j service is running' desc 'Ensures that the neo4j service is up and running' describe service('neo4j') do it { should be_enabled } it { should be_installed } it { should be_running } end end
12.
Gemfile: Download all the $h*t $ gem install bundler group :test do gem 'json', '< 2.0.0', :require => false if RUBY_VERSION < '2.0.0' gem 'json_pure', '<= 2.0.1', :require => false if RUBY_VERSION < '2.0.0' gem 'metadatajsonlint', :require => false gem 'puppetstrings', :require => false gem 'puppet_facts', :require => false gem 'puppetlabs_spec_helper', :require => false $ bundle update
13.
Rakefile: Automate this $h*t $ gem install rake require 'puppetlabs_spec_helper/rake_tasks' require 'puppetlint/tasks/puppetlint' require 'puppetstrings/tasks' if Bundler.rubygems.find_name('testkitchen').any? require 'kitchen/rake_tasks' Kitchen::RakeTasks.new end $ bundle exec rake validate lint spec
14.
Lets speed this $h*t up # Tests are slow $ bundle exec rake parallel_spec # Git checkout is slow $ bundle exec rake spec_prep $ bundle exec rake spec_standalone $ bundle exec rake spec_clean
15.
Guardfile: ctrl+F5 this $h*t $ gem install guardrake guard 'rake', :task => 'validate' do watch(%r{^examples/(.+).pp$}) watch(%r{^manifests/(.+).pp$}) watch(%r{^templates/(.+).erb$}) end $ bundle exec guard
16.
guard notifications
17.
.travis.yml: Does this $h*t run on $legacy $ gem install travis sudo: false language: ruby bundler_args: without development integration script: "bundle exec rake validate lint spec SPEC_OPTS='color format documentation'" matrix: fast_finish: true include: rvm: 2.1.10 env: PUPPET_GEM_VERSION="~> 3.0" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" rvm: 2.1.10 env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes" $ travis show
18.
Does this $h*t scale $ gem install modulesync $ tree ├── managed_modules.yml ├── moduleroot │ ├── Gemfile │ ├── .gitignore │ ├── Guardfile │ ├── .kitchen.yml │ ├── Puppetfile │ ├── Rakefile │ ├── .rspec │ ├── .rubocop.yml │ ├── spec │ │ └── spec_helper.rb │ └── .travis.yml └── modulesync.yml $ msync update m "adding more gems"
19.
Links to this $h*t http://puppetlint.com/ https://voxpupuli.org/plugins/ http://rspecpuppet.com/ https://github.com/puppetlabs/beaker http://kitchen.ci/ https://github.com/neillturner/kitchenpuppet http://bundler.io/v1.5/gemfile.html http://rake.rubyforge.org/ http://guardgem.org/ https://travisci.org/
20.
Demo
21.
$ gem install puppetstrings $ bundle exec rake strings:generate Files: 5 Modules: 0 ( 0 undocumented) Classes: 0 ( 0 undocumented) Constants: 0 ( 0 undocumented) Attributes: 0 ( 0 undocumented) Methods: 0 ( 0 undocumented) Puppet Classes: 5 ( 0 undocumented) Puppet Defined Types: 0 ( 0 undocumented) Puppet Types: 0 ( 0 undocumented) Puppet Providers: 0 ( 0 undocumented) Puppet Functions: 0 ( 0 undocumented) 100.00% documented