swift/test/unit/cli
Paul Dardeau 7f4139bc26 Added unit tests for ringbuilder command-line utility
Added new unit tests:

test_add_device_old_missing_region
test_create_ring_number_of_arguments
test_add_duplicate_devices
test_rebalance_with_seed
test_set_overload_number_of_arguments
test_main_no_arguments
test_main_single_argument
test_main_with_safe

Modified existing unit tests to create sample ring at start of test.
This change was needed to have unit tests run correctly and demonstrate
code coverage.

test_unknown
test_search_device_number_of_arguments
test_list_parts_number_of_arguments
test_set_weight_number_of_arguments
test_set_info_number_of_arguments
test_remove_device_number_of_arguments
test_set_min_part_hours_number_of_arguments
test_set_replicas_number_of_arguments
test_set_replicas_invalid_value

Updates to handled nested mocks.
Updates to handle no exception case when SystemExit is expected.
PEP8 corrections.

Moved new tests from try blocks to use of assertRaises or call to
run_srb using exp_results with specified exit codes.

Updated run_srb to accept a dictionary of expected results. Specifically,
look for 'valid_exit_codes' to test, default to (0,1).

Change-Id: I4cf3f5f055a9babba140c68a9c7ff90b9c50ea62
2015-11-11 15:09:40 +00:00
..
__init__.py Add some tests for bin/swift-recon 2014-01-31 15:34:37 +00:00
test_form_signature.py Get StringIO and cStringIO from six.moves 2015-07-15 16:56:33 +02:00
test_info.py Add unit tests to cover print_item_locations 2015-11-05 20:58:34 +00:00
test_recon.py Get rid of contextlib.nested() for py3 2015-10-23 11:44:54 -07:00
test_ring_builder_analyzer.py Validate against duplicate device part replica assignment 2015-10-02 16:42:25 -07:00
test_ringbuilder.py Added unit tests for ringbuilder command-line utility 2015-11-11 15:09:40 +00:00