[augeas-devel] [PATCH 1 of 2] Add puppet.aug and associated test

David Lutterkort dlutter at redhat.com
Wed Aug 13 18:41:27 UTC 2008


On Wed, 2008-08-13 at 18:54 +0200, Raphael Pinson wrote:
> # HG changeset patch
> # User Raphael Pinson <raphink at gmail.com>
> # Date 1218646423 -7200
> # Node ID 6f492eaaa453856246c5ffa79ffd1c8e06939261
> # Parent  98e1bdd4af843caab45a32d0120c6c5497260f2d
> Add puppet.aug and associated test

Nice :) ACK, committed.

One only slightly related thing about Inifile:

> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> +++ b/lenses/tests/test_puppet.aug	Wed Aug 13 18:53:43 2008 +0200
> @@ -0,0 +1,31 @@
> +module Test_puppet =
> +
> +   let conf = "
> +[main]
> +logdir=/var/log/puppet
> +
> +[puppetd]
> +server=misspiggy.network.com
> +"
> +
> +   test Puppet.lns get conf =
> +      {}
> +      { "section" = "main"
> +         { "logdir" = "/var/log/puppet" }
> +         {} }
> +      { "section" = "puppetd"
> +         { "server" = "misspiggy.network.com" } }

Wouldn't it be nicer to use the titles of sections as their key instead
of calling everything section ? That would make navigating the tree
easier ... for cases where section names are too horrendous (Php ?) the
way things are right now are preferrable.

What I have in mind is

        test Puppet.lns get conf =
              {}
              { "main"
                 { "logdir" = "/var/log/puppet" }
                 {} }
              { "puppetd"
                 { "server" = "misspiggy.network.com" } }
        
David





More information about the augeas-devel mailing list