Skip to content

Commit

Permalink
Merge f9425f8 into 6570aa5
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszachy committed Nov 12, 2020
2 parents 6570aa5 + f9425f8 commit 646260a
Show file tree
Hide file tree
Showing 5 changed files with 1,020 additions and 15 deletions.
5 changes: 5 additions & 0 deletions docs/context.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. _context:

======================
Context
======================
32 changes: 17 additions & 15 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,29 @@
Let's have a look at a couple of real-life examples!


Relevancy
Context
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Test Case Relevancy can be naturaly integrated::
You can easily adjust attribute values based on the current
:ref:`context`, for example disable test if it's not relevant for
given environment::

description: Check basic download options
tags: [Tier2, TierSecurity]
relevancy:
- "distro < rhel-7: False"
- "arch = s390x: False"
enabled: true
adjust:
enabled: false
when: distro = centos
because: Not supported here

Note that, because of YAML parsing, relevancy rules have to be
enclosed in quotes. Another option is to use text format::
Note that this functionality reserves the following two attributes
for its usage:

description: Check basic download options
tags: [Tier2, TierSecurity]
relevancy: |
distro < rhel-7: False
arch = s390x: False
when
for listing context rules (required)
because
to store comment (optional)

Which seems a bit more clear.
Name of the attribute which contains rules to be evaluated can be
arbitrary. In the example the default key ``adjust`` is used.


Coverage
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Table of Contents
Overview <overview>
Concept <concept>
Features <features>
Context <context>
Examples <examples>
Modules <modules>
Contribute <contribute>
Expand Down

0 comments on commit 646260a

Please sign in to comment.