OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins as a part of the Git hosting and code review systems migration detailed in these mailing list posts: http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html Attempts have been made to correct repository namespaces and hostnames based on simple pattern matching, but it's possible some were updated incorrectly or missed entirely. Please reach out to us via the contact information listed at https://opendev.org/ with any questions you may have.
|1 month ago|
|debian||2 years ago|
|deployment||1 year ago|
|files||2 years ago|
|graphs||2 years ago|
|logs||3 years ago|
|specs||2 years ago|
|tests||2 years ago|
|utils||2 years ago|
|.gitignore||3 years ago|
|.gitreview||1 month ago|
|CHANGELOG||6 years ago|
|Gemfile||2 years ago|
|LICENSE||5 years ago|
|MAINTAINERS||2 years ago|
|README.md||2 years ago|
|Rakefile||2 years ago|
The fuel-library is collection of Puppet modules and related code used by Fuel to deploy OpenStack environments.
fuel-library ├── CHANGELOG ├── LICENSE ├── README.md ├── MAINTAINERS ├── debian ├── deployment ├── files ├── specs ├── tests └── utils
The root level contains important repository documentation and license information.
This is repository level MAINTAINERS file. One submitting a patch should contact the appropriate maintainer or invite her or him for the code review. Note, core reviewers are not the maintainers. Normally, cores do reviews after maintainers.
This folder contains the required information to create fuel-library debian packages.
This folder contains the fuel-library Puppet code, the Puppetfile for upstream modules, and scripts to manage modules with librarian-puppet-simple.
This folder contains scripts and configuration files that are used when creating the packages for fuel-library.
This folder contains our rpm spec file for fuel-library rpm packages.
This folder contains our testing scripts for the fuel-library.
This folder contains scripts that are useful when doing development on fuel-library.
In order to be able to pull in upstream modules for use by the fuel-library, the deployment folder contains a Puppetfile for use with librarian-puppet-simple. Upstream modules should be used whenever possible. For additional details on the process for working with upstream modules, please read the Fuel library for Puppet manifests of the Fuel wiki.
Testing is important for the fuel-library to ensure changes do what they are supposed to do, regressions are not introduced and all code is of the highest quality. The fuel-library leverages existing Puppet module rspec tests, bats tests for bash scripts and noop tests for testing the module deployment tasks in fuel-library.
The modules contained within fuel-library require that the module dependencies have been downloaded prior to running their spec tests. Their fixtures.yml have been updated to use relative links to the modules contained within the deployment/puppet/ folder. Because of this we have updated the rake tasks for the fuel-library root folder to include the ability to download the module dependencies as well as run all of the module unit tests with one command. You can run the following from the root of the fuel-library to run all module unit tests.
bundle install bundle exec rake spec
By default, running this command will only test the modules modified in the previous commit. To test all modules, please run:
bundle install bundle exec rake spec_all
If you only wish to download the module dependencies, you can run the following in the root of the fuel-library.
bundle install bundle exec rake spec_prep
If you wish to clean up the dependencies, you can run the following in the root of the fuel-library.
bundle install bundle exec rake spec_clean
Once you have downloaded the dependencies, you can also just work with a particular module using the usual ‘rake spec’ commands if you only want to run a single module’s unit tests. The upstream modules defined in the fuel-library Puppetfile are automatically excluded from rspec unit tests. To prevent non- upstream modules that live in fuel-library from being included in unit tests, add the name of the module to the utils/jenkins/modules.disable_rspec file.
From within the fuel-library root, you can run the following to perform the syntax checks for the files within fuel-library.
bundle install bundle exec rake syntax
This will run syntax checks against all puppet, python, shell and hiera files within fuel-library.
By default, Lint Checks will only test the modules modified in the previous commit. From within the fuel-library root, you can run the following commands:
bundle install bundle exec rake lint
To run lint on all of our puppet files you should use the following commands:
bundle install bundle exec rake lint_all
This will run puppet-lint against all of the modules within fuel-library but will skip checking the upstream module dependencies. The upstream module dependencies are skipped by having their name in the deployment/Puppetfile file, but also, additional modules could be defined in the util/jenkins/modules.disable_rake-lint file.
Puppet rspec tests should be provided for every module’s directory included.
All of the discovered tests will be automatically executed by the
rake spec command issued from the repository root path.
Shell scripts residing in the
./files directories should be
covered by the BATS test cases.
These should be put under the
./tests/bats path as well.
Here is an example bats tests
written for the UMM feature.
See also the bats how-to.
A framework for integration testing of composition layers comprising the modular tasks. For details, see the framework’s documentation.