GithubHelp home page GithubHelp logo

puppet-testing-example's Introduction

This is some code that goes together with my presentation on PuppetCamp
on puppet module testing. 

You can view the talk here: http://vstone.eu/talks/puppet-module-testing
If you plan on reusing it, which I encourage, I also suggest you improve it
here: https://github.com/vStone/talk-puppet-module-testing-revealjs

If you feel like a basic example test is missing, the solution is a pull
request away.


## Note

You can find a more complete example here: https://github.com/vstone/puppet-module-testing

puppet-testing-example's People

Contributors

vstone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

puppet-testing-example's Issues

mysql_password tests fail

Using:

*** LOCAL GEMS ***

minitest (2.5.1)
mocha (1.0.0)
puppet (3.4.3)
puppetlabs_spec_helper (0.4.1)
rake (0.9.2.2)
rspec (2.14.1)
rspec-core (2.14.7)
rspec-expectations (2.14.5)
rspec-mocks (2.14.6)
rspec-puppet (1.0.1)

I get the following spec errors:

/opt/local/bin/ruby1.9 -S rspec spec/classes/example_spec.rb spec/functions/mysql_password_spec.rb --color
....FF

Failures:

  1) mysql_password should throw an error on invalid types
     Failure/Error: lambda {
       expected Puppet::ParseError, got #<NameError: uninitialized constant PuppetlabsSpec> with backtrace:
         # ./spec/functions/mysql_password_spec.rb:5:in `block (2 levels) in <top (required)>'
         # ./spec/functions/mysql_password_spec.rb:13:in `block (3 levels) in <top (required)>'
         # ./spec/functions/mysql_password_spec.rb:12:in `block (2 levels) in <top (required)>'
     # ./spec/functions/mysql_password_spec.rb:12:in `block (2 levels) in <top (required)>'

  2) mysql_password should convert a password to a hash
     Failure/Error: let(:scope) { PuppetlabsSpec::PuppetInternals.scope }
     NameError:
       uninitialized constant PuppetlabsSpec
     # ./spec/functions/mysql_password_spec.rb:5:in `block (2 levels) in <top (required)>'
     # ./spec/functions/mysql_password_spec.rb:19:in `block (2 levels) in <top (required)>'

Finished in 0.15866 seconds
6 examples, 2 failures

Failed examples:

rspec ./spec/functions/mysql_password_spec.rb:11 # mysql_password should throw an error on invalid types
rspec ./spec/functions/mysql_password_spec.rb:17 # mysql_password should convert a password to a hash

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.