mirror of
https://github.com/logos-blockchain/logos-blockchain-e2e-tests.git
synced 2026-01-05 22:53:11 +00:00
test: retrieve data from half of nodes
-
This commit is contained in:
parent
56a4f6ba5c
commit
4bc7c74d91
@ -36,11 +36,11 @@ class StepsDataAvailability(StepsCommon):
|
|||||||
assert "Bad Request" in str(ex) or "Internal Server Error" in str(ex)
|
assert "Bad Request" in str(ex) or "Internal Server Error" in str(ex)
|
||||||
|
|
||||||
@allure.step
|
@allure.step
|
||||||
def get_data_range(self, app_id, start, end):
|
def get_data_range(self, node, app_id, start, end):
|
||||||
response = []
|
response = []
|
||||||
query = prepare_get_range_request(app_id, start, end)
|
query = prepare_get_range_request(app_id, start, end)
|
||||||
try:
|
try:
|
||||||
response = self.node2.send_get_data_range_request(query)
|
response = node.send_get_data_range_request(query)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
assert "Bad Request" in str(ex) or "Internal Server Error" in str(ex)
|
assert "Bad Request" in str(ex) or "Internal Server Error" in str(ex)
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,15 @@ class TestDataIntegrity(StepsDataAvailability):
|
|||||||
@pytest.mark.usefixtures("setup_5_node_cluster")
|
@pytest.mark.usefixtures("setup_5_node_cluster")
|
||||||
def test_da_identify_retrieve_missing_columns(self):
|
def test_da_identify_retrieve_missing_columns(self):
|
||||||
self.disperse_data(DATA_TO_DISPERSE[0], [0] * 31 + [1], [0] * 8)
|
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")
|
@pytest.mark.usefixtures("setup_2_node_cluster")
|
||||||
def test_da_sampling_determines_data_presence(self):
|
def test_da_sampling_determines_data_presence(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user