diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 42bbdaa7f..34a0bd682 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -36,9 +36,9 @@ jobs: neofs_other_expiration_period: ${{ vars.OTHER_EXPIRATION_PERIOD }} neofs_testcases_commit: ${{ inputs.neofs_testcases_ref }} tests_parallel_level: 3 + neofs_s3_gw_commit: 'ec' + neofs_node_commit: 'bugfix/ec-forwarding' + tests_path: 'pytest_tests/tests/s3' os: > - [{"runner": "ubuntu-latest", "binary": "linux-amd64"}, - {"runner": "macos-14", "binary": "darwin-arm64", "shard": 0}, - {"runner": "macos-14", "binary": "darwin-arm64", "shard": 1}, - {"runner": "macos-14", "binary": "darwin-arm64", "shard": 2}] + [{"runner": "ubuntu-latest", "binary": "linux-amd64"}] secrets: inherit diff --git a/neofs-testlib/neofs_testlib/env/env.py b/neofs-testlib/neofs_testlib/env/env.py index 6d19f2060..9d78ef1fc 100644 --- a/neofs-testlib/neofs_testlib/env/env.py +++ b/neofs-testlib/neofs_testlib/env/env.py @@ -171,13 +171,14 @@ def generate_neo_go_config(self, wallet: NodeWallet): return neo_go_config_path @allure.step("Deploy inner ring nodes") - def deploy_inner_ring_nodes(self, count=1, with_main_chain=False, chain_meta_data=False, sn_validator_url=None): + def deploy_inner_ring_nodes(self, count=1, with_main_chain=False, chain_meta_data=False, sn_validator_url=None, allow_ec=True): for _ in range(count): new_inner_ring_node = InnerRing( self, len(self.inner_ring_nodes) + 1, chain_meta_data=chain_meta_data, sn_validator_url=sn_validator_url, + allow_ec=allow_ec ) new_inner_ring_node.generate_network_config() self.inner_ring_nodes.append(new_inner_ring_node) @@ -664,6 +665,7 @@ def deploy( request=None, chain_meta_data=False, sn_validator_url=None, + allow_ec=True, fschain_endpoints: Optional[list[str]] = None, shards_count=2, gc_remover_batch_size=200, @@ -680,6 +682,7 @@ def deploy( with_main_chain=with_main_chain, chain_meta_data=chain_meta_data, sn_validator_url=sn_validator_url, + allow_ec=allow_ec ) if storage_nodes_count: @@ -1057,6 +1060,7 @@ def __init__( ir_number: int, chain_meta_data=False, sn_validator_url=None, + allow_ec=True, ): self.neofs_env = neofs_env self.ir_number = ir_number @@ -1082,6 +1086,7 @@ def __init__( self.prometheus_address = f"{self.neofs_env.domain}:{NeoFSEnv.get_available_port()}" self.ir_state_file = self.neofs_env._generate_temp_file(self.inner_ring_dir, prefix="ir_state_file") self.chain_meta_data = chain_meta_data + self.allow_ec = allow_ec self.sn_validator_url = sn_validator_url self.stdout = "Not initialized" self.stderr = "Not initialized" @@ -1178,6 +1183,7 @@ def start( prometheus_address=self.prometheus_address, chain_meta_data=self.chain_meta_data, sn_validator_url=self.sn_validator_url, + allow_ec=self.allow_ec, ) logger.info(f"Launching Inner Ring Node:{self}") self._launch_process() diff --git a/neofs-testlib/neofs_testlib/env/templates/ir.yaml b/neofs-testlib/neofs_testlib/env/templates/ir.yaml index ca02f181a..e13c0e99e 100644 --- a/neofs-testlib/neofs_testlib/env/templates/ir.yaml +++ b/neofs-testlib/neofs_testlib/env/templates/ir.yaml @@ -125,6 +125,7 @@ prometheus: experimental: chain_meta_data: {{ chain_meta_data }} + allow_ec: {{ allow_ec }} {% if sn_validator_url %} sn_validator: diff --git a/neofs-testlib/neofs_testlib/env/templates/s3.yaml b/neofs-testlib/neofs_testlib/env/templates/s3.yaml index 99da3a791..9b17f4ec0 100644 --- a/neofs-testlib/neofs_testlib/env/templates/s3.yaml +++ b/neofs-testlib/neofs_testlib/env/templates/s3.yaml @@ -55,7 +55,7 @@ prometheus: placement_policy: locations: - rep-2: "REP 2" - select: "REP 1 IN X CBF 1 SELECT 1 FROM * AS X" + rep-2: "EC 3/1" + select: "EC 3/1" internal_slicer: {{ internal_slicer }} diff --git a/neofs-testlib/neofs_testlib_tests/pytest/container_policy.json b/neofs-testlib/neofs_testlib_tests/pytest/container_policy.json index 937b9c215..402884ff6 100644 --- a/neofs-testlib/neofs_testlib_tests/pytest/container_policy.json +++ b/neofs-testlib/neofs_testlib_tests/pytest/container_policy.json @@ -1,3 +1,3 @@ { - "rep-1": "REP 1" + "rep-1": "EC 2/2" } \ No newline at end of file diff --git a/neofs-testlib/neofs_testlib_tests/pytest/test_env.py b/neofs-testlib/neofs_testlib_tests/pytest/test_env.py index 022bcc18c..735e9602d 100644 --- a/neofs-testlib/neofs_testlib_tests/pytest/test_env.py +++ b/neofs-testlib/neofs_testlib_tests/pytest/test_env.py @@ -56,7 +56,7 @@ def s3_creds(neofs_env: NeoFSEnv, zero_fee, wallet: NodeWallet) -> tuple: f"{neofs_env.neofs_s3_authmate_path} --debug --with-log --timeout 1m " f"issue-secret --wallet {wallet.path} --gate-public-key={gate_public_key} " f"--peer {neofs_env.storage_nodes[0].endpoint} --container-friendly-name {bucket} " - f"--bearer-rules {s3_bearer_rules} --container-placement-policy 'REP 1' " + f"--bearer-rules {s3_bearer_rules} --container-placement-policy 'EC 2/2' " f"--container-policy container_policy.json" ) output = _run_with_passwd(cmd, wallet.password) @@ -143,7 +143,7 @@ def test_gateways_put_get(neofs_env: NeoFSEnv, wallet: NodeWallet, zero_fee, gw_ result = cli.container.create( rpc_endpoint=neofs_env.sn_rpc, wallet=wallet.path, - policy="REP 1 IN X CBF 1 SELECT 1 FROM * AS X", + policy="EC 2/2 IN X CBF 1 SELECT 1 FROM * AS X", basic_acl="0FBFBFFF", await_mode=True, ) diff --git a/peapod-to-fstree b/peapod-to-fstree new file mode 100755 index 000000000..1adf2545b Binary files /dev/null and b/peapod-to-fstree differ diff --git a/pytest_tests/data/container_policy.json b/pytest_tests/data/container_policy.json index dac24fa45..d3c064e63 100644 --- a/pytest_tests/data/container_policy.json +++ b/pytest_tests/data/container_policy.json @@ -1,5 +1,5 @@ { - "rep-1": "REP 1", - "rep-3": "REP 3", - "complex": "REP 1 IN X CBF 1 SELECT 1 FROM * AS X" + "rep-1": "EC 1/1", + "rep-3": "EC 3/1", + "complex": "EC 2/2" } diff --git a/pytest_tests/data/policy.json b/pytest_tests/data/policy.json index 11a69839b..b6cbaa676 100644 --- a/pytest_tests/data/policy.json +++ b/pytest_tests/data/policy.json @@ -1,4 +1,4 @@ { - "rep-3": "REP 3", - "complex": "REP 1 IN X CBF 1 SELECT 1 FROM * AS X" + "rep-3": "EC 3/1", + "complex": "EC 3/1" } \ No newline at end of file diff --git a/pytest_tests/lib/helpers/container.py b/pytest_tests/lib/helpers/container.py index 19305fe70..09ae00c7d 100644 --- a/pytest_tests/lib/helpers/container.py +++ b/pytest_tests/lib/helpers/container.py @@ -18,7 +18,7 @@ logger = logging.getLogger("NeoLogger") DEFAULT_PLACEMENT_RULE = "REP 2 IN X CBF 1 SELECT 4 FROM * AS X" -SINGLE_PLACEMENT_RULE = "REP 1 IN X CBF 1 SELECT 4 FROM * AS X" +SINGLE_PLACEMENT_RULE = "EC 2/2 IN X CBF 1 SELECT 4 FROM * AS X" REP_2_FOR_3_NODES_PLACEMENT_RULE = "REP 2 IN X CBF 1 SELECT 3 FROM * AS X" diff --git a/pytest_tests/lib/helpers/utility.py b/pytest_tests/lib/helpers/utility.py index ca7c73aa2..54a8b2a2d 100644 --- a/pytest_tests/lib/helpers/utility.py +++ b/pytest_tests/lib/helpers/utility.py @@ -63,7 +63,7 @@ def placement_policy_from_container(container_info: str) -> str: attribute: Timestamp=1656340345 (2022-06-27 17:32:25 +0300 MSK) nonce: 1c511e88-efd7-4004-8dbf-14391a5d375a placement policy: - REP 1 IN LOC_PLACE + EC 2/2 IN LOC_PLACE CBF 1 SELECT 1 FROM LOC_SW AS LOC_PLACE FILTER Country EQ Sweden AS LOC_SW diff --git a/pytest_tests/lib/s3/s3_base.py b/pytest_tests/lib/s3/s3_base.py index 0b9f42454..3565ee7b1 100644 --- a/pytest_tests/lib/s3/s3_base.py +++ b/pytest_tests/lib/s3/s3_base.py @@ -153,7 +153,7 @@ def init_s3_credentials( f"{neofs_env.neofs_s3_authmate_path} --debug --with-log --timeout 1m " f"issue-secret --wallet {wallet.path} --gate-public-key={gate_public_key} " f"--peer {neofs_env.storage_nodes[0].endpoint} --container-friendly-name {bucket} " - f"--bearer-rules {s3_bearer_rules} --container-placement-policy 'REP 1' " + f"--bearer-rules {s3_bearer_rules} --container-placement-policy 'EC 2/2' " f"--container-policy {policy}" ) diff --git a/pytest_tests/tests/conftest.py b/pytest_tests/tests/conftest.py index 507616fc1..0b1338c44 100644 --- a/pytest_tests/tests/conftest.py +++ b/pytest_tests/tests/conftest.py @@ -38,6 +38,7 @@ def get_or_create_neofs_env( with_rest_gw=True, chain_meta_data=False, sn_validator_url=None, + allow_ec=True, shards_count=2, gc_remover_batch_size=200, gc_sleep_interval=STORAGE_GC_TIME, @@ -56,6 +57,7 @@ def get_or_create_neofs_env( request=request, chain_meta_data=chain_meta_data, sn_validator_url=sn_validator_url, + allow_ec=allow_ec, shards_count=shards_count, gc_remover_batch_size=gc_remover_batch_size, gc_sleep_interval=gc_sleep_interval, @@ -88,6 +90,13 @@ def neofs_env_chain_meta_data(temp_directory, artifacts_directory, request): neofs_env = get_or_create_neofs_env(request, with_s3_gw=False, with_rest_gw=False, chain_meta_data=True) yield neofs_env neofs_env.finalize(request) + + +@pytest.fixture(scope="function") +def neofs_env_ec(temp_directory, artifacts_directory, request): + neofs_env = get_or_create_neofs_env(request, with_s3_gw=False, with_rest_gw=False, allow_ec=True) + yield neofs_env + neofs_env.finalize(request) @pytest.fixture() diff --git a/pytest_tests/tests/container/test_container.py b/pytest_tests/tests/container/test_container.py index 4e5713f42..171549b10 100644 --- a/pytest_tests/tests/container/test_container.py +++ b/pytest_tests/tests/container/test_container.py @@ -13,13 +13,15 @@ ) from helpers.file_helper import generate_file from helpers.grpc_responses import CONTAINER_DELETION_TIMED_OUT, NOT_CONTAINER_OWNER -from helpers.neofs_verbs import get_object, put_object_to_random_node +from helpers.neofs_verbs import get_object, put_object_to_random_node, head_object from helpers.node_management import wait_all_storage_nodes_returned from helpers.utility import placement_policy_from_container from helpers.wellknown_acl import PRIVATE_ACL_F, PUBLIC_ACL from neofs_env.neofs_env_test_base import TestNeofsBase from neofs_testlib.env.env import NeoFSEnv, NodeWallet, StorageNode +import logging +logger = logging.getLogger("NeoLogger") def object_should_be_gc_marked(neofs_env: NeoFSEnv, node: StorageNode, cid: str, oid: str): response = neofs_env.neofs_cli(node.cli_config).control.object_status( @@ -86,6 +88,69 @@ def test_container_creation(self, default_wallet, name): delete_container(wallet.path, cid, shell=self.shell, endpoint=self.neofs_env.sn_rpc) self.tick_epochs_and_wait(1) wait_for_container_deletion(wallet.path, cid, shell=self.shell, endpoint=self.neofs_env.sn_rpc) + + @pytest.mark.sanity + @allure.title("User can create container with EC policy") + def test_ec_container_creation(self, default_wallet): + wallet = default_wallet + + placement_rule = "EC 2/2" + cid = create_container( + wallet.path, + rule=placement_rule, + name="ec-container", + shell=self.shell, + endpoint=self.neofs_env.sn_rpc, + ) + + containers = list_containers(wallet.path, shell=self.shell, endpoint=self.neofs_env.sn_rpc) + assert cid in containers, f"Expected container {cid} in containers: {containers}" + + container_info: str = get_container( + wallet.path, + cid, + json_mode=False, + shell=self.shell, + endpoint=self.neofs_env.sn_rpc, + ) + container_info = container_info.casefold() + logger.info(f"Container info: {container_info=}") + + source_file_path = generate_file(self.neofs_env.get_object_size("simple_object_size")) + + oid = put_object_to_random_node( + wallet.path, source_file_path, cid, shell=self.shell, neofs_env=self.neofs_env + ) + + get_object( + default_wallet.path, + cid, + oid, + self.neofs_env.shell, + self.neofs_env.sn_rpc, + ) + + head_object( + default_wallet.path, + cid, + oid, + self.neofs_env.shell, + self.neofs_env.sn_rpc, + ) + + node_info = ( + self.neofs_env.neofs_cli(self.neofs_env.storage_nodes[0].cli_config) + .netmap.nodeinfo( + rpc_endpoint=self.neofs_env.sn_rpc, + wallet=self.neofs_env.storage_nodes[0].wallet.path, + ) + .stdout.strip() + ) + + # with allure.step("Delete container and check it was deleted"): + # delete_container(wallet.path, cid, shell=self.shell, endpoint=self.neofs_env.sn_rpc) + # self.tick_epochs_and_wait(1) + # wait_for_container_deletion(wallet.path, cid, shell=self.shell, endpoint=self.neofs_env.sn_rpc) @allure.title("Not owner and not trusted party can NOT delete container") def test_only_owner_can_delete_container(self, not_owner_wallet: NodeWallet, default_wallet: str): diff --git a/pytest_tests/tests/metrics/test_sn_metrics.py b/pytest_tests/tests/metrics/test_sn_metrics.py index bd61b4630..632a61690 100644 --- a/pytest_tests/tests/metrics/test_sn_metrics.py +++ b/pytest_tests/tests/metrics/test_sn_metrics.py @@ -62,7 +62,7 @@ def test_sn_ir_metrics(neofs_env_single_sn: NeoFSEnv, default_wallet: NodeWallet ir = neofs_env_single_sn.inner_ring_nodes[0] cid = create_container( - default_wallet.path, shell=neofs_env_single_sn.shell, endpoint=neofs_env_single_sn.sn_rpc, rule="REP 1" + default_wallet.path, shell=neofs_env_single_sn.shell, endpoint=neofs_env_single_sn.sn_rpc, rule="EC 2/2" ) file_path = generate_file(simple_object_size) @@ -390,7 +390,7 @@ def test_rest_gw_metrics(neofs_env_single_sn: NeoFSEnv, default_wallet: NodeWall cid = create_container_rest_gw( gw_endpoint, "rest_gw_container", - "REP 1", + "EC 2/2", PUBLIC_ACL, session_token, signature, diff --git a/pytest_tests/tests/network/test_deployment.py b/pytest_tests/tests/network/test_deployment.py index 3c13a524c..7ca948eda 100644 --- a/pytest_tests/tests/network/test_deployment.py +++ b/pytest_tests/tests/network/test_deployment.py @@ -180,7 +180,7 @@ def test_4_ir_node_deployment_with_main_chain(neofs_env_4_ir_with_mainchain: Neo new_wallet = create_wallet_with_money(neofs_env) cid = create_container( new_wallet.path, - rule="REP 1", + rule="EC 2/2", shell=neofs_env.shell, endpoint=neofs_env.sn_rpc, ) @@ -200,7 +200,7 @@ def test_7_ir_node_deployment_with_main_chain(neofs_env_7_ir_with_mainchain: Neo new_wallet = create_wallet_with_money(neofs_env) cid = create_container( new_wallet.path, - rule="REP 1", + rule="EC 2/2", shell=neofs_env.shell, endpoint=neofs_env.sn_rpc, ) diff --git a/pytest_tests/tests/network/test_node_management.py b/pytest_tests/tests/network/test_node_management.py index c9024bedb..41cfcb616 100644 --- a/pytest_tests/tests/network/test_node_management.py +++ b/pytest_tests/tests/network/test_node_management.py @@ -46,7 +46,7 @@ def create_container_and_pick_node( self, neofs_env: NeoFSEnv, default_wallet: NodeWallet ) -> Tuple[str, StorageNode]: file_path = generate_file(neofs_env.get_object_size("simple_object_size")) - placement_rule = "REP 1 IN X CBF 1 SELECT 1 FROM * AS X" + placement_rule = "EC 2/2 IN X CBF 1 SELECT 1 FROM * AS X" endpoint = neofs_env.sn_rpc cid = create_container( @@ -194,8 +194,8 @@ def test_add_nodes( ("REP 2 IN X CBF 2 SELECT 2 FROM * AS X", 2), ("REP 2 IN X CBF 1 SELECT 2 FROM * AS X", 2), ("REP 3 IN X CBF 1 SELECT 3 FROM * AS X", 3), - ("REP 1 IN X CBF 1 SELECT 1 FROM * AS X", 1), - ("REP 1 IN X CBF 2 SELECT 1 FROM * AS X", 1), + ("EC 2/2 IN X CBF 1 SELECT 1 FROM * AS X", 1), + ("EC 2/2 IN X CBF 2 SELECT 1 FROM * AS X", 1), ("REP 4 IN X CBF 1 SELECT 4 FROM * AS X", 4), ("REP 2 IN X CBF 1 SELECT 4 FROM * AS X", 2), ], @@ -215,17 +215,17 @@ def test_placement_policy(self, default_wallet, placement_rule, expected_copies) [ ("REP 4 IN X CBF 1 SELECT 4 FROM * AS X", 4, {1, 2, 3, 4}), ( - "REP 1 IN LOC_PLACE CBF 1 SELECT 1 FROM LOC_SW AS LOC_PLACE FILTER Country EQ Sweden AS LOC_SW", + "EC 2/2 IN LOC_PLACE CBF 1 SELECT 1 FROM LOC_SW AS LOC_PLACE FILTER Country EQ Sweden AS LOC_SW", 1, {3}, ), ( - "REP 1 CBF 1 SELECT 1 FROM LOC_SPB FILTER 'UN-LOCODE' EQ 'RU LED' AS LOC_SPB", + "EC 2/2 CBF 1 SELECT 1 FROM LOC_SPB FILTER 'UN-LOCODE' EQ 'RU LED' AS LOC_SPB", 1, {2}, ), ( - "REP 1 IN LOC_SPB_PLACE REP 1 IN LOC_MSK_PLACE CBF 1 SELECT 1 FROM LOC_SPB AS LOC_SPB_PLACE " + "EC 2/2 IN LOC_SPB_PLACE EC 2/2 IN LOC_MSK_PLACE CBF 1 SELECT 1 FROM LOC_SPB AS LOC_SPB_PLACE " "SELECT 1 FROM LOC_MSK AS LOC_MSK_PLACE " "FILTER 'UN-LOCODE' EQ 'RU LED' AS LOC_SPB FILTER 'UN-LOCODE' EQ 'RU MOW' AS LOC_MSK", 2, @@ -237,7 +237,7 @@ def test_placement_policy(self, default_wallet, placement_rule, expected_copies) {1, 2, 3, 4}, ), ( - "REP 1 CBF 1 SELECT 1 FROM LOC_SPB " + "EC 2/2 CBF 1 SELECT 1 FROM LOC_SPB " "FILTER 'UN-LOCODE' NE 'RU MOW' AND 'UN-LOCODE' NE 'SE STO' AND 'UN-LOCODE' NE 'FI HEL' AS LOC_SPB", 1, {2}, diff --git a/pytest_tests/tests/object/test_object_lock.py b/pytest_tests/tests/object/test_object_lock.py index 7bd875b85..1baa37b71 100755 --- a/pytest_tests/tests/object/test_object_lock.py +++ b/pytest_tests/tests/object/test_object_lock.py @@ -714,7 +714,7 @@ def test_locked_object_removal_from_not_owner_node(self, default_wallet: NodeWal wallet.path, shell=self.shell, endpoint=self.neofs_env.sn_rpc, - rule="REP 1 CBF 1", + rule="EC 2/2 CBF 1", basic_acl=PUBLIC_ACL, ) diff --git a/pytest_tests/tests/object/test_object_put_grpc.py b/pytest_tests/tests/object/test_object_put_grpc.py index b1b4c6dcc..6c4289f60 100644 --- a/pytest_tests/tests/object/test_object_put_grpc.py +++ b/pytest_tests/tests/object/test_object_put_grpc.py @@ -15,7 +15,7 @@ def test_put_storage_group_object_no_longer_supported(default_wallet: NodeWallet default_wallet.path, shell=neofs_env_single_sn.shell, endpoint=neofs_env_single_sn.sn_rpc, - rule="REP 1", + rule="EC 2/2", ) with allure.step("Try to put a storage group object via grpc"): response = put_object( @@ -32,7 +32,7 @@ def test_put_tombstone_object_without_delete_permission( default_wallet.path, shell=neofs_env_single_sn.shell, endpoint=neofs_env_single_sn.sn_rpc, - rule="REP 1", + rule="EC 2/2", basic_acl=ALLOW_ALL_OPERATIONS_EXCEPT_DELETE, ) @@ -81,7 +81,7 @@ def test_put_object_without_homo_hash(default_wallet: NodeWallet, neofs_env_sing default_wallet.path, shell=neofs_env_single_sn.shell, endpoint=neofs_env_single_sn.sn_rpc, - rule="REP 1", + rule="EC 2/2", ) with allure.step("Try to put an object via grpc without homo hash"): @@ -104,7 +104,7 @@ def test_put_object_without_homo_hash(default_wallet: NodeWallet, neofs_env_sing default_wallet.path, shell=neofs_env_single_sn.shell, endpoint=neofs_env_single_sn.sn_rpc, - rule="REP 1", + rule="EC 2/2", ) with allure.step("Try to put an object via grpc without homo hash"): diff --git a/pytest_tests/tests/object/test_object_revival.py b/pytest_tests/tests/object/test_object_revival.py index a223eb9ac..160bebe61 100644 --- a/pytest_tests/tests/object/test_object_revival.py +++ b/pytest_tests/tests/object/test_object_revival.py @@ -16,7 +16,7 @@ def test_object_revival(neofs_env_single_sn_custom_gc: NeoFSEnv, default_wallet: neofs_env = neofs_env_single_sn_custom_gc wallet = default_wallet - cid = create_container(wallet.path, neofs_env.shell, neofs_env.sn_rpc, rule="REP 1") + cid = create_container(wallet.path, neofs_env.shell, neofs_env.sn_rpc, rule="EC 2/2") created_objects = [] for _ in range(2): diff --git a/pytest_tests/tests/object/test_object_searchv2.py b/pytest_tests/tests/object/test_object_searchv2.py index bc6da4981..a0fd547e2 100644 --- a/pytest_tests/tests/object/test_object_searchv2.py +++ b/pytest_tests/tests/object/test_object_searchv2.py @@ -917,7 +917,7 @@ def test_split_object_boundaries( default_wallet.path, shell=neofs_env.shell, endpoint=neofs_env.sn_rpc, - rule="REP 1", + rule="EC 2/2", ) file_path = generate_file(object_size) put_object_to_random_node( @@ -1789,7 +1789,7 @@ def test_searchv2_meta_enabled_containers( default_wallet.path, shell=neofs_env.shell, endpoint=neofs_env.sn_rpc, - rule="REP 1 CBF 4", + rule="EC 2/2 CBF 4", attributes={"__NEOFS__METAINFO_CONSISTENCY": meta_info_consistency}, ) diff --git a/pytest_tests/tests/quota/test_container_quota.py b/pytest_tests/tests/quota/test_container_quota.py index 2144f5f57..bc566d9e8 100644 --- a/pytest_tests/tests/quota/test_container_quota.py +++ b/pytest_tests/tests/quota/test_container_quota.py @@ -15,7 +15,7 @@ class TestContainerQuota(TestQuotaBase): @pytest.mark.parametrize("quota_type,quota_value", [("hard", 100), ("soft", 100)]) @pytest.mark.sanity def test_container_quota(self, default_wallet: NodeWallet, quota_type: str, quota_value: int): - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid = create_container( default_wallet.path, rule=placement_rule, @@ -73,7 +73,7 @@ def test_container_quota(self, default_wallet: NodeWallet, quota_type: str, quot @pytest.mark.parametrize("quota_type,quota_value", [("hard", 200), ("soft", 200)]) def test_container_quota_multiple_objects(self, default_wallet: NodeWallet, quota_type: str, quota_value: int): - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid = create_container( default_wallet.path, rule=placement_rule, @@ -161,7 +161,7 @@ def test_multiple_containers_quota_isolation( self, default_wallet: NodeWallet, quota_type1: str, quota_type2: str, quota_value: int ): """Test that quotas are enforced per container and don't affect each other.""" - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid1 = create_container( default_wallet.path, @@ -281,7 +281,7 @@ def test_multiple_containers_quota_isolation( def test_container_quota_update( self, default_wallet: NodeWallet, quota_type: str, initial_quota: int, updated_quota: int ): - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid = create_container( default_wallet.path, rule=placement_rule, @@ -391,7 +391,7 @@ def test_container_quota_update( def test_container_object_delete_and_quota_reclaim( self, default_wallet: NodeWallet, quota_type: str, quota_value: int ): - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid = create_container( default_wallet.path, rule=placement_rule, @@ -520,7 +520,7 @@ def test_container_object_delete_and_quota_reclaim( def test_container_object_lifetime_and_quota_reclaim( self, default_wallet: NodeWallet, quota_type: str, quota_value: int ): - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid = create_container( default_wallet.path, rule=placement_rule, @@ -691,7 +691,7 @@ def test_container_quota_rep2_placement(self, default_wallet: NodeWallet, quota_ @pytest.mark.parametrize("quota_type,initial_quota", [("hard", 100), ("soft", 100)]) def test_container_quota_removal(self, default_wallet: NodeWallet, quota_type: str, initial_quota: int): - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid = create_container( default_wallet.path, rule=placement_rule, @@ -765,7 +765,7 @@ def test_container_quota_removal(self, default_wallet: NodeWallet, quota_type: s @pytest.mark.parametrize("soft_quota,hard_quota", [(100, 200)]) def test_container_mixed_quotas(self, default_wallet: NodeWallet, soft_quota: int, hard_quota: int): - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid = create_container( default_wallet.path, rule=placement_rule, diff --git a/pytest_tests/tests/quota/test_user_quota.py b/pytest_tests/tests/quota/test_user_quota.py index 4df9e7c6c..dc03bac0d 100644 --- a/pytest_tests/tests/quota/test_user_quota.py +++ b/pytest_tests/tests/quota/test_user_quota.py @@ -16,7 +16,7 @@ class TestUserQuota(TestQuotaBase): @pytest.mark.parametrize("quota_value,quota_type", [(100, "hard"), (100, "soft")]) @pytest.mark.sanity def test_user_quota(self, unique_wallet: NodeWallet, quota_value: int, quota_type: str): - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid = create_container( unique_wallet.path, rule=placement_rule, @@ -141,7 +141,7 @@ def test_user_quota(self, unique_wallet: NodeWallet, quota_value: int, quota_typ @pytest.mark.parametrize("quota_value,quota_type", [(100, "hard"), (100, "soft")]) def test_multiple_users_quota_independence(self, unique_wallet: NodeWallet, quota_value: int, quota_type: str): - placement_rule = "REP 1" + placement_rule = "EC 2/2" user1_wallet = unique_wallet user2_wallet = create_wallet() @@ -319,7 +319,7 @@ def test_negative_quota_error_handling(self, unique_wallet: NodeWallet, invalid_ [(100, 200, "hard"), (200, 50, "hard"), (100, 200, "soft"), (200, 50, "soft")], ) def test_quota_update(self, unique_wallet: NodeWallet, initial_quota: int, updated_quota: int, quota_type: str): - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid = create_container( unique_wallet.path, rule=placement_rule, @@ -428,7 +428,7 @@ def test_quota_update(self, unique_wallet: NodeWallet, initial_quota: int, updat @pytest.mark.parametrize("quota_value,quota_type", [(200, "hard"), (200, "soft")]) def test_quota_inheritance_new_containers(self, unique_wallet: NodeWallet, quota_value: int, quota_type: str): - placement_rule = "REP 1" + placement_rule = "EC 2/2" neofs_adm: NeofsAdm = self.neofs_env.neofs_adm() neofs_adm.fschain.refill_gas( rpc_endpoint=f"http://{self.neofs_env.fschain_rpc}", @@ -537,7 +537,7 @@ def test_quota_inheritance_new_containers(self, unique_wallet: NodeWallet, quota @pytest.mark.parametrize("quota_value,quota_type", [(200, "hard"), (200, "soft")]) def test_object_delete_and_quota_reclaim(self, unique_wallet: NodeWallet, quota_value: int, quota_type: str): - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid = create_container( unique_wallet.path, rule=placement_rule, @@ -659,7 +659,7 @@ def test_object_delete_and_quota_reclaim(self, unique_wallet: NodeWallet, quota_ @pytest.mark.parametrize("quota_value,quota_type", [(200, "hard"), (200, "soft")]) def test_user_object_lifetime_and_quota_reclaim(self, unique_wallet: NodeWallet, quota_value: int, quota_type: str): - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid = create_container( unique_wallet.path, rule=placement_rule, @@ -818,7 +818,7 @@ def test_user_quota_rep2_placement(self, unique_wallet: NodeWallet, quota_type: @pytest.mark.parametrize("quota_type,initial_quota", [("hard", 100), ("soft", 100)]) def test_user_quota_removal(self, unique_wallet: NodeWallet, quota_type: str, initial_quota: int): - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid = create_container( unique_wallet.path, rule=placement_rule, @@ -893,7 +893,7 @@ def test_user_quota_removal(self, unique_wallet: NodeWallet, quota_type: str, in @pytest.mark.parametrize("soft_quota,hard_quota", [(50, 100), (100, 50), (75, 75)]) def test_user_mixed_quotas(self, unique_wallet: NodeWallet, soft_quota: int, hard_quota: int): - placement_rule = "REP 1" + placement_rule = "EC 2/2" cid = create_container( unique_wallet.path, rule=placement_rule, diff --git a/pytest_tests/tests/s3/s3_extensions/test_s3_gate_policy.py b/pytest_tests/tests/s3/s3_extensions/test_s3_gate_policy.py index 6c1b41fc5..dfe85bab2 100644 --- a/pytest_tests/tests/s3/s3_extensions/test_s3_gate_policy.py +++ b/pytest_tests/tests/s3/s3_extensions/test_s3_gate_policy.py @@ -137,7 +137,7 @@ def test_s3_bucket_location_from_config_file(self): assert bucket_loc_2 == "rep-2" with allure.step("Check containers policy"): - self.check_container_policy(bucket_1, "REP 1 IN X CBF 1 SELECT 1 FROM * AS X") + self.check_container_policy(bucket_1, "EC 2/2 IN X CBF 1 SELECT 1 FROM * AS X") self.check_container_policy(bucket_2, "REP 2") with allure.step("Check object policy"): diff --git a/pytest_tests/tests/s3/s3_extensions/test_unfinished_object_removal.py b/pytest_tests/tests/s3/s3_extensions/test_unfinished_object_removal.py index ae32c9850..b283c063e 100644 --- a/pytest_tests/tests/s3/s3_extensions/test_unfinished_object_removal.py +++ b/pytest_tests/tests/s3/s3_extensions/test_unfinished_object_removal.py @@ -21,7 +21,7 @@ def pytest_generate_tests(metafunc): class TestUnfinishedObjectRemoval(TestNeofsS3Base): def test_unfinished_object_removal(self): with allure.step("Create s3 bucket"): - bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-1") + bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-2") cid = search_container_by_name(self.wallet.path, bucket, shell=self.shell, endpoint=self.neofs_env.sn_rpc) set_bucket_versioning(self.s3_client, bucket, s3_bucket.VersioningStatus.ENABLED) parts_count = 5 diff --git a/pytest_tests/tests/s3/test_s3.py b/pytest_tests/tests/s3/test_s3.py index 43ec9029a..0f15287a3 100644 --- a/pytest_tests/tests/s3/test_s3.py +++ b/pytest_tests/tests/s3/test_s3.py @@ -47,10 +47,10 @@ def test_s3_buckets(self): with allure.step("Create buckets"): bucket_1 = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-2" ) set_bucket_versioning(self.s3_client, bucket_1, s3_bucket.VersioningStatus.ENABLED) - bucket_2 = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-1") + bucket_2 = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-2") with allure.step("Check buckets are presented in the system"): buckets = s3_bucket.list_buckets_s3(self.s3_client) diff --git a/pytest_tests/tests/s3/test_s3_ACL.py b/pytest_tests/tests/s3/test_s3_ACL.py index 2a27ddc33..f9e0dd212 100644 --- a/pytest_tests/tests/s3/test_s3_ACL.py +++ b/pytest_tests/tests/s3/test_s3_ACL.py @@ -104,7 +104,7 @@ def test_s3_bucket_ACL(self): self.s3_client, object_lock_enabled_for_bucket=True, acl=acl, - bucket_configuration="rep-1", + bucket_configuration="rep-2", ) bucket_acl = s3_bucket.get_bucket_acl(self.s3_client, bucket) verify_acls(bucket_acl, ACLType.PUBLIC_READ_WRITE) @@ -129,7 +129,7 @@ def test_s3_bucket_disable_enable_ACL(self): with allure.step("Create bucket"): bucket = s3_bucket.create_bucket_s3( self.s3_client, - bucket_configuration="rep-1", + bucket_configuration="rep-2", ) bucket_acl = s3_bucket.get_bucket_acl(self.s3_client, bucket) verify_acls(bucket_acl, ACLType.PRIVATE) diff --git a/pytest_tests/tests/s3/test_s3_bucket.py b/pytest_tests/tests/s3/test_s3_bucket.py index b782f4c14..94abf4076 100644 --- a/pytest_tests/tests/s3/test_s3_bucket.py +++ b/pytest_tests/tests/s3/test_s3_bucket.py @@ -30,7 +30,7 @@ def test_s3_create_bucket_with_ACL(self): self.s3_client, object_lock_enabled_for_bucket=True, acl=acl, - bucket_configuration="rep-1", + bucket_configuration="rep-2", ) bucket_acl = s3_bucket.get_bucket_acl(self.s3_client, bucket) verify_acls(bucket_acl, ACLType.PRIVATE) @@ -41,7 +41,7 @@ def test_s3_create_bucket_with_ACL(self): self.s3_client, object_lock_enabled_for_bucket=True, acl=acl, - bucket_configuration="rep-1", + bucket_configuration="rep-2", ) bucket_acl_1 = s3_bucket.get_bucket_acl(self.s3_client, bucket_1) verify_acls(bucket_acl_1, ACLType.PUBLIC_READ) @@ -52,7 +52,7 @@ def test_s3_create_bucket_with_ACL(self): self.s3_client, object_lock_enabled_for_bucket=True, acl=acl, - bucket_configuration="rep-1", + bucket_configuration="rep-2", ) bucket_acl_2 = s3_bucket.get_bucket_acl(self.s3_client, bucket_2) verify_acls(bucket_acl_2, ACLType.PUBLIC_READ_WRITE) @@ -63,7 +63,7 @@ def test_s3_create_bucket_with_ACL(self): self.s3_client, object_lock_enabled_for_bucket=True, acl=acl, - bucket_configuration="rep-1", + bucket_configuration="rep-2", ) bucket_acl_3 = s3_bucket.get_bucket_acl(self.s3_client, bucket_3) verify_acls(bucket_acl_3, ACLType.PUBLIC_READ) @@ -75,7 +75,7 @@ def test_s3_create_bucket_with_grands(self): self.s3_client, object_lock_enabled_for_bucket=True, grant_read="uri=http://acs.amazonaws.com/groups/global/AllUsers", - bucket_configuration="rep-1", + bucket_configuration="rep-2", ) bucket_acl = s3_bucket.get_bucket_acl(self.s3_client, bucket) verify_acls(bucket_acl, ACLType.PUBLIC_READ) @@ -85,7 +85,7 @@ def test_s3_create_bucket_with_grands(self): self.s3_client, object_lock_enabled_for_bucket=True, grant_write="uri=http://acs.amazonaws.com/groups/global/AllUsers", - bucket_configuration="rep-1", + bucket_configuration="rep-2", ) bucket_acl_1 = s3_bucket.get_bucket_acl(self.s3_client, bucket_1) verify_acls(bucket_acl_1, ACLType.PUBLIC_WRITE) @@ -95,7 +95,7 @@ def test_s3_create_bucket_with_grands(self): self.s3_client, object_lock_enabled_for_bucket=True, grant_full_control="uri=http://acs.amazonaws.com/groups/global/AllUsers", - bucket_configuration="rep-1", + bucket_configuration="rep-2", ) bucket_acl_2 = s3_bucket.get_bucket_acl(self.s3_client, bucket_2) verify_acls(bucket_acl_2, ACLType.PUBLIC_READ_WRITE) @@ -108,7 +108,7 @@ def test_s3_bucket_object_lock(self): with allure.step("Create bucket with --no-object-lock-enabled-for-bucket"): bucket = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=False, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=False, bucket_configuration="rep-2" ) date_obj = datetime.now(UTC) + timedelta(days=1) with pytest.raises(Exception, match=r".*Object Lock configuration does not exist for this bucket.*"): @@ -123,7 +123,7 @@ def test_s3_bucket_object_lock(self): ) with allure.step("Create bucket with --object-lock-enabled-for-bucket"): bucket_1 = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-2" ) date_obj_1 = datetime.now(UTC) + timedelta(days=1) s3_object.put_object_s3( @@ -143,7 +143,7 @@ def test_s3_delete_bucket(self): file_name_1 = object_key_from_file_path(file_path_1) file_path_2 = generate_file(self.neofs_env.get_object_size("simple_object_size")) file_name_2 = object_key_from_file_path(file_path_2) - bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-1") + bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-2") with allure.step("Put two objects into bucket"): s3_object.put_object_s3(self.s3_client, bucket, file_path_1) diff --git a/pytest_tests/tests/s3/test_s3_disabled_homo_hash.py b/pytest_tests/tests/s3/test_s3_disabled_homo_hash.py index ac47213e7..d618437c9 100644 --- a/pytest_tests/tests/s3/test_s3_disabled_homo_hash.py +++ b/pytest_tests/tests/s3/test_s3_disabled_homo_hash.py @@ -57,7 +57,7 @@ def s3_client(default_wallet: NodeWallet, neofs_env_single_sn: NeoFSEnv) -> Any: def test_s3_api_multipart_disabled_homo_hash(s3_client): neofs_env, client = s3_client - bucket = s3_bucket.create_bucket_s3(client, bucket_configuration="rep-1") + bucket = s3_bucket.create_bucket_s3(client, bucket_configuration="rep-2") parts_count = 3 file_name_large = generate_file(neofs_env.get_object_size("simple_object_size") * 1024 * 6 * parts_count) diff --git a/pytest_tests/tests/s3/test_s3_locking.py b/pytest_tests/tests/s3/test_s3_locking.py index 33bd5726a..be1e40f92 100644 --- a/pytest_tests/tests/s3/test_s3_locking.py +++ b/pytest_tests/tests/s3/test_s3_locking.py @@ -27,7 +27,7 @@ def test_s3_object_locking(self): retention_period = 30 bucket = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-2" ) for version_id in [None, "second"]: @@ -86,7 +86,7 @@ def test_s3_mode_compliance(self): retention_period_1 = 1 bucket = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-2" ) for version_id in [None, "second"]: @@ -126,7 +126,7 @@ def test_s3_mode_governance(self): retention_period_2 = 5 bucket = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-2" ) for version_id in [None, "second"]: @@ -182,7 +182,7 @@ def test_s3_legal_hold(self): file_name = object_key_from_file_path(file_path) bucket = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=False, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=False, bucket_configuration="rep-2" ) for version_id in [None, "second"]: @@ -203,7 +203,7 @@ def test_object_lock_set_legal_hold_off_not_supported(self): file_name = object_key_from_file_path(file_path) bucket = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-2" ) for version_id in [None, "second"]: @@ -230,7 +230,7 @@ def test_s3_bucket_lock(self): configuration = {"Rule": {"DefaultRetention": {"Mode": "COMPLIANCE", "Days": 1}}} bucket = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-2" ) with allure.step("PutObjectLockConfiguration with ObjectLockEnabled=False"): diff --git a/pytest_tests/tests/s3/test_s3_multipart.py b/pytest_tests/tests/s3/test_s3_multipart.py index 83a05e5e1..42e3a6d2b 100644 --- a/pytest_tests/tests/s3/test_s3_multipart.py +++ b/pytest_tests/tests/s3/test_s3_multipart.py @@ -23,7 +23,7 @@ def pytest_generate_tests(metafunc): class TestS3Multipart(TestNeofsS3Base): @allure.title("Test S3 Object Multipart API") def test_s3_object_multipart(self): - bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-1") + bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-2") set_bucket_versioning(self.s3_client, bucket, s3_bucket.VersioningStatus.ENABLED) parts_count = 5 file_name_large = generate_file(PART_SIZE * parts_count) # 5Mb - min part @@ -56,7 +56,7 @@ def test_s3_object_multipart(self): assert get_file_hash(got_object) == get_file_hash(file_name_large) def test_s3_object_multipart_non_sequential(self): - bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-1") + bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-2") set_bucket_versioning(self.s3_client, bucket, s3_bucket.VersioningStatus.ENABLED) parts_count = 11 file_name_large = generate_file(PART_SIZE * parts_count) # 5Mb - min part @@ -90,7 +90,7 @@ def test_s3_object_multipart_non_sequential(self): assert get_file_hash(got_object) == get_file_hash(file_name_large) def test_s3_object_multipart_random(self): - bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-1") + bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-2") set_bucket_versioning(self.s3_client, bucket, s3_bucket.VersioningStatus.ENABLED) parts_count = 7 files_num = 5 @@ -138,7 +138,7 @@ def test_s3_object_multipart_random(self): @allure.title("Test S3 Multipart abord") def test_s3_abort_multipart(self): - bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-1") + bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-2") set_bucket_versioning(self.s3_client, bucket, s3_bucket.VersioningStatus.ENABLED) parts_count = 5 file_name_large = generate_file(PART_SIZE * parts_count) # 5Mb - min part @@ -161,7 +161,7 @@ def test_s3_abort_multipart(self): @allure.title("Test S3 Upload Part Copy") def test_s3_multipart_copy(self): - bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-1") + bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-2") set_bucket_versioning(self.s3_client, bucket, s3_bucket.VersioningStatus.ENABLED) parts_count = 3 file_name_large = generate_file(PART_SIZE * parts_count) # 5Mb - min part @@ -198,7 +198,7 @@ def test_s3_multipart_copy(self): @allure.title("Test S3 Object List Multipart Uploads Pagination via boto3") @pytest.mark.boto3_only def test_s3_object_multipart_upload_pagination_boto3(self): - bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-1") + bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-2") small_object_size = 8 number_of_uploads = 20 @@ -222,7 +222,7 @@ def test_s3_object_multipart_upload_pagination_boto3(self): @allure.title("Test S3 Object List Multipart Uploads Pagination via aws cli") @pytest.mark.aws_cli_only def test_s3_object_multipart_upload_pagination_aws_cli(self, bucket): - bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-1") + bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-2") small_object_size = 8 number_of_uploads = 20 @@ -259,7 +259,7 @@ def test_s3_object_multipart_upload_pagination_aws_cli(self, bucket): @allure.title("Test S3 Object Multipart List Parts Pagination via boto3") @pytest.mark.boto3_only def test_s3_object_multipart_list_parts_boto3(self): - bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-1") + bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-2") PART_SIZE = 16 file_name = generate_file(PART_SIZE * 20) object_key = object_key_from_file_path(file_name) @@ -292,7 +292,7 @@ def test_s3_object_multipart_list_parts_boto3(self): @allure.title("Test S3 Object Multipart List Parts Pagination via aws cli") @pytest.mark.aws_cli_only def test_s3_object_multipart_list_parts_aws_cli(self, bucket): - bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-1") + bucket = s3_bucket.create_bucket_s3(self.s3_client, bucket_configuration="rep-2") PART_SIZE = 16 parts_count = 20 file_name = generate_file(PART_SIZE * parts_count) diff --git a/pytest_tests/tests/s3/test_s3_versioning.py b/pytest_tests/tests/s3/test_s3_versioning.py index ad7c5717f..719e26469 100644 --- a/pytest_tests/tests/s3/test_s3_versioning.py +++ b/pytest_tests/tests/s3/test_s3_versioning.py @@ -31,7 +31,7 @@ def object_key_from_file_path(full_path: str) -> str: @allure.title("Test S3: try to disable versioning") def test_s3_version_off(self): bucket = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=True, bucket_configuration="rep-2" ) with pytest.raises(Exception): set_bucket_versioning(self.s3_client, bucket, s3_bucket.VersioningStatus.SUSPENDED) @@ -39,7 +39,7 @@ def test_s3_version_off(self): @pytest.fixture(scope="class") def prepare_versioned_objects(self) -> tuple: bucket = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=False, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=False, bucket_configuration="rep-2" ) set_bucket_versioning(self.s3_client, bucket, s3_bucket.VersioningStatus.ENABLED) @@ -75,7 +75,7 @@ def test_s3_version(self): file_name = self.object_key_from_file_path(file_path) bucket_objects = [file_name] bucket = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=False, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=False, bucket_configuration="rep-2" ) set_bucket_versioning(self.s3_client, bucket, s3_bucket.VersioningStatus.SUSPENDED) @@ -124,7 +124,7 @@ def test_s3_version(self): @allure.title("Test for duplicate objects in S3 listings") def test_s3_duplicates_in_object_listing(self): bucket = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=False, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=False, bucket_configuration="rep-2" ) set_bucket_versioning(self.s3_client, bucket, s3_bucket.VersioningStatus.ENABLED) @@ -165,7 +165,7 @@ def put_objects_with_versions(): @pytest.mark.parametrize("common_prefix", ["/s3-prefix/", "s3-prefix/", "s3-prefix", "test/s3/prefix/"]) def test_s3_prefix_in_object_listing(self, common_prefix: str): bucket = s3_bucket.create_bucket_s3( - self.s3_client, object_lock_enabled_for_bucket=False, bucket_configuration="rep-1" + self.s3_client, object_lock_enabled_for_bucket=False, bucket_configuration="rep-2" ) set_bucket_versioning(self.s3_client, bucket, s3_bucket.VersioningStatus.ENABLED) diff --git a/pytest_tests/tests/services/rest_gate/test_rest_gate.py b/pytest_tests/tests/services/rest_gate/test_rest_gate.py index 525b8d986..aa7bdf617 100644 --- a/pytest_tests/tests/services/rest_gate/test_rest_gate.py +++ b/pytest_tests/tests/services/rest_gate/test_rest_gate.py @@ -34,7 +34,7 @@ ) @pytest.mark.sanity class TestRestGate(TestNeofsRestBase): - PLACEMENT_RULE_1 = "REP 1 IN X CBF 1 SELECT 1 FROM * AS X" + PLACEMENT_RULE_1 = "EC 2/2 IN X CBF 1 SELECT 1 FROM * AS X" PLACEMENT_RULE_2 = "REP 2 IN X CBF 2 SELECT 2 FROM * AS X" @pytest.fixture(scope="class", autouse=True) diff --git a/pytest_tests/tests/services/rest_gate/test_rest_gate_new.py b/pytest_tests/tests/services/rest_gate/test_rest_gate_new.py index e4a8f0524..fbe72507b 100644 --- a/pytest_tests/tests/services/rest_gate/test_rest_gate_new.py +++ b/pytest_tests/tests/services/rest_gate/test_rest_gate_new.py @@ -32,7 +32,7 @@ ) @pytest.mark.sanity class TestRestGate(TestNeofsRestBase): - PLACEMENT_RULE_1 = "REP 1 IN X CBF 1 SELECT 1 FROM * AS X" + PLACEMENT_RULE_1 = "EC 2/2 IN X CBF 1 SELECT 1 FROM * AS X" PLACEMENT_RULE_2 = "REP 2 IN X CBF 2 SELECT 2 FROM * AS X" @pytest.fixture(scope="class", autouse=True) diff --git a/pytest_tests/tests/session_token/test_object_session_token.py b/pytest_tests/tests/session_token/test_object_session_token.py index 49537c03b..37582374e 100644 --- a/pytest_tests/tests/session_token/test_object_session_token.py +++ b/pytest_tests/tests/session_token/test_object_session_token.py @@ -60,7 +60,7 @@ def test_object_session_token(self, default_wallet, object_size): un_locode = container_node.node_attrs[0].split(":")[1].strip() locode = "SPB" if un_locode == "RU LED" else un_locode.split()[1] placement_policy = ( - f"REP 1 IN LOC_{locode}_PLACE CBF 1 SELECT 1 FROM LOC_{locode} " + f"EC 2/2 IN LOC_{locode}_PLACE CBF 1 SELECT 1 FROM LOC_{locode} " f'AS LOC_{locode}_PLACE FILTER "UN-LOCODE" ' f'EQ "{un_locode}" AS LOC_{locode}' ) @@ -170,7 +170,7 @@ def test_session_token_expiration_flags(self, default_wallet, expiration_flag): un_locode = first_node.node_attrs[0].split(":")[1].strip() locode = "SPB" if un_locode == "RU LED" else un_locode.split()[1] placement_policy = ( - f"REP 1 IN LOC_{locode}_PLACE CBF 1 SELECT 1 FROM LOC_{locode} " + f"EC 2/2 IN LOC_{locode}_PLACE CBF 1 SELECT 1 FROM LOC_{locode} " f'AS LOC_{locode}_PLACE FILTER "UN-LOCODE" ' f'EQ "{un_locode}" AS LOC_{locode}' )