#24 Clarify usage of multiple playbooks
Merged 5 years ago by psss. Opened 5 years ago by psss.

@@ -51,7 +51,9 @@ 

  The following examples invoke tests against the same system that the package git repository is checked out on.

  Below there are further options for invoking tests against another fully formed and integrated systems, such as an Atomic Host or container image _test subject_.

  

- There may be more than one test present in a package git repository, but the file `tests.yml` is the main entry point.

+ There may be more than one test present in a package git repository.

+ Testing system will run each playbook matching the glob `tests/tests*.yml` separately in a clean environment.

+ Most often a single `tests.yml` file is used as the main entry point.

  To run it use the following command:

  

   ansible-playbook tests.yml

@@ -63,8 +63,9 @@ 

  tests:: list of tests to be executed (here we have just a single smoke test)

  required_packages:: list of rpm packages required for test execution

  

- There may by multiple files ending in `.yml` in the `tests/` subdirectory and each of them can represent a test or a part of a test.

- All of them need to be included in the main `tests.yml` file.

+ It is possible to separate tests into multiple playbooks, each of them can represent a test or a part of a test.

+ Testing system will run each playbook matching the glob `tests/tests*.yml` separately in a clean environment.

+ Optionally you can have multiple playbooks without the `tests` prefix and link them from the `tests.yml` file.

or you can have directly multiple plays in one of the tests*.yml file, if you want to run in the same environment ...

  Let's have a look at the https://src.fedoraproject.org/rpms/gzip/blob/master/f/tests[gzip] example:

  

   > fedpkg clone -a gzip

Standard Test Interface does not require tests.yml file as the main
entry point. Tests and STR pages updated to make this clear.

or you can have directly multiple plays in one of the tests*.yml file, if you want to run in the same environment ...

@mvadkert, this is mentioned also in the change (including an example):

Optionally you can have multiple playbooks without the `tests`
prefix and link them from the `tests.yml` file

Do you suggest to comment more on this?

Pull-Request has been merged by psss

5 years ago