#4 Add CI tests using the standard test interface
Closed 2 years ago by svashisht. Opened 2 years ago by psss.
rpms/ psss/bash tests  into  master

file added
+34

@@ -0,0 +1,34 @@ 

+ ---

+ 

+ # Tests that run in classic context

+ - hosts: localhost

+   roles:

+   - role: standard-test-beakerlib

+     tags:

+     - classic

+     repositories:

+     - repo: "https://src.fedoraproject.org/tests/shell.git"

+       dest: "shell"

+     tests:

+     - shell/func

+     - shell/login

+     - shell/smoke

+     required_packages:

+     - expect            # login requires expect

+     - which             # smoke requires which

+ 

+ # Tests that run in container and atomic contexts

Why there are different contexts for running shell tests ?

+ - hosts: localhost

+   roles:

+   - role: standard-test-beakerlib

+     tags:

+     - container

+     - atomic

+     repositories:

+     - repo: "https://src.fedoraproject.org/tests/shell.git"

+       dest: "shell"

+     tests:

+     - shell/func

+     - shell/smoke

+     required_packages:

+     - which             # smoke requires which

Adding initial set of basic functionality tests for bash according
to the CI wiki [1] and the Standard Test Interface [2]. Instead of
copying the test code this pull request links tests from the new shared
shell tests repo and fetches them using the "repositories" option [3].

[1] https://fedoraproject.org/wiki/CI
[2] https://fedoraproject.org/wiki/Changes/InvokingTests
[3] https://pagure.io/standard-test-roles/pull-request/101

Note that the "repositories" feature for fetching tests from remote repos is fresh and it can take some time until it gets into the standard-test-roles rpm.

Why there are different contexts for running shell tests ?

This is because installing additional packages on Atomic Host is not recommended in general (as it modifes the test subject) and in some cases (like that of expect) fails because of package version conflicts. Some more details about these issues are described in the documentation:

https://fedoraproject.org/wiki/CI/Tests#Testing_an_Atomic_Host

Pull-Request has been closed by svashisht

2 years ago