Merge "Add Puppet Litmus"

This commit is contained in:
Zuul 2020-09-17 02:38:26 +00:00 committed by Gerrit Code Review
commit e5c24002f6
14 changed files with 18 additions and 120 deletions

View File

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

View File

@ -16,12 +16,11 @@ openstacklib
4. [Usage - The usage of the openstacklib module](#usage) 4. [Usage - The usage of the openstacklib module](#usage)
5. [Implementation - An under-the-hood peek at what the module is doing](#implementation) 5. [Implementation - An under-the-hood peek at what the module is doing](#implementation)
6. [Limitations - OS compatibility, etc.](#limitations) 6. [Limitations - OS compatibility, etc.](#limitations)
7. [Beaker-Rspec - Beaker-rspec tests for the project](#beaker-rspec) 6. [Development - Guide for contributing to the module](#development)
8. [Development - Guide for contributing to the module](#development) 7. [Contributors - Those with commits](#contributors)
9. [Contributors - Those with commits](#contributors) 8. [Release Notes - Release notes for the project](#release-notes)
10. [Release Notes - Release notes for the project](#release-notes) 9. [Repository - The project source code repository](#repository)
11. [Repository - The project source code repository](#repository) 10. [Versioning - Notes on the version numbering scheme](#versioning)
12. [Versioning - Notes on the version numbering scheme](#versioning)
Overview 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 between openstacklib::db::postgresql resource and the database sync exec
resource. Relying on this behavior may cause errors. 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 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': } class { 'mysql::server': }
::openstacklib::db::mysql { 'beaker': ::openstacklib::db::mysql { 'ci':
password_hash => mysql::password('keystone'), password_hash => mysql::password('keystone'),
allowed_hosts => '127.0.0.1', allowed_hosts => '127.0.0.1',
} }
@ -25,9 +25,9 @@ describe 'openstacklib mysql' do
it { is_expected.to be_listening.with('tcp') } it { is_expected.to be_listening.with('tcp') }
end end
describe 'test database listing' do it 'should have ci database' do
it 'should list beaker database' do command("mysql -e 'show databases;' | grep -q ci") do |r|
expect(shell("mysql -e 'show databases;'|grep -q beaker").exit_code).to be_zero expect(r.exit_code).to eq 0
end end
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 # openstacklib resources
include openstacklib::openstackclient include openstacklib::openstackclient
::openstacklib::messaging::rabbitmq { 'beaker': ::openstacklib::messaging::rabbitmq { 'ci':
userid => 'beaker', userid => 'ci',
is_admin => true, is_admin => true,
} }
EOS EOS
@ -25,15 +25,15 @@ describe 'openstacklib class' do
end end
describe 'test rabbitmq resources' do describe 'test rabbitmq resources' do
it 'should list rabbitmq beaker resources' do it 'should list rabbitmq ci resources' do
shell('rabbitmqctl list_users') do |r| command('rabbitmqctl list_users') do |r|
expect(r.stdout).to match(/^beaker/) expect(r.stdout).to match(/^ci/)
expect(r.stdout).not_to match(/^guest/) expect(r.stdout).not_to match(/^guest/)
expect(r.exit_code).to eq(0) expect(r.exit_code).to eq(0)
end end
shell('rabbitmqctl list_permissions') do |r| command('rabbitmqctl list_permissions') do |r|
expect(r.stdout).to match(/^beaker\t\.\*\t\.\*\t\.\*$/) expect(r.stdout).to match(/^ci\t\.\*\t\.\*\t\.\*$/)
expect(r.exit_code).to eq(0) expect(r.exit_code).to eq(0)
end end
end end

View File

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