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
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
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).

Hope that helps.
- henrik



> Thanks,
> RT
>
>
> --
> 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
> <mailto:puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/92710a2d-dd87-4dd8-95bd-9b5cbf1d5ecd%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/92710a2d-dd87-4dd8-95bd-9b5cbf1d5ecd%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/
Reply all
Reply to author
Forward
0 new messages