Using puppetlabs_spec_helper on Windows 7

118 views
Skip to first unread message

Matthieu Nantern

unread,
Oct 28, 2013, 6:44:30 AM10/28/13
to puppet...@googlegroups.com
I'm trying to make puppetlabs_spec_helper runs on Windows 7 to test my Puppet modules.
 
Is this supported ? Because I encountered some problems:
  1. symlinks were not created on Windows 7 (even if the functionnality are availabe). To manage that I added to rake_tasks.rb an ugly function:

    def make_link(source,target)
      ruby_platform = RbConfig::CONFIG['host_os']
      if RUBY_PLATFORM =~ /mswin|mingw|cygwin/ then
        #Windows Stuff
        source_win=source.tr("/","\\")
        target_win=target.tr("/","\\")
        `call mklink /D #{target_win} #{source_win}`
      elsif RUBY_PLATFORM =~ /linux/ then
        FileUtils::ln_s(source, target)
      end
    end


  2. undefined method `fetch' for nil:NilClass:

         Failure/Error: Unable to find matching line from backtrace
         NoMethodError:
           undefined method `fetch' for nil:NilClass
         # C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/test/test_helper.rb:107:in `block in after_each_test'
         # C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/test/test_helper.rb:106:in `each'
         # C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/test/test_helper.rb:106:in `after_each_test'

  3. I use the concat module. And when running "rake test", I got:

    Failure/Error: should contain_package('nfs-utils')
         Puppet::Error:
           $concat_basedir not defined. Try running again with pluginsync=true on the [master] section of your node's '/etc/puppet/puppet.conf'.
 
Is it a lost cause ? Or someone succeeded to test puppet modules on Windows ?
 
Thank you for your help !

Johan De Wit

unread,
Oct 28, 2013, 7:07:19 AM10/28/13
to puppet...@googlegroups.com, Matthieu Nantern
I do have the same error on linux.

It has something tot do with the concat module.

If you write a rspec file for a class not using the concat module, it should work. 

Unfortunately, i do not have a solution for our problem.

Grts

Jo
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


-- 
Johan De Wit

Open Source Consultant

Red Hat Certified Engineer         (805008667232363)
Puppet Certified Professional 2013 (PCP0000006)
_________________________________________________________
 
Open-Future                 Phone     +32 (0)2/255 70 70
Zavelstraat 72              Fax       +32 (0)2/255 70 71
3071 KORTENBERG             Mobile    +32 (0)474/42 40 73
BELGIUM                     http://www.open-future.be
_________________________________________________________
 

Upcoming Events:

Puppet Advanced Training | https://www.open-future.be/puppet-advanced-training-12-till-14th-november

Zabbix Certified Training | https://www.open-future.be/zabbix-certified-training-18-till-20th-november

Zabbix Large Environments Training | https://www.open-future.be/zabbix-large-environments-training-21-till-22nd-november

Puppet Fundamentals Training | https://www.open-future.be/puppet-fundamentals-training-10-till-12th-december

Subscribe to our newsletter: http://eepurl.com/BUG8H


Breeze

unread,
Feb 20, 2015, 4:31:05 PM2/20/15
to puppet...@googlegroups.com
Is it a lost cause ? Or someone succeeded to test puppet modules on Windows ?

BUMP

Rob Reynolds

unread,
Apr 8, 2015, 2:42:57 PM4/8/15
to puppet...@googlegroups.com
On Fri, Feb 20, 2015 at 3:31 PM, Breeze <bree...@gmail.com> wrote:
Is it a lost cause ? Or someone succeeded to test puppet modules on Windows ?

BUMP

I wouldn't say lost cause - https://github.com/puppetlabs/puppetlabs_spec_helper/pull/87 and https://github.com/puppetlabs/puppetlabs_spec_helper/pull/84 - those were released in 0.9.0 (somewhere late February) I believe.
 
 

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.



--
Rob Reynolds
Developer, Puppet Labs

PuppetConf 2015 is coming to Portland, Oregon! Join us October 5-9.
Register now to take advantage of the Early Adopter discount save $349!
Reply all
Reply to author
Forward
0 new messages