A repository containing some scripts and templates for testing.
During the past years, while-true-do.io opened and closed some repositories. Keeping track of common tests and test templates should be easy and maintainable .Re-testing existing repositories without touching each repository should be painless, too.
The scripts maintained in this repository should be considered as common test scenarios. You will find tests which can be run manually and automatically. The idea is, that you will be able to do the same tests on different OS, locally, remote or in a container.
You will find the following scripts in this repository.
- tl-ansible.sh - to test Ansible roles
- tl-bash.sh - to test bash scripts
- tl-compliance.sh - to test for while-true-do.io compliance
- tl-pykickstart.sh - to test kickstart files
- tl-spelling.sh - to test the spelling in files
If you want to write your own scripts, please consider reading the DEVELOPMENT.md.
The following templates are maintained in this repository.
- .aspell.en.pws - personal dictionary for tl-spelling.sh
- .travis.yml -template for automated tests in travis-ci
For the library itself, you do not need any special tools or software. The scripts may need additional tools, which can be installed with the 'prep' action. Please read the Usage section for some more details.
Install from Github
git clone https://github.com/while-true-do/test-library.git
All of the scripts will provide "actions". The most useful action will be the
help
action, which will provide information about the script and it's functionality.
Actions are parameter / arguments, which trigger the correct use case. An action can have additional options or can be used standalone.
# Using the help action
scripts/tl-SCRIPT.sh help
# Using the test action
scripts/tl-SCRIPT.sh test
# Using the help of an action
scripts/tl-SCRIPT.sh test --help
The most common actions are help
, test
and prep
. It is possible to
specify more for specific tasks like configurations, pulling updates, etc.
action | description | mandatory |
---|---|---|
help | Shows the help for a script. | yes |
test | Runs the tests. | yes |
prep | Preparations for tests. | no |
Most of the "generic" tests are located our Test Library. Tests and instructions for a single repository are located in the Test Directory.
Thank you so much for considering to contribute. We are very happy, when somebody is joining the hard work. Please fell free to open Bugs, Feature Requests or Pull Requests after reading the Contribution Guideline.
This work is licensed under a BSD-3-Clause License.
- Site https://while-true-do.io
- Twitter https://twitter.com/wtd_news
- Code https://github.com/while-true-do
- Mail hello@while-true-do.io
- IRC freenode, #while-true-do
- Telegram https://t.me/while_true_do