Skip to content

Commit

Permalink
tests: adapt rest gw tests to update network info
Browse files Browse the repository at this point in the history
closes #882

Signed-off-by: Evgeniy Zayats <zayatsevgeniy@nspcc.io>
  • Loading branch information
Evgeniy Zayats committed Oct 28, 2024
1 parent 4a25bd2 commit 823deea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pytest_tests/lib/helpers/rest_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def get_epoch_duration_via_rest_gate(endpoint: str) -> int:
)

logger.info(f"Request: {request}")
_attach_allure_step(request, resp.status_code)
_attach_allure_step(request, resp.json())

epoch_duration = resp.json().get("epochDuration")
return epoch_duration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from helpers.neofs_verbs import get_netmap_netinfo, get_object_from_random_node, head_object
from helpers.rest_gate import (
attr_into_str_header,
get_epoch_duration_via_rest_gate,
try_to_get_object_and_expect_error,
upload_via_rest_gate,
)
Expand Down Expand Up @@ -251,6 +252,7 @@ def test_http_attr_priority_dur_timestamp(
):
self.tick_epochs_and_wait(1)
epoch_count = 2
get_epoch_duration_via_rest_gate(gw_endpoint)
expected_epoch = neofs_epoch.get_epoch(self.neofs_env) + epoch_count
logger.info(
f"epoch duration={epoch_duration}, current_epoch= {neofs_epoch.get_epoch(self.neofs_env)} expected_epoch {expected_epoch}"
Expand Down Expand Up @@ -307,6 +309,7 @@ def test_http_attr_priority_timestamp_rfc(
):
self.tick_epochs_and_wait(1)
epoch_count = 2
get_epoch_duration_via_rest_gate(gw_endpoint)
expected_epoch = neofs_epoch.get_epoch(self.neofs_env) + epoch_count
logger.info(
f"epoch duration={epoch_duration}, current_epoch= {neofs_epoch.get_epoch(self.neofs_env)} expected_epoch {expected_epoch}"
Expand Down Expand Up @@ -363,6 +366,7 @@ def test_http_rfc_object_unavailable_after_expir(
):
self.tick_epochs_and_wait(1)
epoch_count = 2
get_epoch_duration_via_rest_gate(gw_endpoint)
expected_epoch = neofs_epoch.get_epoch(self.neofs_env) + epoch_count
logger.info(
f"epoch duration={epoch_duration}, current_epoch= {neofs_epoch.get_epoch(self.neofs_env)} expected_epoch {expected_epoch}"
Expand Down

0 comments on commit 823deea

Please sign in to comment.