Server IP : 85.214.239.14 / Your IP : 18.226.187.60 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/root/proc/2/task/2/root/usr/share/augeas/lenses/dist/tests/ |
Upload File : |
(* Module: Test_Puppetfile Provides unit tests and examples for the <Puppetfile> lens. *) module Test_Puppetfile = (* Test: 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" } } (* Test: Puppetfile.lns Complex version conditions *) test Puppetfile.lns get "mod 'puppetlabs/stdlib', '< 5.0.0' mod 'theforeman/concat_native', '>= 1.3.0 < 1.4.0' mod 'herculesteam/augeasproviders', '2.1.x'\n" = { "1" = "puppetlabs/stdlib" { "@version" = "< 5.0.0" } } { "2" = "theforeman/concat_native" { "@version" = ">= 1.3.0 < 1.4.0" } } { "3" = "herculesteam/augeasproviders" { "@version" = "2.1.x" } } (* Test: Puppetfile.lns Owner is not mandatory if git is given *) 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" } } (* Issue #427 *) test Puppetfile.lns get "mod 'puppetlabs/apache', :latest\n" = { "1" = "puppetlabs/apache" { "latest" } } test Puppetfile.lns get "mod 'data', :git => 'ssh://git@stash.example.com/bp/puppet-hiera.git', :branch => :control_branch, :default_branch => 'development', :install_path => '.'\n" = { "1" = "data" { "git" = "ssh://git@stash.example.com/bp/puppet-hiera.git" } { "branch" = ":control_branch" } { "default_branch" = "development" } { "install_path" = "." } } (* Comment: after module name comma This conflicts with the comma comment tree below *) test Puppetfile.lns get "mod 'data' # eol comment\n" = * (* Comment: after first comma *) test Puppetfile.lns get "mod 'data', # eol comment # and another '1.2.3'\n" = { "1" = "data" { "#comment" = "eol comment" } { "#comment" = "and another" } { "@version" = "1.2.3" } } (* Comment: after version Current culprit: need two \n *) test Puppetfile.lns get "mod 'data', '1.2.3' # eol comment\n" = * test Puppetfile.lns get "mod 'data', '1.2.3' # eol comment\n\n" = { "1" = "data" { "@version" = "1.2.3" { "#comment" = "eol comment" } } } (* Comment: eol after version comma *) test Puppetfile.lns get "mod 'data', '1.2.3', # a comment :local => true\n" = { "1" = "data" { "@version" = "1.2.3" } { "#comment" = "a comment" } { "local" = "true" } } (* Comment: after version comma with newline *) test Puppetfile.lns get "mod 'data', '1.2.3', # a comment :local => true\n" = { "1" = "data" { "@version" = "1.2.3" } { "#comment" = "a comment" } { "local" = "true" } } (* Comment: eol before opts, without version *) test Puppetfile.lns get "mod 'data', # a comment # :ref => 'abcdef', :local => true\n" = { "1" = "data" { "#comment" = "a comment" } { "#comment" = ":ref => 'abcdef'," } { "local" = "true" } } (* Comment: after opt comma *) test Puppetfile.lns get "mod 'data', '1.2.3', :ref => 'abcdef', # eol comment :local => true\n" = { "1" = "data" { "@version" = "1.2.3" } { "ref" = "abcdef" } { "#comment" = "eol comment" } { "local" = "true" } } (* Comment: in opts *) test Puppetfile.lns get "mod 'data', '1.2.3', :ref => 'abcdef', # a comment :local => true\n" = { "1" = "data" { "@version" = "1.2.3" } { "ref" = "abcdef" } { "#comment" = "a comment" } { "local" = "true" } } (* Comment: after last opt *) test Puppetfile.lns get "mod 'data', '1.2.3', :local => true # eol comment\n\n" = { "1" = "data" { "@version" = "1.2.3" } { "local" = "true" } { "#comment" = "eol comment" } }