Add Puppet Litmus

Depends-On: https://review.opendev.org/#/c/751890/
Change-Id: Ia2973a8d37c3cef6255faf449d89121a60cecd10
This commit is contained in:
Tobias Urdin 2020-08-31 21:47:12 +02:00
parent c407f65071
commit 3702dd1314
14 changed files with 18 additions and 120 deletions

View File

@ -3,6 +3,6 @@
- puppet-openstack-check-jobs
- puppet-openstack-module-unit-jobs
- puppet-openstack-integration-jobs-all
- puppet-openstack-beaker-jobs
- puppet-openstack-litmus-jobs
- release-notes-jobs-python3
- tripleo-puppet-standalone

View File

@ -16,12 +16,11 @@ openstacklib
4. [Usage - The usage of the openstacklib module](#usage)
5. [Implementation - An under-the-hood peek at what the module is doing](#implementation)
6. [Limitations - OS compatibility, etc.](#limitations)
7. [Beaker-Rspec - Beaker-rspec tests for the project](#beaker-rspec)
8. [Development - Guide for contributing to the module](#development)
9. [Contributors - Those with commits](#contributors)
10. [Release Notes - Release notes for the project](#release-notes)
11. [Repository - The project source code repository](#repository)
12. [Versioning - Notes on the version numbering scheme](#versioning)
6. [Development - Guide for contributing to the module](#development)
7. [Contributors - Those with commits](#contributors)
8. [Release Notes - Release notes for the project](#release-notes)
9. [Repository - The project source code repository](#repository)
10. [Versioning - Notes on the version numbering scheme](#versioning)
Overview
--------
@ -297,18 +296,6 @@ handle database migrations, it is common to set up refresh relationships
between openstacklib::db::postgresql resource and the database sync exec
resource. Relying on this behavior may cause errors.
Beaker-Rspec
------------
This module has beaker-rspec tests
To run:
```shell
bundle install
bundle exec rspec spec/acceptance
```
Development
-----------

View File

@ -1,7 +0,0 @@
require 'spec_helper_acceptance'
describe 'Defaults manifest' do
context 'virtual_package' do
it_behaves_like 'puppet_apply_success_from_example', 'virtual_packages'
end
end

View File

@ -10,7 +10,7 @@ describe 'openstacklib mysql' do
class { 'mysql::server': }
::openstacklib::db::mysql { 'beaker':
::openstacklib::db::mysql { 'ci':
password_hash => mysql::password('keystone'),
allowed_hosts => '127.0.0.1',
}
@ -25,9 +25,9 @@ describe 'openstacklib mysql' do
it { is_expected.to be_listening.with('tcp') }
end
describe 'test database listing' do
it 'should list beaker database' do
expect(shell("mysql -e 'show databases;'|grep -q beaker").exit_code).to be_zero
it 'should have ci database' do
command("mysql -e 'show databases;' | grep -q ci") do |r|
expect(r.exit_code).to eq 0
end
end

View File

@ -1,11 +0,0 @@
HOSTS:
centos-server-70-x64:
roles:
- master
platform: el-7-x86_64
box: puppetlabs/centos-7.0-64-nocm
box_url: https://vagrantcloud.com/puppetlabs/centos-7.0-64-nocm
hypervisor: vagrant
CONFIG:
log_level: debug
type: foss

View File

@ -1,10 +0,0 @@
HOSTS:
ubuntu-server-14.04-amd64:
roles:
- master
platform: ubuntu-14.04-amd64
box: puppetlabs/ubuntu-14.04-64-nocm
box_url: https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm
hypervisor: vagrant
CONFIG:
type: foss

View File

@ -1,10 +0,0 @@
HOSTS:
ubuntu-18.04-amd64:
roles:
- master
platform: ubuntu-18.04-amd64
hypervisor: none
ip: 127.0.0.1
CONFIG:
type: foss
set_env: false

View File

@ -1,10 +0,0 @@
HOSTS:
centos-70-x64:
roles:
- master
platform: el-7-x86_64
hypervisor: none
ip: 127.0.0.1
CONFIG:
type: foss
set_env: false

View File

@ -1,10 +0,0 @@
HOSTS:
centos-80-x64:
roles:
- master
platform: el-8-x86_64
hypervisor: none
ip: 127.0.0.1
CONFIG:
type: foss
set_env: false

View File

@ -1,10 +0,0 @@
HOSTS:
ubuntu-14.04-amd64:
roles:
- master
platform: ubuntu-14.04-amd64
hypervisor: none
ip: 127.0.0.1
CONFIG:
type: foss
set_env: false

View File

@ -1,10 +0,0 @@
HOSTS:
ubuntu-16.04-amd64:
roles:
- master
platform: ubuntu-16.04-amd64
hypervisor: none
ip: 127.0.0.1
CONFIG:
type: foss
set_env: false

View File

@ -1,11 +0,0 @@
HOSTS:
ubuntu-server-14.04-amd64:
roles:
- master
platform: ubuntu-14.04-amd64
box: puppetlabs/ubuntu-14.04-64-nocm
box_url: https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm
hypervisor: vagrant
CONFIG:
log_level: debug
type: foss

View File

@ -13,8 +13,8 @@ describe 'openstacklib class' do
# openstacklib resources
include openstacklib::openstackclient
::openstacklib::messaging::rabbitmq { 'beaker':
userid => 'beaker',
::openstacklib::messaging::rabbitmq { 'ci':
userid => 'ci',
is_admin => true,
}
EOS
@ -25,15 +25,15 @@ describe 'openstacklib class' do
end
describe 'test rabbitmq resources' do
it 'should list rabbitmq beaker resources' do
shell('rabbitmqctl list_users') do |r|
expect(r.stdout).to match(/^beaker/)
it 'should list rabbitmq ci resources' do
command('rabbitmqctl list_users') do |r|
expect(r.stdout).to match(/^ci/)
expect(r.stdout).not_to match(/^guest/)
expect(r.exit_code).to eq(0)
end
shell('rabbitmqctl list_permissions') do |r|
expect(r.stdout).to match(/^beaker\t\.\*\t\.\*\t\.\*$/)
command('rabbitmqctl list_permissions') do |r|
expect(r.stdout).to match(/^ci\t\.\*\t\.\*\t\.\*$/)
expect(r.exit_code).to eq(0)
end
end

View File

@ -1 +1 @@
require 'puppet-openstack_spec_helper/beaker_spec_helper'
require 'puppet-openstack_spec_helper/litmus_spec_helper'