File: basic_congress_spec.rb

package info (click to toggle)
puppet-module-congress 16.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 508 kB
  • sloc: ruby: 1,265; python: 36; sh: 15; makefile: 11
file content (61 lines) | stat: -rw-r--r-- 1,774 bytes parent folder | download
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
require 'spec_helper_acceptance'

describe 'basic congress' do

  context 'default parameters' do

    it 'should work with no errors' do
      pp= <<-EOS
      include openstack_integration
      include openstack_integration::repos
      include openstack_integration::rabbitmq
      include openstack_integration::mysql
      include openstack_integration::keystone

      rabbitmq_user { 'congress':
        admin    => true,
        password => 'an_even_bigger_secret',
        provider => 'rabbitmqctl',
        require  => Class['rabbitmq'],
      }
      rabbitmq_user_permissions { 'congress@/':
        configure_permission => '.*',
        write_permission     => '.*',
        read_permission      => '.*',
        provider             => 'rabbitmqctl',
        require              => Class['rabbitmq'],
      }
      # Congress resources
      class { 'congress::logging':
        debug => true,
      }
      class { 'congress':
        default_transport_url => 'rabbit://congress:an_even_bigger_secret@127.0.0.1/',
      }
      class { 'congress::keystone::auth':
        password => 'a_big_secret',
      }
      class { 'congress::db::mysql':
        password => 'a_big_secret',
      }
      class { 'congress::db':
        database_connection => 'mysql+pymysql://congress:a_big_secret@127.0.0.1/congress?charset=utf8',
      }
      class { 'congress::keystone::authtoken':
        password => 'a_big_secret',
      }
      class { 'congress::server': }
      class { 'congress::client': }
      EOS


      # Run it twice to test for idempotency
      apply_manifest(pp, :catch_failures => true)
      apply_manifest(pp, :catch_changes => true)
    end

    describe port(1789) do
      it { is_expected.to be_listening.with('tcp') }
    end
  end
end