File: nova_compute_serial_spec.rb

package info (click to toggle)
puppet-module-nova 25.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,100 kB
  • sloc: ruby: 11,433; python: 38; sh: 10; makefile: 10
file content (32 lines) | stat: -rw-r--r-- 998 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
require 'spec_helper'

describe 'nova::compute::serial' do
  shared_examples 'nova::compute::serial' do
    it { should contain_nova_config('serial_console/enabled').with_value('true') }
    it { should contain_nova_config('serial_console/port_range').with_value('10000:20000')}
    it { should contain_nova_config('serial_console/base_url').with_value('ws://127.0.0.1:6083/')}
    it { should contain_nova_config('serial_console/proxyclient_address').with_value('127.0.0.1')}

    context 'when overriding params' do
      let :params do
        {
          :proxyclient_address => '10.10.10.10',
        }
      end

      it { should contain_nova_config('serial_console/proxyclient_address').with_value('10.10.10.10')}
    end
  end

  on_supported_os({
    :supported_os => OSDefaults.get_supported_os
  }).each do |os,facts|
    context "on #{os}" do
      let (:facts) do
        facts.merge!(OSDefaults.get_facts())
      end

      it_behaves_like 'nova::compute::serial'
    end
  end
end