Skip to content

Commit b028574

Browse files
committed
fix: add data extraction and decoding
1 parent a56dbfc commit b028574

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/steps/da.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,16 @@ def disperse_data(self, data, app_id, index):
2626

2727
@allure.step
2828
def get_data_range(self, app_id, start, end):
29+
response = []
2930
query = prepare_get_range_request(app_id, start, end)
3031
try:
31-
self.node2.send_get_data_range_request(query)
32+
response = self.node2.send_get_data_range_request(query)
3233
except Exception as ex:
3334
assert "Bad Request" in str(ex) or "Internal Server Error" in str(ex)
35+
36+
# Extract data for each index in received order
37+
extracted_data = []
38+
for item in response:
39+
extracted_data.append(item[1])
40+
41+
return extracted_data

tests/data_integrity/test_data_integrity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ def test_da_identify_retrieve_missing_columns(self):
1515
def test_da_sampling_determines_data_presence(self):
1616
self.disperse_data(DATA_TO_DISPERSE[0], [0] * 31 + [1], [0] * 8)
1717
received_data = self.get_data_range([0] * 31 + [1], [0] * 8, [0] * 7 + [5])
18-
assert DATA_TO_DISPERSE[0] == received_data
18+
assert DATA_TO_DISPERSE[0] == received_data[0].decode("utf-8")

0 commit comments

Comments
 (0)