From f50494d7bedf43c04f807505a640c033688d81a0 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Mon, 17 Apr 2017 15:39:27 -0400 Subject: [PATCH] docs: conventions for test layouts Signed-off-by: Alfredo Deza --- docs/source/testing/layout.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/source/testing/layout.rst b/docs/source/testing/layout.rst index 7f7d7874d..0f4155b45 100644 --- a/docs/source/testing/layout.rst +++ b/docs/source/testing/layout.rst @@ -32,6 +32,22 @@ At the very least, a scenario will need these files: Conventions ----------- +Python test files (unlike scenarios) rely on paths to *map* where they belong. For +example, a file that should only test monitor nodes would live in +``ceph-ansible/tests/functional/tests/mon/``. Internally, the test runner +(``py.test``) will *mark* these as tests that should run on a monitor only. +Since the configuration of a scenario already defines what node has a given +role, then it is easier for the system to only run tests that belong to +a particular node type. + +The current convention is a bit manual, with initial path support for: + +* mon +* osd +* mds +* rgw +* journal_collocation +* all/any (if none of the above are matched, then these are run on any host) .. _testinfra: