Merge "Drop description about beaker"

This commit is contained in:
Zuul 2024-03-26 11:21:47 +00:00 committed by Gerrit Code Review
commit df15f663ca
3 changed files with 5 additions and 65 deletions

View File

@ -45,23 +45,11 @@ OpenStack modules: The code that configures Jenkins jobs is hosted by
job is non-voting, please raise a bug in Launchpad to make sure someone
has a look and maybe update the module to work with latest version of
Puppet.
* - puppet-openstack-beaker-*N*-*platform*
- Beaker jobs to do functional testing. It will prepare the Puppet
environment on 2 different systems (CentOS and Ubuntu), run
Puppet to configure the module resources and run some tests with
serverspec.
- Yes
- Read the job logs. Sometimes, the job fails because of packaging issues
or mirrors downtime. Please report a bug for this so we can find
workarounds. Otherwise, make sure your patch is supposed to work with
current tests or you'll have to adapt the tests to change the expected
behavior. `More documentation about Beaker
<https://github.com/puppetlabs/beaker/wiki>`__
* - puppet-openstack-litmus-*N*-*platform*
- Litmus jobs to do functional testing. It will prepare the Puppet
environment on 2 different systems (CentOS and Ubuntu), run
Puppet to configure the module resources and run some tests with
serverspec. Litmus has replaced Beaker since Victoria release.
serverspec.
- Yes
- Read the job logs. Sometimes, the job fails because of packaging issues
or mirrors downtime. Please report a bug for this so we can find

View File

@ -9,12 +9,12 @@ Coding Style
- Read this page
- Make sure that what you're going to code is not already a work in
progress
- Make sure you're familiar with Puppet Syntax, Lint_, Rspec_ and Beaker_
- Make sure you're familiar with Puppet Syntax, Lint_, Rspec_ and Litmus_
- If you want to create a new module, read `New Module <new-module.html>`_.
.. _Lint: http://puppet-lint.com/
.. _Rspec: http://rspec-puppet.com/
.. _Beaker: https://github.com/puppetlabs/beaker
.. _Litmus: https://puppetlabs.github.io/litmus/
Best practices

View File

@ -90,53 +90,5 @@ The best reference for getting started with rspec-puppet can be found here_.
Functional Tests
================
We use beaker to run functional tests, the best reference for getting started
with beaker can be found `here <https://github.com/puppetlabs/beaker/wiki>`__.
Running beaker
--------------
.. code:: bash
#!/bin/bash
if [ -f /usr/bin/yum ]; then
sudo yum -y install libxml2-devel libxslt-devel ruby-devel
sudo yum -y groupinstall "Development Tools"
OS_TYPE='centos7'
elif [ -f /usr/bin/apt-get ]; then
sudo apt-get update
sudo apt-get install -y libxml2-dev libxslt-dev zlib1g-dev git ruby \
ruby-dev build-essential
OS_TYPE='trusty'
fi
echo "" | sudo tee -a /etc/ssh/sshd_config
echo "Match address 127.0.0.1" | sudo tee -a /etc/ssh/sshd_config
echo " PermitRootLogin without-password" | sudo tee -a \
/etc/ssh/sshd_config
echo "" | sudo tee -a /etc/ssh/sshd_config
echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config
echo " PermitRootLogin without-password" | sudo tee -a \
/etc/ssh/sshd_config
mkdir -p .ssh
ssh-keygen -f ~/.ssh/id_rsa -b 2048 -C "beaker key" -P ""
sudo mkdir -p /root/.ssh
sudo rm /root/.ssh/authorized_keys
cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys
if [ -f /usr/bin/yum ]; then
sudo systemctl restart sshd
elif [ -f /usr/bin/apt-get ]; then
sudo service ssh restart
fi
sudo gem install bundler --no-document --verbose
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
bundle install
export BEAKER_set=nodepool-$OS_TYPE
export BEAKER_debug=yes
bundle exec rspec spec/acceptance
|
The last command runs beaker tests by installing and testing the OpenStack
service.
We use litmus to run functional tests. See `the litmus documentation
<https://puppetlabs.github.io/litmus/>__` to find its details.