Seagate / cortx-hare

CORTX Hare configures Motr object store, starts/stops Motr services, and notifies Motr of service and device faults.
https://github.com/Seagate/cortx
Apache License 2.0
13 stars 80 forks source link

Problem: Mini-provisioning testes are broken after 'drives' related changes #2043

Closed SwapnilGaonkar7 closed 2 years ago

SwapnilGaonkar7 commented 2 years ago

Solution: Modified keys used in tests according to new drive related key structure.

Change in the key is as follows self.kv.kv_put(f'{hostname}/{disk_key}', drive_info) to self.kv.kv_put(f'{hostname}/drives/{disk_key}', drive_info)

Tests:

(.py3venv) [root@ssc-vm-g2-rhev4-2221 miniprov]# git push -f myrepo fix_tests
Everything up-to-date
(.py3venv) [root@ssc-vm-g2-rhev4-2221 miniprov]# python ./setup.py test
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing hare_mp.egg-info/PKG-INFO
writing dependency_links to hare_mp.egg-info/dependency_links.txt
writing entry points to hare_mp.egg-info/entry_points.txt
writing requirements to hare_mp.egg-info/requires.txt
writing top-level names to hare_mp.egg-info/top_level.txt
reading manifest file 'hare_mp.egg-info/SOURCES.txt'
writing manifest file 'hare_mp.egg-info/SOURCES.txt'
running build_ext
test_empty_source_results_empty (test.test_systemd.TestHaxUnitTrasform) ... ok
test_not_everything_commented (test.test_systemd.TestHaxUnitTrasform) ... ok
test_restart_commented (test.test_systemd.TestHaxUnitTrasform) ... ok
test_invalid_machine_id (test.test_validator.TestValidator) ... ok
test_is_cluster_first_node (test.test_validator.TestValidator) ... ok
test_allowed_failure_generation (test.test_cdf.TestCDF) ... ok
test_both_dix_and_sns_pools_can_exist (test.test_cdf.TestCDF) ... ok
test_disk_refs_can_be_empty (test.test_cdf.TestCDF) ... ok
test_dix_pool_uses_metadata_devices (test.test_cdf.TestCDF) ... ok
test_iface_type_can_be_null (test.test_cdf.TestCDF) ... ok
test_invalid_storage_set_configuration_rejected (test.test_cdf.TestCDF)
This test case checks whether exception will be raise if total ... ok
test_it_works (test.test_cdf.TestCDF) ... ok
test_md_pool_ignored (test.test_cdf.TestCDF) ... ok
test_metadata_is_hardcoded (test.test_cdf.TestCDF) ... ok
test_multiple_nodes_supported (test.test_cdf.TestCDF) ... ok
test_provided_values_respected (test.test_cdf.TestCDF) ... ok
test_template_sane (test.test_cdf.TestCDF) ... ok
test_disks_empty (test.test_cdf.TestTypes) ... ok
test_m0clients (test.test_cdf.TestTypes) ... ok
test_m0server_with_disks (test.test_cdf.TestTypes) ... ok
test_maybe_none (test.test_cdf.TestTypes) ... ok
test_pooldesc_empty (test.test_cdf.TestTypes) ... ok
test_protocol (test.test_cdf.TestTypes) ... ok

----------------------------------------------------------------------
Ran 23 tests in 0.357s

OK
mssawant commented 2 years ago

@SwapnilGaonkar7, kindly fix the commit message as, if there exists a ticket, kindly add a reference to the same,

mini-provisioning: unit tests are broken

Due to recent changes to consul kvs with respect to drives, corresponding
hare mini-provisioning tests are broken.
Change in the key is as follows
f'{hostname}/{disk_key}'
to
f'{hostname}/drives/{disk_key}'

Solution:
Modified keys used in tests according to new drive related key structure.

Signed-off-by: Swapnil Gaonkar <swapnil.gaonkar@seagate.com>