test: retrieve data from half of nodes

-
This commit is contained in:
Roman 2025-01-22 14:47:33 +08:00
parent 56a4f6ba5c
commit 4bc7c74d91
No known key found for this signature in database
GPG Key ID: B8FE070B54E11B75
2 changed files with 11 additions and 2 deletions

View File

@ -36,11 +36,11 @@ class StepsDataAvailability(StepsCommon):
assert "Bad Request" in str(ex) or "Internal Server Error" in str(ex)
@allure.step
def get_data_range(self, app_id, start, end):
def get_data_range(self, node, app_id, start, end):
response = []
query = prepare_get_range_request(app_id, start, end)
try:
response = self.node2.send_get_data_range_request(query)
response = node.send_get_data_range_request(query)
except Exception as ex:
assert "Bad Request" in str(ex) or "Internal Server Error" in str(ex)

View File

@ -13,6 +13,15 @@ class TestDataIntegrity(StepsDataAvailability):
@pytest.mark.usefixtures("setup_5_node_cluster")
def test_da_identify_retrieve_missing_columns(self):
self.disperse_data(DATA_TO_DISPERSE[0], [0] * 31 + [1], [0] * 8)
received_data = []
# Get data only from half of nodes
for node in self.main_nodes[2:4]:
received_data.append(self.get_data_range(node, [0] * 31 + [1], [0] * 8, [0] * 7 + [3]))
# Use received blob data to reconstruct the original data
# nomos-cli reconstruct command required
reconstructed_data = []
assert DATA_TO_DISPERSE[0] == bytes(reconstructed_data).decode("utf-8")
@pytest.mark.usefixtures("setup_2_node_cluster")
def test_da_sampling_determines_data_presence(self):