Using the Puppet Catalog Preview tool in a rspec-puppet workflow?
32 views
Skip to first unread message
robbyt
unread,
Jul 26, 2016, 2:46:59 PM7/26/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Puppet Users
I'd like to use the Catalog Preview tool as part of module spec tests, to ensure that code in each module will work correctly in both versions of Puppet?
Is it possible to use the Catalog Preview tool without a real Puppet Master infrastructure?
Thanks, RT
Henrik Lindberg
unread,
Jul 27, 2016, 8:52:19 AM7/27/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
Yes, except for the last bit. The catalog preview tool does a
compilation and requires that nodes for which the compilation is
performed for has called in to deposit facts.
It will however work if a terminus is used to deliver the wanted facts
and any trusted information that is required for proper data lookup.
You will also need something that defines what the catalogs to compare
should contain, it cannot compare just modules.
If you are only interested in testing if the module's code can be parsed
with both 3.x regular and 3.x future parser/4.x, you can simply change
the setting Puppet[:parser] = 'future' (or 'current') around your spec
tests. (See the 3.x code base for spec tests that does that).