rgw-admin: Adds --metadata-key option to help
Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
Merge pull request #587 from kri5/master

rgw-admin: Adds --metadata-key option to help

Reviwed-by: Yehuda Sadeh <yehuda@inktank.com>
autotools: group test scripts in check_SCRIPTS

The check_SCRIPTS is added in Makefile-env.am to list the tests that do
not require compilation. The scripts listed in check-local and in the
TESTS variable use check_SCRIPTS instead.

The PYTHONPATH environment variable is added to Makefile-env.am and
includes the pybind directory so that python unit tests can load the
libraries from sources.

http://tracker.ceph.com/issues/6274 refs #6274

Signed-off-by: Loic Dachary <loic@dachary.org>
mon: convenience function to convert commands to json

The get_command_descriptions is added to Monitor.h and contains
the code previously inlined in Monitor::handle_command to implement
the get_command_descriptions command. It is intended for tests to
convert command descriptions into json, including error cases.

http://tracker.ceph.com/issues/6274 refs #6274

Signed-off-by: Loic Dachary <loic@dachary.org>
mon: minimal test for get_command_descriptions

The get_command_descriptions is not designed to be tested in C++ because
all the validation happens in ceph_argparse.py. Each test function calls
get_command_descriptions exactly once and does a trivial check on the
generated output. It does not really do more that code coverage.

With --debug-mon=20 each test function is expected to write the json
string to the standard output. The unit test can then be used as a
helper by other tests to generate various degenerated cases for test
purposes.

For instance:

  unittest_get_command_descriptions --gtest_filter=*.pull585 \
      --debug-mon=20

will generate a bogus json replicating the problem which was fixed
by https://github.com/ceph/ceph/pull/585

http://tracker.ceph.com/issues/6274 refs #6274

Signed-off-by: Loic Dachary <loic@dachary.org>
pybind: unit tests for ceph_argparse::parse_json_funcsigs

Run parse_json_funcsigs against the builtin commands found
in mon/MonCommands.h. Although it does not provide for a full
validation, it will detect some degenerate cases.

It is expected to raise if a space is missing at the end of an option
specification ( see https://github.com/ceph/ceph/pull/585 ) and this
case is tested. New tests of the same kind can be added whenever an
undetected error is found. Ideally a validation function is implemented
and it would be updated ( with an associated test ) when a new
pathological cases is found.

The json string given to parse_json_funcsigs is obtained from
designated functions in unittest_get_command_descriptions.

The python-nose dependencies are added to the build requirements in
debian/control and ceph.spec.in because make check should always be run
at built time.

http://tracker.ceph.com/issues/6274 refs #6274

Signed-off-by: Loic Dachary <loic@dachary.org>