forked from TrueCloudLab/frostfs-testcases
Compare commits
3 commits
46e57870d0
...
fe4341893b
Author | SHA1 | Date | |
---|---|---|---|
fe4341893b | |||
f7475f9841 | |||
566f1a425f |
4 changed files with 19 additions and 17 deletions
|
@ -8,7 +8,7 @@ hosts:
|
||||||
skip_readiness_check: True
|
skip_readiness_check: True
|
||||||
force_transactions: True
|
force_transactions: True
|
||||||
services:
|
services:
|
||||||
- name: s01
|
- name: frostfs-storage_01
|
||||||
attributes:
|
attributes:
|
||||||
container_name: s01
|
container_name: s01
|
||||||
config_path: ../frostfs-dev-env/services/storage/.storage.env
|
config_path: ../frostfs-dev-env/services/storage/.storage.env
|
||||||
|
@ -22,7 +22,7 @@ hosts:
|
||||||
un_locode: "RU MOW"
|
un_locode: "RU MOW"
|
||||||
http_hostname: ["no_hostname"]
|
http_hostname: ["no_hostname"]
|
||||||
s3_hostname: ["no_hostname"]
|
s3_hostname: ["no_hostname"]
|
||||||
- name: s02
|
- name: frostfs-storage_02
|
||||||
attributes:
|
attributes:
|
||||||
container_name: s02
|
container_name: s02
|
||||||
config_path: ../frostfs-dev-env/services/storage/.storage.env
|
config_path: ../frostfs-dev-env/services/storage/.storage.env
|
||||||
|
@ -36,7 +36,7 @@ hosts:
|
||||||
un_locode: "RU LED"
|
un_locode: "RU LED"
|
||||||
http_hostname: ["no_hostname"]
|
http_hostname: ["no_hostname"]
|
||||||
s3_hostname: ["no_hostname"]
|
s3_hostname: ["no_hostname"]
|
||||||
- name: s03
|
- name: frostfs-storage_03
|
||||||
attributes:
|
attributes:
|
||||||
container_name: s03
|
container_name: s03
|
||||||
config_path: ../frostfs-dev-env/services/storage/.storage.env
|
config_path: ../frostfs-dev-env/services/storage/.storage.env
|
||||||
|
@ -50,7 +50,7 @@ hosts:
|
||||||
un_locode: "SE STO"
|
un_locode: "SE STO"
|
||||||
http_hostname: ["no_hostname"]
|
http_hostname: ["no_hostname"]
|
||||||
s3_hostname: ["no_hostname"]
|
s3_hostname: ["no_hostname"]
|
||||||
- name: s04
|
- name: frostfs-storage_04
|
||||||
attributes:
|
attributes:
|
||||||
container_name: s04
|
container_name: s04
|
||||||
config_path: ../frostfs-dev-env/services/storage/.storage.env
|
config_path: ../frostfs-dev-env/services/storage/.storage.env
|
||||||
|
@ -64,7 +64,7 @@ hosts:
|
||||||
un_locode: "FI HEL"
|
un_locode: "FI HEL"
|
||||||
http_hostname: ["no_hostname"]
|
http_hostname: ["no_hostname"]
|
||||||
s3_hostname: ["no_hostname"]
|
s3_hostname: ["no_hostname"]
|
||||||
- name: s3-gate01
|
- name: frostfs-s3_01
|
||||||
attributes:
|
attributes:
|
||||||
container_name: s3_gate
|
container_name: s3_gate
|
||||||
config_path: ../frostfs-dev-env/services/s3_gate/.s3.env
|
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
|
local_wallet_path: ../frostfs-dev-env/services/s3_gate/wallet.json
|
||||||
wallet_password: "s3"
|
wallet_password: "s3"
|
||||||
endpoint_data0: https://s3.frostfs.devenv:8080
|
endpoint_data0: https://s3.frostfs.devenv:8080
|
||||||
- name: http-gate01
|
- name: frostfs-http_01
|
||||||
attributes:
|
attributes:
|
||||||
container_name: http_gate
|
container_name: http_gate
|
||||||
config_path: ../frostfs-dev-env/services/http_gate/.http.env
|
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
|
local_wallet_path: ../frostfs-dev-env/services/http_gate/wallet.json
|
||||||
wallet_password: "one"
|
wallet_password: "one"
|
||||||
endpoint_data0: http://http.frostfs.devenv
|
endpoint_data0: http://http.frostfs.devenv
|
||||||
- name: ir01
|
- name: frostfs-ir_01
|
||||||
attributes:
|
attributes:
|
||||||
container_name: ir01
|
container_name: ir01
|
||||||
config_path: ../frostfs-dev-env/services/ir/.ir.env
|
config_path: ../frostfs-dev-env/services/ir/.ir.env
|
||||||
|
@ -90,7 +90,7 @@ hosts:
|
||||||
local_wallet_config_path: ./TemporaryDir/password-other.yml
|
local_wallet_config_path: ./TemporaryDir/password-other.yml
|
||||||
local_wallet_path: ../frostfs-dev-env/services/ir/az.json
|
local_wallet_path: ../frostfs-dev-env/services/ir/az.json
|
||||||
wallet_password: "one"
|
wallet_password: "one"
|
||||||
- name: morph-chain01
|
- name: neo-go_01
|
||||||
attributes:
|
attributes:
|
||||||
container_name: morph_chain
|
container_name: morph_chain
|
||||||
config_path: ../frostfs-dev-env/services/morph_chain/protocol.privnet.yml
|
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
|
local_wallet_path: ../frostfs-dev-env/services/morph_chain/node-wallet.json
|
||||||
wallet_password: "one"
|
wallet_password: "one"
|
||||||
endpoint_internal0: http://morph-chain.frostfs.devenv:30333
|
endpoint_internal0: http://morph-chain.frostfs.devenv:30333
|
||||||
- name: main-chain01
|
- name: main-chain_01
|
||||||
attributes:
|
attributes:
|
||||||
container_name: main_chain
|
container_name: main_chain
|
||||||
config_path: ../frostfs-dev-env/services/chain/protocol.privnet.yml
|
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
|
local_wallet_path: ../frostfs-dev-env/services/chain/node-wallet.json
|
||||||
wallet_password: "one"
|
wallet_password: "one"
|
||||||
endpoint_internal0: http://main-chain.frostfs.devenv:30333
|
endpoint_internal0: http://main-chain.frostfs.devenv:30333
|
||||||
- name: coredns01
|
- name: coredns_01
|
||||||
attributes:
|
attributes:
|
||||||
container_name: coredns
|
container_name: coredns
|
||||||
clis:
|
clis:
|
||||||
|
|
|
@ -326,7 +326,7 @@ def two_buckets(s3_client: S3ClientWrapper, request: pytest.FixtureRequest):
|
||||||
@pytest.fixture(scope="session", autouse=True)
|
@pytest.fixture(scope="session", autouse=True)
|
||||||
def check_binary_versions(hosting: Hosting, client_shell: Shell, request: pytest.FixtureRequest):
|
def check_binary_versions(hosting: Hosting, client_shell: Shell, request: pytest.FixtureRequest):
|
||||||
local_versions = version_utils.get_local_binaries_versions(client_shell)
|
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 = {
|
all_versions = {
|
||||||
**local_versions,
|
**local_versions,
|
||||||
|
|
|
@ -64,7 +64,7 @@ class TestS3GatePolicy(ClusterTestBase):
|
||||||
)
|
)
|
||||||
assert copies_1 == 1
|
assert copies_1 == 1
|
||||||
for cluster_node in self.cluster.cluster_nodes:
|
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:
|
if cid_2:
|
||||||
break
|
break
|
||||||
copies_2 = get_simple_object_copies(
|
copies_2 = get_simple_object_copies(
|
||||||
|
|
|
@ -23,21 +23,21 @@ def test_binaries_versions(request: FixtureRequest, hosting: Hosting):
|
||||||
Compare binaries versions from external source (url) and deployed on servers.
|
Compare binaries versions from external source (url) and deployed on servers.
|
||||||
"""
|
"""
|
||||||
with reporter.step("Get binaries versions from 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
|
environment_dir = request.config.getoption("--alluredir") or ASSETS_DIR
|
||||||
env_file = os.path.join(environment_dir, "environment.properties")
|
env_file = os.path.join(environment_dir, "environment.properties")
|
||||||
env_properties = read_env_properties(env_file)
|
env_properties = read_env_properties(env_file)
|
||||||
|
|
||||||
# compare versions from servers and file
|
# compare versions from servers and file
|
||||||
exeptions = []
|
exсeptions = []
|
||||||
additional_env_properties = {}
|
additional_env_properties = {}
|
||||||
|
|
||||||
for binary_name, binary in got_versions.items():
|
for binary_name, binary in got_versions.items():
|
||||||
version = binary["version"]
|
version = binary["version"]
|
||||||
requires_check = binary["check"]
|
requires_check = binary["check"]
|
||||||
if requires_check and not fullmatch(r"^\d+\.\d+\.\d+(-.*)?(?<!dirty)", version):
|
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
|
# 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
|
# 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:
|
if env_properties and additional_env_properties:
|
||||||
save_env_properties(env_file, 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
|
# create clear beautiful error with aggregation info
|
||||||
if exeptions:
|
if exсeptions:
|
||||||
msg = "\n".join(exeptions)
|
msg = "\n".join(exсeptions)
|
||||||
raise AssertionError(f"Found binaries with unexpected versions:\n{msg}")
|
raise AssertionError(f"Found binaries with unexpected versions:\n{msg}")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue