Fixes #37761 - use ProxyPass and upgrade=websocket where possible #1661
Annotations
10 errors
Run tests:
spec/classes/foreman_config_apache_spec.rb#L20
foreman::config::apache on almalinux-9-x86_64 should include apache with modules
Failure/Error: should contain_class('apache::mod::proxy_wstunnel')
expected that the catalogue would contain Class[apache::mod::proxy_wstunnel]
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L41
foreman::config::apache on almalinux-9-x86_64 configures the HTTP vhost
Failure/Error:
should contain_apache__vhost('foreman')
.with_ip(nil)
.with_servername(facts[:fqdn])
.with_serveraliases([])
.with_add_default_charset('UTF-8')
.with_docroot('/usr/share/foreman/public')
.with_priority('05')
.with_options(['SymLinksIfOwnerMatch'])
.with_port(80)
.with_custom_fragment(%r{^<LocationMatch "\^/\(assets\|webpack\)">$})
expected that the catalogue would contain Apache::Vhost[foreman] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}, and parameter rewrites set to [{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}] but it is set to []
Diff:
@@ -1,4 +1,2 @@
-{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
-
-{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}
+{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L107
foreman::config::apache on almalinux-9-x86_64 with $apache::default_mods set to false includes apache modules
Failure/Error: should contain_class('apache::mod::proxy_wstunnel')
expected that the catalogue would contain Class[apache::mod::proxy_wstunnel]
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L150
foreman::config::apache on almalinux-9-x86_64 with asset proxying enabled is expected to contain Apache::Vhost[foreman] with proxy_pass => {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
Failure/Error:
it { should contain_apache__vhost('foreman')
.with_proxy_pass(
"no_proxy_uris" => ['/pulp', '/pub', '/icons', '/images', '/server-status'],
"path" => '/',
"url" => 'unix:///run/foreman.sock|http://foreman/',
"params" => { "retry" => '0' },
)
}
expected that the catalogue would contain Apache::Vhost[foreman] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L178
foreman::config::apache on almalinux-9-x86_64 with ssl should include a https vhost
Failure/Error:
should contain_apache__vhost('foreman-ssl')
.with_ip(nil)
.with_servername(facts[:fqdn])
.with_serveraliases([])
.with_add_default_charset('UTF-8')
.with_docroot('/usr/share/foreman/public')
.with_priority('05')
.with_options(['SymLinksIfOwnerMatch'])
.with_port(443)
.with_ssl(true)
expected that the catalogue would contain Apache::Vhost[foreman-ssl] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}, and parameter rewrites set to [{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}] but it is set to []
Diff:
@@ -1,4 +1,2 @@
-{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
-
-{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}
+{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L20
foreman::config::apache on centos-9-x86_64 should include apache with modules
Failure/Error: should contain_class('apache::mod::proxy_wstunnel')
expected that the catalogue would contain Class[apache::mod::proxy_wstunnel]
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L41
foreman::config::apache on centos-9-x86_64 configures the HTTP vhost
Failure/Error:
should contain_apache__vhost('foreman')
.with_ip(nil)
.with_servername(facts[:fqdn])
.with_serveraliases([])
.with_add_default_charset('UTF-8')
.with_docroot('/usr/share/foreman/public')
.with_priority('05')
.with_options(['SymLinksIfOwnerMatch'])
.with_port(80)
.with_custom_fragment(%r{^<LocationMatch "\^/\(assets\|webpack\)">$})
expected that the catalogue would contain Apache::Vhost[foreman] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}, and parameter rewrites set to [{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}] but it is set to []
Diff:
@@ -1,4 +1,2 @@
-{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
-
-{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}
+{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L107
foreman::config::apache on centos-9-x86_64 with $apache::default_mods set to false includes apache modules
Failure/Error: should contain_class('apache::mod::proxy_wstunnel')
expected that the catalogue would contain Class[apache::mod::proxy_wstunnel]
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L150
foreman::config::apache on centos-9-x86_64 with asset proxying enabled is expected to contain Apache::Vhost[foreman] with proxy_pass => {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
Failure/Error:
it { should contain_apache__vhost('foreman')
.with_proxy_pass(
"no_proxy_uris" => ['/pulp', '/pub', '/icons', '/images', '/server-status'],
"path" => '/',
"url" => 'unix:///run/foreman.sock|http://foreman/',
"params" => { "retry" => '0' },
)
}
expected that the catalogue would contain Apache::Vhost[foreman] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L178
foreman::config::apache on centos-9-x86_64 with ssl should include a https vhost
Failure/Error:
should contain_apache__vhost('foreman-ssl')
.with_ip(nil)
.with_servername(facts[:fqdn])
.with_serveraliases([])
.with_add_default_charset('UTF-8')
.with_docroot('/usr/share/foreman/public')
.with_priority('05')
.with_options(['SymLinksIfOwnerMatch'])
.with_port(443)
.with_ssl(true)
expected that the catalogue would contain Apache::Vhost[foreman-ssl] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}, and parameter rewrites set to [{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}] but it is set to []
Diff:
@@ -1,4 +1,2 @@
-{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
-
-{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}
+{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Loading