Debian Codegraph @

spec/classes/nova_compute_spice_spec.rb

raw
1 require 'spec_helper'
2
3 describe 'nova::compute::spice' do
4 shared_examples 'nova::compute::spice' do
5 context 'with default params' do
6 let :params do
7 {}
8 end
9
10 it { should contain_nova_config('spice/agent_enabled').with_value('true')}
11 it { should contain_nova_config('spice/server_proxyclient_address').with_value('<SERVICE DEFAULT>')}
12 it { should contain_nova_config('spice/html5proxy_base_url').with_value('<SERVICE DEFAULT>')}
13 it { should contain_nova_config('spice/server_listen').with_value('<SERVICE DEFAULT>')}
14 end
15
16 context 'when overriding params' do
17 let :params do
18 {
19 :proxy_host => '10.10.10.10',
20 :server_listen => '10.10.11.11',
21 :server_proxyclient_address => '192.168.12.12',
22 :agent_enabled => false
23 }
24 end
25
26 it { should contain_nova_config('spice/html5proxy_base_url').with_value('http://10.10.10.10:6082/spice_auto.html')}
27 it { should contain_nova_config('spice/server_listen').with_value('10.10.11.11')}
28 it { should contain_nova_config('spice/server_proxyclient_address').with_value('192.168.12.12')}
29 it { should contain_nova_config('spice/agent_enabled').with_value('false')}
30 end
31
32 context 'when setting html5proxy_base_url params' do
33 let :params do
34 {
35 :html5proxy_base_url => 'https://my.custom.url/test.html',
36 }
37 end
38
39 it { should contain_nova_config('spice/html5proxy_base_url').with_value('https://my.custom.url/test.html')}
40 end
41 end
42
43 on_supported_os({
44 :supported_os => OSDefaults.get_supported_os
45 }).each do |os,facts|
46 context "on #{os}" do
47 let (:facts) do
48 facts.merge!(OSDefaults.get_facts())
49 end
50
51 it_behaves_like 'nova::compute::spice'
52 end
53 end
54 end