forked from TrueCloudLab/frostfs-testcases
Fix check headers in object tests
Signed-off-by: anikeev-yadro <a.anikeev@yadro.com>
This commit is contained in:
parent
2e8e105756
commit
d21a89485b
1 changed files with 9 additions and 1 deletions
|
@ -1,14 +1,22 @@
|
|||
import json
|
||||
import logging
|
||||
|
||||
import allure
|
||||
from neo3 import wallet
|
||||
from neofs_testlib.shell import Shell
|
||||
from neofs_verbs import head_object
|
||||
|
||||
logger = logging.getLogger("NeoLogger")
|
||||
|
||||
|
||||
@allure.step("Verify Head Tombstone")
|
||||
def verify_head_tombstone(wallet_path: str, cid: str, oid_ts: str, oid: str, shell: Shell):
|
||||
header = head_object(wallet_path, cid, oid_ts, shell=shell)["header"]
|
||||
|
||||
s_oid = header["sessionToken"]["body"]["object"]["target"]["objects"]
|
||||
logger.info(f"Header Session OIDs is {s_oid}")
|
||||
logger.info(f"OID is {oid}")
|
||||
|
||||
assert header["containerID"] == cid, "Tombstone Header CID is wrong"
|
||||
|
||||
with open(wallet_path, "r") as file:
|
||||
|
@ -25,5 +33,5 @@ def verify_head_tombstone(wallet_path: str, cid: str, oid_ts: str, oid: str, she
|
|||
header["sessionToken"]["body"]["object"]["target"]["container"] == cid
|
||||
), "Header Session ID is wrong"
|
||||
assert (
|
||||
header["sessionToken"]["body"]["object"]["target"]["objects"][0] == oid
|
||||
oid in header["sessionToken"]["body"]["object"]["target"]["objects"]
|
||||
), "Header Session OID is wrong"
|
||||
|
|
Loading…
Reference in a new issue