Test_Puppetfile

Provides unit tests and examples for the Puppetfile lens.

Summary
Test_PuppetfileProvides unit tests and examples for the Puppetfile lens.
Augeas Tests
Puppetfile.lns
Puppetfile.lnsComplex version conditions
Puppetfile.lnsOwner is not mandatory if git is given

Augeas Tests

Puppetfile.lns

test Puppetfile.lns get "forge \"https://forgeapi.puppetlabs.com\" # the default forge mod 'puppetlabs-razor' mod 'puppetlabs-ntp', \"0.0.3\" mod 'puppetlabs-apt', :git => \"git://github.com/puppetlabs/puppetlabs-apt.git\" mod 'puppetlabs-stdlib', :git => \"git://github.com/puppetlabs/puppetlabs-stdlib.git\" mod 'puppetlabs-apache', '0.6.0', :github_tarball => 'puppetlabs/puppetlabs-apache' metadata # we want metadata\n" = { "forge" = "https://forgeapi.puppetlabs.com" { "#comment" = "the default forge" } } { } { "1" = "puppetlabs-razor" } { "2" = "puppetlabs-ntp" { "@version" = "0.0.3" } } { } { "3" = "puppetlabs-apt" { "git" = "git://github.com/puppetlabs/puppetlabs-apt.git" } } { } { "4" = "puppetlabs-stdlib" { "git" = "git://github.com/puppetlabs/puppetlabs-stdlib.git" } } { } { "5" = "puppetlabs-apache" { "@version" = "0.6.0" } { "github_tarball" = "puppetlabs/puppetlabs-apache" } } { } { "metadata" { "#comment" = "we want metadata" } }

Puppetfile.lns

Complex version conditions

Puppetfile.lns

test Puppetfile.lns get "mod 'stdlib', :git => \"git://github.com/puppetlabs/puppetlabs-stdlib.git\"\n" = { "1" = "stdlib" { "git" = "git://github.com/puppetlabs/puppetlabs-stdlib.git" } }

Owner is not mandatory if git is given

Parses libarian-puppet’s Puppetfile format
test Puppetfile.lns get "forge \"https://forgeapi.puppetlabs.com\" # the default forge mod 'puppetlabs-razor' mod 'puppetlabs-ntp', \"0.0.3\" mod 'puppetlabs-apt', :git => \"git://github.com/puppetlabs/puppetlabs-apt.git\" mod 'puppetlabs-stdlib', :git => \"git://github.com/puppetlabs/puppetlabs-stdlib.git\" mod 'puppetlabs-apache', '0.6.0', :github_tarball => 'puppetlabs/puppetlabs-apache' metadata # we want metadata\n" = { "forge" = "https://forgeapi.puppetlabs.com" { "#comment" = "the default forge" } } { } { "1" = "puppetlabs-razor" } { "2" = "puppetlabs-ntp" { "@version" = "0.0.3" } } { } { "3" = "puppetlabs-apt" { "git" = "git://github.com/puppetlabs/puppetlabs-apt.git" } } { } { "4" = "puppetlabs-stdlib" { "git" = "git://github.com/puppetlabs/puppetlabs-stdlib.git" } } { } { "5" = "puppetlabs-apache" { "@version" = "0.6.0" } { "github_tarball" = "puppetlabs/puppetlabs-apache" } } { } { "metadata" { "#comment" = "we want metadata" } }
Close