mirror of
https://github.com/logos-co/nomos-e2e-tests.git
synced 2025-02-24 04:08:08 +00:00
fix: find executor node
- use oneliner for volumes
This commit is contained in:
parent
ca1686a9fb
commit
56a4f6ba5c
@ -29,6 +29,7 @@ class NomosNode:
|
|||||||
self._internal_ports = nomos_nodes[node_type]["ports"]
|
self._internal_ports = nomos_nodes[node_type]["ports"]
|
||||||
self._volumes = nomos_nodes[node_type]["volumes"]
|
self._volumes = nomos_nodes[node_type]["volumes"]
|
||||||
self._entrypoint = nomos_nodes[node_type]["entrypoint"]
|
self._entrypoint = nomos_nodes[node_type]["entrypoint"]
|
||||||
|
self._node_type = node_type
|
||||||
|
|
||||||
self._log_path = os.path.join(DOCKER_LOG_DIR, f"{container_name}__{self._image_name.replace('/', '_')}.log")
|
self._log_path = os.path.join(DOCKER_LOG_DIR, f"{container_name}__{self._image_name.replace('/', '_')}.log")
|
||||||
self._docker_manager = DockerManager(self._image_name)
|
self._docker_manager = DockerManager(self._image_name)
|
||||||
@ -36,12 +37,8 @@ class NomosNode:
|
|||||||
self._container = None
|
self._container = None
|
||||||
|
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
updated_volumes = []
|
self._volumes = [cwd + "/" + volume for volume in self._volumes]
|
||||||
for i, volume in enumerate(self._volumes):
|
|
||||||
updated_volumes.append(cwd + "/" + volume)
|
|
||||||
self._volumes = updated_volumes
|
|
||||||
|
|
||||||
logger.debug(f"NomosNode instance initialized with volumes {self._volumes}")
|
|
||||||
logger.debug(f"NomosNode instance initialized with log path {self._log_path}")
|
logger.debug(f"NomosNode instance initialized with log path {self._log_path}")
|
||||||
|
|
||||||
@retry(stop=stop_after_delay(60), wait=wait_fixed(0.1), reraise=True)
|
@retry(stop=stop_after_delay(60), wait=wait_fixed(0.1), reraise=True)
|
||||||
@ -139,6 +136,9 @@ class NomosNode:
|
|||||||
def info(self):
|
def info(self):
|
||||||
return self._api.info()
|
return self._api.info()
|
||||||
|
|
||||||
|
def node_type(self):
|
||||||
|
return self._node_type
|
||||||
|
|
||||||
def check_nomos_log_errors(self, whitelist=None):
|
def check_nomos_log_errors(self, whitelist=None):
|
||||||
keywords = LOG_ERROR_KEYWORDS
|
keywords = LOG_ERROR_KEYWORDS
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ import json
|
|||||||
|
|
||||||
import allure
|
import allure
|
||||||
|
|
||||||
|
from src.env_vars import NOMOS_EXECUTOR
|
||||||
from src.steps.common import StepsCommon
|
from src.steps.common import StepsCommon
|
||||||
|
|
||||||
|
|
||||||
@ -18,11 +19,19 @@ def prepare_get_range_request(app_id, start_index, end_index):
|
|||||||
|
|
||||||
class StepsDataAvailability(StepsCommon):
|
class StepsDataAvailability(StepsCommon):
|
||||||
|
|
||||||
|
def find_executor_node(self):
|
||||||
|
executor = {}
|
||||||
|
for node in self.main_nodes:
|
||||||
|
if node.node_type() == NOMOS_EXECUTOR:
|
||||||
|
executor = node
|
||||||
|
return executor
|
||||||
|
|
||||||
@allure.step
|
@allure.step
|
||||||
def disperse_data(self, data, app_id, index):
|
def disperse_data(self, data, app_id, index):
|
||||||
request = prepare_dispersal_request(data, app_id, index)
|
request = prepare_dispersal_request(data, app_id, index)
|
||||||
|
executor = self.find_executor_node()
|
||||||
try:
|
try:
|
||||||
self.node3.send_dispersal_request(request)
|
executor.send_dispersal_request(request)
|
||||||
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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user