English Spanish
Examples Ejemplos
On this page you can find some inspiration from real-life examples of tests already enabled in the Fedora CI. En esta página usted pueden encontrar inspiración de ejemplos de la vida real de pruebas ya habilitadas en Fedora CI.
did did
For each component it makes sense to enable even the most simple test such as running the binary with `--help` or using an internal smoke test. Here's an example from the https://src.fedoraproject.org/rpms/did/pull-request/5[did] component: Para cada componente tiene sentido habilitar incluso la prueba más simple como ejecutar el binario con `--help` o usar una prueba de humo interna. Aquí hay un ejemplo para el componente [did] https://src.fedoraproject.org/rpms/did/pull-request/5:
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- smoke:
dir: .
run: did this year --test
required_packages:
- did
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- smoke:
dir: .
run: did this year --test
required_packages:
- did
That's it. As you see above, executing a single command as a test is very easy with the help of the xref:standard-test-roles.adoc#_basic[Basic] role. Eso es. Como se ve arriba, ejecutar un sencillo comando como prueba es muy fácil con la ayuda de la función xref:standard-test-roles.adoc#_basic[Basic].
Python Python
There are multiple versions of Python programming language available in Fedora and a number of related subpackages. As all of them should be tested (including their various combinatios) we xref:share-test-code.adoc[share] test coverage for them in the `tests` namespace: Hay múltiples versiones del lenguaje de programación Python disponibles en Fedora y en diversos subpaquetes relacionados. Como todos ellos deben ser probados (incluyendo sus diversas combinaciones) nosotros xref:share-test-code.adoc[share] probamos la cobertura de ellas en el espacio de nombre `tests`:
https://src.fedoraproject.org/tests/python[Python tests] https://src.fedoraproject.org/tests/python[Python tests]
The test repo contains basic smoke test for virtualenv together with example test https://pagure.io/fedora-ci/metadata[Metadata] stored in the https://fedoraproject.org/wiki/Flexible_Metadata_Format[Flexible Metadata Format]: El repositorio de pruebas contiene pruebas de humo básicas para entornos virtuales junto con pruebas de ejemplo https://pagure.io/fedora-ci/metadata[Metadata] almacenado en https://fedoraproject.org/wiki/Flexible_Metadata_Format[Flexible Metadata Format]:
https://src.fedoraproject.org/tests/python/blob/main/f/main.fmf[main.fmf] https://src.fedoraproject.org/tests/python/blob/master/f/main.fmf[main.fmf]
https://src.fedoraproject.org/tests/python/blob/main/f/smoke/venv.fmf[venv.fmf] https://src.fedoraproject.org/tests/python/blob/master/f/smoke/venv.fmf[venv.fmf]
Once the test is avaible in the share test repository it can be easily linked from supported Python versions: Una vez está disponible la prueba en el repositorio de pruebas compartido es fácilmente enlazable desde las versiones Python soportadas:
https://src.fedoraproject.org/rpms/python2.7/blob/rawhide/f/tests/tests.yml[python2.7] https://src.fedoraproject.org/rpms/python-pip/blob/master/f/tests/tests.yml[python-pip]
https://src.fedoraproject.org/rpms/python3.6/blob/rawhide/f/tests/tests.yml[python3.6], https://src.fedoraproject.org/rpms/python3.7/blob/rawhide/f/tests/tests.yml[python3.7], https://src.fedoraproject.org/rpms/python3.8/blob/rawhide/f/tests/tests.yml[python3.8], https://src.fedoraproject.org/rpms/python3.9/blob/rawhide/f/tests/tests.yml[python3.9], https://src.fedoraproject.org/rpms/python3.10/blob/rawhide/f/tests/tests.yml[python3.10], https://src.fedoraproject.org/rpms/python3.11/blob/rawhide/f/tests/tests.yml[python3.11] https://src.fedoraproject.org/rpms/python3/blob/master/f/tests/tests.yml[python3], https://src.fedoraproject.org/rpms/python34/blob/master/f/tests/tests.yml[python34], https://src.fedoraproject.org/rpms/python35/blob/master/f/tests/tests.yml[python35], https://src.fedoraproject.org/rpms/python36/blob/master/f/tests/tests.yml[python36]
We test additional Python implementations as well: Probamos también implementaciones Python adicionales:
https://src.fedoraproject.org/rpms/pypy/blob/rawhide/f/tests/tests.yml[pypy], https://src.fedoraproject.org/rpms/pypy3.7/blob/rawhide/f/tests/tests.yml[pypy3.7] https://src.fedoraproject.org/rpms/pypy/blob/master/f/tests/tests.yml[pypy], https://src.fedoraproject.org/rpms/pypy3/blob/master/f/tests/tests.yml[pypy3]
Plus we ensure that essential tools for venv and virtualnv, such as `setuptools`, `pip` or `virtualenv` itself correctly work with all supported versions: Además nos aseguramos que herramientas esenciales para venv y virtualnv, como `setuptools`, `pip` o `virtualenv` trabajen correctamente con todas las versiones soportadas:
https://src.fedoraproject.org/rpms/python-pip/blob/rawhide/f/tests/tests.yml[python-pip] https://src.fedoraproject.org/rpms/python-pip/blob/master/f/tests/tests.yml[python-pip]
https://src.fedoraproject.org/rpms/python-wheel/blob/rawhide/f/tests/tests.yml[python-wheel] https://src.fedoraproject.org/rpms/python-wheel/blob/master/f/tests/tests.yml[python-wheel]