puppet-nova/spec/classes/nova_compute_spice_spec.rb
Thomas Goirand 26fbc01f53 Fix VNC console in Debian
In Debian, SPICE is the default. Unfortunately, puppet-openstack fails to
set [spice]/enabled = false when VNC is selected, and therefore, both VNC
and SPICE ends up being enabled in nova.conf.

Also, Debian has a unique package nova-consoleproxy handling SPICE, VNC
and the XenVNC console, with /etc/default/nova-consoleproxy being used to
select what daemon to start. As puppet-openstack doesn't set it before
starting the VNC console service, it stays with spicehtml5 as default
value, and therefore, nova-novncproxy cannot start.

This patch fixes both issues.

Change-Id: Ia40805f27e8833fa01576432ae792e1becedd729
2018-06-05 23:35:06 +02:00

23 lines
927 B
Ruby

require 'spec_helper'
describe 'nova::compute::spice' do
it { is_expected.to contain_nova_config('spice/agent_enabled').with_value('true')}
it { is_expected.to contain_nova_config('spice/server_proxyclient_address').with_value('127.0.0.1')}
it { is_expected.to_not contain_nova_config('spice/html5proxy_base_url')}
it { is_expected.to contain_nova_config('spice/server_listen').with_value(nil)}
context 'when overriding params' do
let :params do
{
:proxy_host => '10.10.10.10',
:server_listen => '10.10.11.11',
:agent_enabled => false
}
end
it { is_expected.to contain_nova_config('spice/html5proxy_base_url').with_value('http://10.10.10.10:6082/spice_auto.html')}
it { is_expected.to contain_nova_config('spice/server_listen').with_value('10.10.11.11')}
it { is_expected.to contain_nova_config('spice/agent_enabled').with_value('false')}
end
end