Create a .pp which tests all features?

0 views
Skip to first unread message

Mark Plaksin

unread,
Nov 6, 2009, 9:29:19 AM11/6/09
to puppe...@googlegroups.com
Howdy:

Does it make sense (and is it possible :) to create a .pp file which
tests all of Puppet's features? Running puppetd against that .pp could
be part of the Magical Testing World and could help uncover problems
(like the recursive symlink one in 2757) before users find them.

Markus Roberts

unread,
Nov 6, 2009, 2:10:28 PM11/6/09
to puppe...@googlegroups.com

The problem is, _all_ is a pretty big order.  Certainly having puppet-language-level unit tests would be a big help.  But when you start looking at permutations (replacing a symlink with a directory on an NFS mount under Solaris with a puppetmaster running on passenger under Ubuntu behind a firewall...well you get the idea).

In any case, it would have to be multiple .pp files, since you might want to be able to catch things like "when no default node is declared" etc. that would directly conflict with other tests.

But in general, yeah, we're trying to move towards more high-level testing.

-- Markus

 

Luke Kanies

unread,
Nov 6, 2009, 8:57:26 PM11/6/09
to puppe...@googlegroups.com

It would be especially fantastic if, in the course of delivering this,
we managed to provide a framework for doing unit/integration tests.

--
Real freedom lies in wildness, not in civilization.
-- Charles Lindbergh
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

James Turnbull

unread,
Nov 6, 2009, 9:36:49 PM11/6/09
to puppe...@googlegroups.com, puppe...@googlegroups.com
Close integration perhaps even inline with a unit testing methodology
a la cucumber/cucumber nagios would be awesome.

Here is a resource and here is a test that the resource works - all in
a manifest. That way your puppet run kills two birds with one stone.
Validates and implements configuration state AND functionality.

I could also be slightly crazy. :)

Regards

James Turnbull
http://www.james-turnbull.net

Luke Kanies

unread,
Nov 6, 2009, 9:40:53 PM11/6/09
to puppe...@googlegroups.com
I think that's probably a bit much, but then, I don't really know what
this will look like, so I've no real idea.
--
However beautiful the strategy, you should occasionally look at the
results. -- Sir Winston Churchill

James Turnbull

unread,
Nov 6, 2009, 10:09:47 PM11/6/09
to puppe...@googlegroups.com
It is probably a little too much :) A more likely integration might be
to use stored config and build middleware between the db and something
like cucumber.

Regards

James Turnbull
http://www.james-turnbull.net

Eric Gerlach

unread,
Nov 9, 2009, 2:12:18 PM11/9/09
to puppe...@googlegroups.com
On Fri, Nov 06, 2009 at 11:10:28AM -0800, Markus Roberts wrote:
> > Does it make sense (and is it possible :) to create a .pp file which
>
> > tests all of Puppet's features? Running puppetd against that .pp could
> > be part of the Magical Testing World and could help uncover problems
> > (like the recursive symlink one in 2757) before users find them.
> >
>
> The problem is, _all_ is a pretty big order.

It's worse than that, it's recursively enumerable, Jim!

At least... my intuition says it would be. Which means you'd have to solve the
Halting problem to do it. Or maybe that's just to write a program which writes
the .pp file which tests all of Puppet :-)

Now I've just gone and confused myself.

Cheers,

--
Eric Gerlach, Network Administrator
Federation of Students
University of Waterloo
p: (519) 888-4567 x36329
e: eger...@feds.uwaterloo.ca

Reply all
Reply to author
Forward
0 new messages