diff --git a/src/cli/nomos_cli.py b/src/cli/nomos_cli.py index 064dcd8..87c1d25 100644 --- a/src/cli/nomos_cli.py +++ b/src/cli/nomos_cli.py @@ -70,10 +70,7 @@ class NomosCli: match self._command: case "reconstruct": - if "decode_only" in kwargs: - decode_only = kwargs["decode_only"] - else: - decode_only = False + decode_only = kwargs.get("decode_only", False) return self.reconstruct(input_values=input_values, decode_only=decode_only) case _: return diff --git a/src/docker_manager.py b/src/docker_manager.py index 3705c87..4f5fd8b 100644 --- a/src/docker_manager.py +++ b/src/docker_manager.py @@ -35,7 +35,11 @@ class DockerManager: logger.debug(f"Network {network_name} created") return network - def start_container(self, image_name, port_bindings, args, log_path, volumes, entrypoint, remove_container=True, name=None, command=None): + def start_container(self, image_name, port_bindings, args, log_path, volumes, entrypoint, **kwargs): + remove_container = kwargs.get("remove_container", True) + name = kwargs.get("name") + command = kwargs.get("command") + cli_args = [] if command is None: for key, value in args.items(): diff --git a/tests/data_integrity/test_data_integrity.py b/tests/data_integrity/test_data_integrity.py index cffefe2..9e5ed9c 100644 --- a/tests/data_integrity/test_data_integrity.py +++ b/tests/data_integrity/test_data_integrity.py @@ -18,7 +18,7 @@ class TestDataIntegrity(StepsDataAvailability): @pytest.mark.usefixtures("setup_4_node_cluster") def test_da_identify_retrieve_missing_columns(self): delay(5) - self.disperse_data(DATA_TO_DISPERSE[6], to_app_id(1), to_index(0)) + self.disperse_data(DATA_TO_DISPERSE[1], to_app_id(1), to_index(0)) delay(5) # Select one target node at random to get blob data for 1/2 columns selected_node = self.main_nodes[random.randint(1, 3)] @@ -27,16 +27,16 @@ class TestDataIntegrity(StepsDataAvailability): reconstructed_data = NomosCli(command="reconstruct").run(input_values=[rcv_data_json]) - assert DATA_TO_DISPERSE[6] == reconstructed_data, "Reconstructed data are not same with original data" + assert DATA_TO_DISPERSE[1] == reconstructed_data, "Reconstructed data are not same with original data" @pytest.mark.usefixtures("setup_2_node_cluster") def test_da_sampling_determines_data_presence(self): delay(5) - self.disperse_data(DATA_TO_DISPERSE[6], to_app_id(1), to_index(0)) + self.disperse_data(DATA_TO_DISPERSE[1], to_app_id(1), to_index(0)) delay(5) rcv_data = self.get_data_range(self.node2, to_app_id(1), to_index(0), to_index(5)) rcv_data_json = json.dumps(rcv_data) decoded_data = NomosCli(command="reconstruct").run(input_values=[rcv_data_json], decode_only=True) - assert DATA_TO_DISPERSE[6] == decoded_data, "Retrieved data are not same with original data" + assert DATA_TO_DISPERSE[1] == decoded_data, "Retrieved data are not same with original data"