Compare commits

..

3 commits

Author SHA1 Message Date
fe4341893b Fixed S3 policy test case 2024-02-02 08:24:04 +00:00
f7475f9841 [OBJECT-6537] Components versions check
Components versions check

Signed-off-by: Mikhail Kadilov m.kadilov@yadro.com
2024-02-01 09:13:02 +00:00
566f1a425f [#189] parallel get remote binaries versions 2024-01-31 14:19:17 +00:00
4 changed files with 19 additions and 17 deletions

View file

@ -8,7 +8,7 @@ hosts:
skip_readiness_check: True
force_transactions: True
services:
- name: s01
- name: frostfs-storage_01
attributes:
container_name: s01
config_path: ../frostfs-dev-env/services/storage/.storage.env
@ -22,7 +22,7 @@ hosts:
un_locode: "RU MOW"
http_hostname: ["no_hostname"]
s3_hostname: ["no_hostname"]
- name: s02
- name: frostfs-storage_02
attributes:
container_name: s02
config_path: ../frostfs-dev-env/services/storage/.storage.env
@ -36,7 +36,7 @@ hosts:
un_locode: "RU LED"
http_hostname: ["no_hostname"]
s3_hostname: ["no_hostname"]
- name: s03
- name: frostfs-storage_03
attributes:
container_name: s03
config_path: ../frostfs-dev-env/services/storage/.storage.env
@ -50,7 +50,7 @@ hosts:
un_locode: "SE STO"
http_hostname: ["no_hostname"]
s3_hostname: ["no_hostname"]
- name: s04
- name: frostfs-storage_04
attributes:
container_name: s04
config_path: ../frostfs-dev-env/services/storage/.storage.env
@ -64,7 +64,7 @@ hosts:
un_locode: "FI HEL"
http_hostname: ["no_hostname"]
s3_hostname: ["no_hostname"]
- name: s3-gate01
- name: frostfs-s3_01
attributes:
container_name: s3_gate
config_path: ../frostfs-dev-env/services/s3_gate/.s3.env
@ -73,7 +73,7 @@ hosts:
local_wallet_path: ../frostfs-dev-env/services/s3_gate/wallet.json
wallet_password: "s3"
endpoint_data0: https://s3.frostfs.devenv:8080
- name: http-gate01
- name: frostfs-http_01
attributes:
container_name: http_gate
config_path: ../frostfs-dev-env/services/http_gate/.http.env
@ -82,7 +82,7 @@ hosts:
local_wallet_path: ../frostfs-dev-env/services/http_gate/wallet.json
wallet_password: "one"
endpoint_data0: http://http.frostfs.devenv
- name: ir01
- name: frostfs-ir_01
attributes:
container_name: ir01
config_path: ../frostfs-dev-env/services/ir/.ir.env
@ -90,7 +90,7 @@ hosts:
local_wallet_config_path: ./TemporaryDir/password-other.yml
local_wallet_path: ../frostfs-dev-env/services/ir/az.json
wallet_password: "one"
- name: morph-chain01
- name: neo-go_01
attributes:
container_name: morph_chain
config_path: ../frostfs-dev-env/services/morph_chain/protocol.privnet.yml
@ -99,7 +99,7 @@ hosts:
local_wallet_path: ../frostfs-dev-env/services/morph_chain/node-wallet.json
wallet_password: "one"
endpoint_internal0: http://morph-chain.frostfs.devenv:30333
- name: main-chain01
- name: main-chain_01
attributes:
container_name: main_chain
config_path: ../frostfs-dev-env/services/chain/protocol.privnet.yml
@ -108,7 +108,7 @@ hosts:
local_wallet_path: ../frostfs-dev-env/services/chain/node-wallet.json
wallet_password: "one"
endpoint_internal0: http://main-chain.frostfs.devenv:30333
- name: coredns01
- name: coredns_01
attributes:
container_name: coredns
clis:

View file

@ -326,7 +326,7 @@ def two_buckets(s3_client: S3ClientWrapper, request: pytest.FixtureRequest):
@pytest.fixture(scope="session", autouse=True)
def check_binary_versions(hosting: Hosting, client_shell: Shell, request: pytest.FixtureRequest):
local_versions = version_utils.get_local_binaries_versions(client_shell)
remote_versions = version_utils.get_remote_binaries_versions(hosting)
remote_versions, exсeptions_remote_binaries_versions = version_utils.get_remote_binaries_versions(hosting)
all_versions = {
**local_versions,

View file

@ -64,7 +64,7 @@ class TestS3GatePolicy(ClusterTestBase):
)
assert copies_1 == 1
for cluster_node in self.cluster.cluster_nodes:
cid_2 = search_container_by_name(name=bucket_1, node=cluster_node)
cid_2 = search_container_by_name(name=bucket_2, node=cluster_node)
if cid_2:
break
copies_2 = get_simple_object_copies(

View file

@ -23,21 +23,21 @@ def test_binaries_versions(request: FixtureRequest, hosting: Hosting):
Compare binaries versions from external source (url) and deployed on servers.
"""
with reporter.step("Get binaries versions from servers"):
got_versions = get_remote_binaries_versions(hosting)
got_versions, exсeptions_remote_binaries_versions = get_remote_binaries_versions(hosting)
environment_dir = request.config.getoption("--alluredir") or ASSETS_DIR
env_file = os.path.join(environment_dir, "environment.properties")
env_properties = read_env_properties(env_file)
# compare versions from servers and file
exeptions = []
exсeptions = []
additional_env_properties = {}
for binary_name, binary in got_versions.items():
version = binary["version"]
requires_check = binary["check"]
if requires_check and not fullmatch(r"^\d+\.\d+\.\d+(-.*)?(?<!dirty)", version):
exeptions.append(f"{binary_name}: Actual version doesn't conform to format '0.0.0-000-aaaaaaa': {version}")
exсeptions.append(f"{binary_name}: Actual version doesn't conform to format '0.0.0-000-aaaaaaa': {version}")
# If some binary was not listed in the env properties file, let's add it
# so that we have full information about versions in allure report
@ -47,9 +47,11 @@ def test_binaries_versions(request: FixtureRequest, hosting: Hosting):
if env_properties and additional_env_properties:
save_env_properties(env_file, additional_env_properties)
exсeptions.extend(exсeptions_remote_binaries_versions)
# create clear beautiful error with aggregation info
if exeptions:
msg = "\n".join(exeptions)
if exсeptions:
msg = "\n".join(exсeptions)
raise AssertionError(f"Found binaries with unexpected versions:\n{msg}")