From 231a3918c571a53d5b7d937bad91b6c20022ba8d Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 16 Jan 2025 19:08:22 +0800 Subject: [PATCH] test: add api endpoints - disperse_data - get_range --- src/node/api_clients/rest.py | 6 ++++++ tests/data_integrity/test_data_integrity.py | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/node/api_clients/rest.py b/src/node/api_clients/rest.py index a899d83..72a1ec2 100644 --- a/src/node/api_clients/rest.py +++ b/src/node/api_clients/rest.py @@ -23,3 +23,9 @@ class REST(BaseClient): def info(self): status_response = self.rest_call("get", "cryptarchia/info") return status_response.json() + + def disperse_data(self, dispersal_request): + return self.rest_call("post", "disperse-data", json.dumps(dispersal_request)) + + def get_range(self, app_id, data_range): + return self.rest_call("post", "da/get-range", json.dumps({app_id, data_range})) diff --git a/tests/data_integrity/test_data_integrity.py b/tests/data_integrity/test_data_integrity.py index 635559e..39b8056 100644 --- a/tests/data_integrity/test_data_integrity.py +++ b/tests/data_integrity/test_data_integrity.py @@ -1,6 +1,14 @@ class TestDataIntegrity: main_nodes = [] - def test_cluster_start(self): + def test_da_identify_retrieve_missing_columns(self): for node in self.main_nodes: print(node) + + def test_da_sampling_determines_data_presence(self): + for node in self.main_nodes: + print(node) + + # Disperse data + # Get data from range + # Compare