Skip to content

Instantly share code, notes, and snippets.

@JimPanic
Created June 17, 2015 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JimPanic/9654d85332be88228e1f to your computer and use it in GitHub Desktop.
Save JimPanic/9654d85332be88228e1f to your computer and use it in GitHub Desktop.
Ruby, I hate you. Or: how puppet called by bundle exec rake spec does something else than puppet called by me.
# bundle exec rspec
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -S rspec spec/classes/bond/setup_spec.rb spec/defines/bond/debian_spec.rb spec/defines/bond/redhat_spec.rb spec/defines/bond_spec.rb spec/unit/network_facts_spec.rb spec/unit/provider/network_config/interfaces_spec.rb spec/unit/provider/network_config/redhat_spec.rb spec/unit/provider/network_route/redhat_spec.rb spec/unit/provider/network_route/routes_spec.rb spec/unit/type/network_config_spec.rb spec/unit/type/network_route_spec.rb --color
...............FFFF.FF...................................................................................................................................................................................................**.*.***.......................................
Pending:
Puppet::Type::Network_config when validating the attribute options should be a descendant of the KeyValue property
# on conversion to specific type
# ./spec/unit/type/network_config_spec.rb:69
Puppet::Type::Network_config when validating the attribute value ipaddress should fail if a malformed address is used
# implementation of IP address validation
# ./spec/unit/type/network_config_spec.rb:104
Puppet::Type::Network_config when validating the attribute value ipaddress using the inet family should fail when passed an IPv6 address
# implementation of IP address validation
# ./spec/unit/type/network_config_spec.rb:88
Puppet::Type::Network_config when validating the attribute value ipaddress using the inet6 family should fail when passed an IPv4 address
# implementation of IP address validation
# ./spec/unit/type/network_config_spec.rb:98
Puppet::Type::Network_config when validating the attribute value netmask should validate a CIDR netmask
# Not yet implemented
# ./spec/unit/type/network_config_spec.rb:111
Puppet::Type::Network_config when validating the attribute value netmask should fail if an invalid CIDR netmask is used
# implementation of IP address validation
# ./spec/unit/type/network_config_spec.rb:112
Failures:
1) network::bond on platform RedHat should create 'network::bond::redhat'
Failure/Error: should contain_network__bond__redhat('bond0')
Puppet::Error:
gem ruby-augeas required at /Users/apanek/puppet-community/puppet-network/spec/fixtures/modules/kmod/manifests/init.pp:11 on node alexanders-macbook.local
# ./spec/defines/bond_spec.rb:32:in `block (4 levels) in <top (required)>'
2) network::bond on platform RedHat should forward all options to 'network::bond::redhat'
Failure/Error: should contain_network__bond__redhat('bond0').with(params)
Puppet::Error:
gem ruby-augeas required at /Users/apanek/puppet-community/puppet-network/spec/fixtures/modules/kmod/manifests/init.pp:11 on node alexanders-macbook.local
# ./spec/defines/bond_spec.rb:36:in `block (4 levels) in <top (required)>'
3) network::bond on platform Debian should create 'network::bond::debian'
Failure/Error: should contain_network__bond__debian('bond0')
Puppet::Error:
Could not find class network::bond::debian for alexanders-macbook.local on node alexanders-macbook.local
# ./spec/defines/bond_spec.rb:44:in `block (4 levels) in <top (required)>'
4) network::bond on platform Debian should forward all options to 'network::bond::debian'
Failure/Error: should contain_network__bond__debian('bond0').with(params)
Puppet::Error:
Could not find class network::bond::debian for alexanders-macbook.local on node alexanders-macbook.local
# ./spec/defines/bond_spec.rb:48:in `block (4 levels) in <top (required)>'
5) network::bond configuring the kernel bonding device
Failure/Error: it { should contain_class('network::bond::setup') }
Puppet::Error:
Could not find class network::bond::debian for alexanders-macbook.local on node alexanders-macbook.local
# ./spec/defines/bond_spec.rb:64:in `block (3 levels) in <top (required)>'
6) network::bond configuring the kernel bonding device should add a kernel module alias for the bonded device
Failure/Error: should contain_kmod__alias('bond0').with({
Puppet::Error:
Could not find class network::bond::debian for alexanders-macbook.local on node alexanders-macbook.local
# ./spec/defines/bond_spec.rb:67:in `block (3 levels) in <top (required)>'
Finished in 4.88 seconds
264 examples, 6 failures, 6 pending
Failed examples:
rspec ./spec/defines/bond_spec.rb:31 # network::bond on platform RedHat should create 'network::bond::redhat'
rspec ./spec/defines/bond_spec.rb:35 # network::bond on platform RedHat should forward all options to 'network::bond::redhat'
rspec ./spec/defines/bond_spec.rb:43 # network::bond on platform Debian should create 'network::bond::debian'
rspec ./spec/defines/bond_spec.rb:47 # network::bond on platform Debian should forward all options to 'network::bond::debian'
rspec ./spec/defines/bond_spec.rb:64 # network::bond configuring the kernel bonding device
rspec ./spec/defines/bond_spec.rb:66 # network::bond configuring the kernel bonding device should add a kernel module alias for the bonded device
########
# puppet apply -e 'notify { "$::augeasversion": }'
Notice: Compiled catalog for alexanders-macbook.local in environment production in 0.06 seconds
Notice: 1.3.0
Notice: /Stage[main]/Main/Notify[1.3.0]/message: defined 'message' as '1.3.0'
Notice: Finished catalog run in 0.04 seconds
@adrienthebo
Copy link

Try running the puppet apply with bundler - you might be running a different version of Puppet otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment