Skip to content

Instantly share code, notes, and snippets.

@igalic
Created November 15, 2013 17:39
Show Gist options
  • Save igalic/7488407 to your computer and use it in GitHub Desktop.
Save igalic/7488407 to your computer and use it in GitHub Desktop.
puppetlabs-apache rspec failure
2) apache::vhost os-independent items .conf content when scriptalias is /usr/scripts should accept a scriptalias: matches
Failure/Error: should contain_file("25-#{title}.conf").with_content( match )
expected that the catalogue would contain File[25-rspec.example.com.conf] with content set to `" <Directory \"/usr/scripts\">"` but it is set to `"# ************************************\n# Vhost template in module puppetlabs-apache\n# Managed by Puppet\n# ************************************\n\n<VirtualHost *:84>\n ServerName rspec.example.com\n\n ## Vhost docroot\n DocumentRoot /rspec/docroot\n\n\n\n ## Directories, there should at least be a declaration for /rspec/docroot\n\n\n <Directory /rspec/docroot>\n Options Indexes FollowSymLinks MultiViews\n\n AllowOverride None\n Order allow,deny\n Allow from all\n </Directory>\n\n\n ## Load additional static includes\n\n\n ## Logging\n ErrorLog /var/log/apache2/rspec.example.com_error.log\n LogLevel warn\n ServerSignature Off\n CustomLog /var/log/apache2/rspec.example.com_access.log combined\n\n\n ## Script alias directives\n ScriptAlias /cgi-bin/ \"/usr/scripts/\"\n\n <Directory \"/usr/scripts\">\n AllowOverride None\n Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch\n Order allow,deny\n Allow from all\n </Directory>\n\n</VirtualHost>\n"` in the catalogue
# ./spec/defines/vhost_spec.rb:566:in `block (7 levels) in <top (required)>'
# ./spec/defines/vhost_spec.rb:565:in `each'
# ./spec/defines/vhost_spec.rb:565:in `block (6 levels) in <top (required)>'
3) apache::vhost os-independent items .conf content when scriptaliases is {"alias"=>"/blah/", "path"=>"/usr/scripts"} should accept a single scriptaliases: matches
Failure/Error: should contain_file("25-#{title}.conf").with_content( match )
expected that the catalogue would contain File[25-rspec.example.com.conf] with content set to `" <Directory \"/usr/scripts\">"` but it is set to `"# ************************************\n# Vhost template in module puppetlabs-apache\n# Managed by Puppet\n# ************************************\n\n<VirtualHost *:84>\n ServerName rspec.example.com\n\n ## Vhost docroot\n DocumentRoot /rspec/docroot\n\n\n\n ## Directories, there should at least be a declaration for /rspec/docroot\n\n\n <Directory /rspec/docroot>\n Options Indexes FollowSymLinks MultiViews\n\n AllowOverride None\n Order allow,deny\n Allow from all\n </Directory>\n\n\n ## Load additional static includes\n\n\n ## Logging\n ErrorLog /var/log/apache2/rspec.example.com_error.log\n LogLevel warn\n ServerSignature Off\n CustomLog /var/log/apache2/rspec.example.com_access.log combined\n\n\n ## Script alias directives\n ScriptAlias /blah/ \"/usr/scripts/\"\n\n <Directory \"/usr/scripts\">\n AllowOverride None\n Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch\n Order allow,deny\n Allow from all\n </Directory>\n\n</VirtualHost>\n"` in the catalogue
# ./spec/defines/vhost_spec.rb:566:in `block (7 levels) in <top (required)>'
# ./spec/defines/vhost_spec.rb:565:in `each'
# ./spec/defines/vhost_spec.rb:565:in `block (6 levels) in <top (required)>'
4) apache::vhost os-independent items .conf content when scriptaliases is [{"alias"=>"/blah/", "path"=>"/usr/scripts"}, {"alias"=>"/blah2/", "path"=>"/usr/scripts"}] should accept multiple scriptaliases: matches
Failure/Error: should contain_file("25-#{title}.conf").with_content( match )
expected that the catalogue would contain File[25-rspec.example.com.conf] with content set to `" <Directory \"/usr/scripts\">"` but it is set to `"# ************************************\n# Vhost template in module puppetlabs-apache\n# Managed by Puppet\n# ************************************\n\n<VirtualHost *:84>\n ServerName rspec.example.com\n\n ## Vhost docroot\n DocumentRoot /rspec/docroot\n\n\n\n ## Directories, there should at least be a declaration for /rspec/docroot\n\n\n <Directory /rspec/docroot>\n Options Indexes FollowSymLinks MultiViews\n\n AllowOverride None\n Order allow,deny\n Allow from all\n </Directory>\n\n\n ## Load additional static includes\n\n\n ## Logging\n ErrorLog /var/log/apache2/rspec.example.com_error.log\n LogLevel warn\n ServerSignature Off\n CustomLog /var/log/apache2/rspec.example.com_access.log combined\n\n\n ## Script alias directives\n ScriptAlias /blah/ \"/usr/scripts/\"\n ## Script alias directives\n ScriptAlias /blah2/ \"/usr/scripts/\"\n\n <Directory \"/usr/scripts\">\n AllowOverride None\n Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch\n Order allow,deny\n Allow from all\n </Directory>\n\n</VirtualHost>\n"` in the catalogue
# ./spec/defines/vhost_spec.rb:566:in `block (7 levels) in <top (required)>'
# ./spec/defines/vhost_spec.rb:565:in `each'
# ./spec/defines/vhost_spec.rb:565:in `block (6 levels) in <top (required)>'
5) apache::vhost os-independent items .conf content when proxy_pass is {"path"=>"/path-a", "url"=>"http://fake.com/a/"} should accept proxy_pass hash: matches
Failure/Error: should contain_file("25-#{title}.conf").with_content( match )
expected that the catalogue would contain File[25-rspec.example.com.conf] with content matching `/^ ProxyPassReverse \/$/` but its value of `"# ************************************\n# Vhost template in module puppetlabs-apache\n# Managed by Puppet\n# ************************************\n\n<VirtualHost *:84>\n ServerName rspec.example.com\n\n ## Vhost docroot\n DocumentRoot /rspec/docroot\n\n\n\n ## Directories, there should at least be a declaration for /rspec/docroot\n\n\n <Directory /rspec/docroot>\n Options Indexes FollowSymLinks MultiViews\n\n AllowOverride None\n Order allow,deny\n Allow from all\n </Directory>\n\n\n ## Load additional static includes\n\n\n ## Logging\n ErrorLog /var/log/apache2/rspec.example.com_error.log\n LogLevel warn\n ServerSignature Off\n CustomLog /var/log/apache2/rspec.example.com_access.log combined\n\n ## Proxy rules\n ProxyRequests Off\n\n ProxyPass /path-a http://fake.com/a/\n <Location /path-a/>\n ProxyPassReverse /\n </Location>\n\n</VirtualHost>\n"` does not
# ./spec/defines/vhost_spec.rb:566:in `block (7 levels) in <top (required)>'
# ./spec/defines/vhost_spec.rb:565:in `each'
# ./spec/defines/vhost_spec.rb:565:in `block (6 levels) in <top (required)>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment