forked from TrueCloudLab/frostfs-testcases
[#370] Fix internal interface tests. Add APE rule for container
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
This commit is contained in:
parent
f8785fa299
commit
eedb915283
1 changed files with 11 additions and 13 deletions
|
@ -18,7 +18,7 @@ from frostfs_testlib.testing.parallel import parallel
|
|||
from frostfs_testlib.utils.failover_utils import wait_object_replication
|
||||
from frostfs_testlib.utils.file_utils import generate_file, get_file_hash
|
||||
|
||||
from ...helpers.container_request import PUBLIC_WITH_POLICY, REP_2_2_2_PUBLIC, requires_container
|
||||
from ...helpers.container_request import APE_EVERYONE_ALLOW_ALL, PUBLIC_WITH_POLICY, REP_2_2_2_PUBLIC, ContainerRequest, requires_container
|
||||
|
||||
logger = logging.getLogger("NeoLogger")
|
||||
STORAGE_NODE_COMMUNICATION_PORT = "8080"
|
||||
|
@ -354,6 +354,11 @@ class TestFailoverNetwork(ClusterTestBase):
|
|||
|
||||
@pytest.mark.interfaces
|
||||
@pytest.mark.failover_baremetal
|
||||
@pytest.mark.parametrize(
|
||||
"container_request",
|
||||
[ContainerRequest(f"REP %NODE_COUNT% IN X CBF 1 SELECT %NODE_COUNT% FROM * AS X", APE_EVERYONE_ALLOW_ALL)],
|
||||
indirect=True,
|
||||
)
|
||||
@pytest.mark.parametrize("interface", [Interfaces.INTERNAL_0, Interfaces.INTERNAL_1])
|
||||
@allure.title("Down internal interfaces to all nodes(interface={interface})")
|
||||
def test_down_internal_interface(
|
||||
|
@ -364,6 +369,7 @@ class TestFailoverNetwork(ClusterTestBase):
|
|||
simple_object_size: ObjectSize,
|
||||
restore_down_interfaces: None,
|
||||
interface: Interfaces,
|
||||
container: str,
|
||||
):
|
||||
cluster_nodes = self.cluster.cluster_nodes
|
||||
latest_block = {}
|
||||
|
@ -380,29 +386,21 @@ class TestFailoverNetwork(ClusterTestBase):
|
|||
with reporter.step("Tick 1 epoch and wait 2 block for sync all nodes"):
|
||||
self.tick_epochs(1, alive_node=cluster_nodes[0].storage_node, wait_block=2)
|
||||
|
||||
with reporter.step("Create container"):
|
||||
cid = create_container(
|
||||
wallet=default_wallet,
|
||||
shell=self.shell,
|
||||
endpoint=self.cluster.default_rpc_endpoint,
|
||||
rule="REP 4 CBF 1",
|
||||
)
|
||||
|
||||
with reporter.step(f"Put object, after down {interface}"):
|
||||
file_path = generate_file(simple_object_size.value)
|
||||
|
||||
oid = put_object(
|
||||
wallet=default_wallet,
|
||||
path=file_path,
|
||||
cid=cid,
|
||||
cid=container,
|
||||
shell=self.shell,
|
||||
endpoint=self.cluster.default_rpc_endpoint,
|
||||
)
|
||||
|
||||
with reporter.step("Get object"):
|
||||
file_get_path = get_object(
|
||||
get_object(
|
||||
wallet=default_wallet,
|
||||
cid=cid,
|
||||
cid=container,
|
||||
oid=oid,
|
||||
shell=self.shell,
|
||||
endpoint=self.cluster.default_rpc_endpoint,
|
||||
|
@ -415,7 +413,7 @@ class TestFailoverNetwork(ClusterTestBase):
|
|||
now_block[cluster_node] = neo_go_query_height(
|
||||
shell=cluster_node.host.get_shell(), endpoint=cluster_node.morph_chain.get_http_endpoint()
|
||||
)
|
||||
with reporter.step(f"Compare block"):
|
||||
with reporter.step("Compare block"):
|
||||
for cluster_node, items in now_block.items():
|
||||
with reporter.step(
|
||||
f"Node - {cluster_node.host_ip}, old block - {latest_block[cluster_node]['Latest block']}, "
|
||||
|
|
Loading…
Add table
Reference in a new issue