puppet-rspec - external modules? use vendored instead of download?

33 views
Skip to first unread message

Joaquin Menchaca

unread,
May 6, 2018, 5:02:02 PM5/6/18
to Puppet Users
I am getting started with puppet-rspec, and I setup my external modules required in the site/$module/.fixtures.yml, with something like

---
fixtures:
  forge_modules:
     apt: puppetlabs/apt
     stdlib: puppetlabs/stdlib
     debconf: stm/debconf

I noticed that these are downloaded each and every time I run my tests (and with slow internet, this is not fun).  Could I point these to my vendored modules instead in ../../modules

What is typical configuration? 

I'm thinking for local development environment, I really do want to use vendored modules, not download these puppies each time (or just download if I changed metadata.json).  For CI environment, I can see how that'd make sense to download each and every time.


Garrett Honeycutt

unread,
May 6, 2018, 7:22:12 PM5/6/18
to puppet...@googlegroups.com
Hi Joaquin,

When you run `rake spec` it runs the equivalent of the following three
commands.

`rake spec_clean` # Clean up the fixtures directory
`rake spec_prep` # Create the fixtures directory
`rake spec_standalone` # Run RSpec code examples

You could run the following once.

`rake spec_clean spec_prep`

Then run this as you are working on the module.

`rake spec_standalone`

Best regards,
-g

--
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

David Schmitt

unread,
May 8, 2018, 8:22:17 AM5/8/18
to puppet...@googlegroups.com
You can (temporarily) use symlinks to a manually maintained cache to work around this. For a more complete fix, see PDK-636, which is currently in progress.


Cheers, David

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f4b910e8-365c-437b-993a-8e31d39fb90c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Reply all
Reply to author
Forward
0 new messages