From 3e355e8ad98ec6a2a3f0a94efa9f680d1e107f8e Mon Sep 17 00:00:00 2001 From: Petr Šplíchal Date: Jun 12 2023 12:36:01 +0000 Subject: Move the `Share Test Code` section out of STI The concept of sharing test coverage is not limited to STI. Let's move it out of the STI section and mention the `tmt` way of enabling remote repositories as well. Move the `tmt` section up as it is now the default recommended way how to enable tests. Also fix typo in the `fedpkg` command used for creating new tests repositories. Fix https://pagure.io/fedora-ci/docs/issue/82 --- diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 648fd35..9f1a375 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -5,6 +5,8 @@ * Tests ** xref:generic_tests.adoc[Generic Tests] +** xref:tmt.adoc[tmt tests] +** xref:share-test-code.adoc[Share Test Code] ** STI tests *** xref:standard-test-interface.adoc[Standard Test Interface] @@ -13,9 +15,7 @@ *** xref:quick-start-guide.adoc[STI Quick Start Guide] *** xref:tests.adoc[Writing STI Tests] *** xref:examples.adoc[STI Examples] -*** xref:share-test-code.adoc[How to share Test Code] -** xref:tmt.adoc[tmt tests] * Infrastructure ** xref:jenkins.adoc[Jenkins] diff --git a/modules/ROOT/pages/share-test-code.adoc b/modules/ROOT/pages/share-test-code.adoc index 2ec2f19..a77e79e 100644 --- a/modules/ROOT/pages/share-test-code.adoc +++ b/modules/ROOT/pages/share-test-code.adoc @@ -27,6 +27,21 @@ Use `fedpkg` to quickly clone repositories from the tests namespace: fedpkg clone tests/shell +=== tmt === + +Enabling tests from a remote repository using xref:tmt.adoc[tmt] is straightforward: + +[source,yaml] +---- +discover: + how: fmf + url: https://src.fedoraproject.org/tests/shell.git +---- + +See the https://tmt.readthedocs.io/en/latest/spec/plans.html#fmf[discover] step documentation for more details. + +=== STI === + Some of the xref:standard-test-roles.adoc[Standard Test Roles] (currently basic and beakerlib) support fetching test code from remote repositories directly in their config in this way: [source,ansible] @@ -175,4 +190,4 @@ For example to create a shared test repository with the name foo, which will be * Request a new repository with a sensible decription - fedpkg --module-name foo request-tests-repo "Description of the foo repository" + fedpkg request-tests-repo foo "Description of the repository"