]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tests: shell functions toolbox dedicated to testing
authorLoic Dachary <ldachary@redhat.com>
Fri, 28 Nov 2014 15:22:22 +0000 (16:22 +0100)
committerLoic Dachary <ldachary@redhat.com>
Mon, 15 Dec 2014 10:22:23 +0000 (11:22 +0100)
commitaa54640841c2b0923eb6d475244265b5f4c2ccaf
tree17b615645fd1f2d309e443c7dd4e10bc4035253f
parenta58385a84877cadecb2933b56fcd1d198bd6ab0a
tests: shell functions toolbox dedicated to testing

The osd/osd-test-helpers.sh mon/mon-test-helpers.sh are useful to create
shell based functional tests. Since they were introduced they did not
grow significantly. As more tests are added, it becomes necessary to
have more sophisticated helpers. The ceph-helpers.sh toolbox is a merge
of the existing helpers intended to be easy to maintain and expand.

  * Each function is documented
  * Each function is tested

When adding to a function or looking for a new function, it is unlikely
the developer will find time to explore the entire file and understand
its structure. The documentation, body and test for each function are
grouped together to limit the scope of exploration required from the
casual developer.

The test are designed to not use internal helpers so that they can be
understood in full just by reading the test function. It means a given
test takes longer than it should (i.e. each getters tests run one mon).
In the context of testing this toolbox, simplicity is preferred over
efficiency.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/test/Makefile.am
src/test/ceph-helpers.sh [new file with mode: 0755]
src/test/test-ceph-helpers.sh [new file with mode: 0755]