[#228] add test container metrics #228
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-testcases#228
Loading…
Reference in a new issue
No description provided.
Delete branch "i.niyazov/frostfs-testcases:add-test-container-metric"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
condition: TrueCloudLab/frostfs-testlib#220
Signed-off-by: Ilyas Niyazov i.niyazov@yadro.com
f88eff9997
to8fe37f8d42
8fe37f8d42
toce1b9aec12
@ -0,0 +40,4 @@
def get_count_metric_type_from_stdout(metric_result_stdout: str, metric_type: str):
result = re.findall(rf'type="{metric_type}"}}\s(\d+)', metric_result_stdout)
return sum(map(int, result))
need
@allure.title("<Title for test case>")
@ -0,0 +42,4 @@
return sum(map(int, result))
def test_container_metrics(self, object_size: ObjectSize, default_wallet: WalletInfo, cluster: Cluster):
wallet = default_wallet
wallet = default_wallet
is a redundant line@ -0,0 +43,4 @@
def test_container_metrics(self, object_size: ObjectSize, default_wallet: WalletInfo, cluster: Cluster):
wallet = default_wallet
if object_size.name == "complex":
I'd suggest to make it more clear and universal like this
And then use the appropriate counts in asserts like
(object_chunks + head_object + link_object) * copies
It will be much clearer where numbers came from
@ -0,0 +86,4 @@
with reporter.step("Check metrics(Phy, Logic, User) in each nodes"):
self.check_sum_counter_metrics_in_nodes(cluster.cluster_nodes, cid, phy_exp=4, logic_exp=4, user_exp=0)
delete_container(wallet, cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint)
with reporter.step("Delete container"):
in the define function delete_container there is
@reporter.step("Delete Container")
do I need to duplicate this message inside the test?
Yes, for better readability of test body.
Also, internal steps may contain dynamic info, may change in future or be absent
@ -0,0 +13,4 @@
@pytest.mark.container
@pytest.mark.sanity
These are not sanity tests
ce1b9aec12
to2eb0a23863
@ -0,0 +42,4 @@
result = re.findall(rf'type="{metric_type}"}}\s(\d+)', metric_result_stdout)
return sum(map(int, result))
@allure.title("Container metrics (obj_size={object_size}, policy={placement_policy})")
, policy={placement_policy}
is redundant, there is no such parameter in this test2eb0a23863
to3941619431