forked from TrueCloudLab/frostfs-testcases
Fix decode_session_token after API was changed
Signed-off-by: anikeev-yadro <a.anikeev@yadro.com>
This commit is contained in:
parent
5eeb8b4058
commit
3eadf934e0
2 changed files with 5 additions and 8 deletions
|
@ -106,12 +106,10 @@ def decode_session_token(data: dict):
|
||||||
This function reencodes a fragment of header which contains
|
This function reencodes a fragment of header which contains
|
||||||
information about session token.
|
information about session token.
|
||||||
"""
|
"""
|
||||||
data["body"]["object"]["address"]["containerID"] = json_reencode(
|
data["body"]["object"]["target"]["container"] = json_reencode(
|
||||||
data["body"]["object"]["address"]["containerID"]["value"]
|
data["body"]["object"]["target"]["container"]["value"]
|
||||||
)
|
|
||||||
data["body"]["object"]["address"]["objectID"] = json_reencode(
|
|
||||||
data["body"]["object"]["address"]["objectID"]["value"]
|
|
||||||
)
|
)
|
||||||
|
data["body"]["object"]["target"]["objects"] = [json_reencode(obj["value"]) for obj in data["body"]["object"]["target"]["objects"]]
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ import allure
|
||||||
import neofs_verbs
|
import neofs_verbs
|
||||||
from neo3 import wallet
|
from neo3 import wallet
|
||||||
|
|
||||||
|
|
||||||
@allure.step("Verify Head Tombstone")
|
@allure.step("Verify Head Tombstone")
|
||||||
def verify_head_tombstone(wallet_path: str, cid: str, oid_ts: str, oid: str):
|
def verify_head_tombstone(wallet_path: str, cid: str, oid_ts: str, oid: str):
|
||||||
header = neofs_verbs.head_object(wallet_path, cid, oid_ts)
|
header = neofs_verbs.head_object(wallet_path, cid, oid_ts)
|
||||||
|
@ -25,8 +24,8 @@ def verify_head_tombstone(wallet_path: str, cid: str, oid_ts: str, oid: str):
|
||||||
header["sessionToken"]["body"]["object"]["verb"] == "DELETE"
|
header["sessionToken"]["body"]["object"]["verb"] == "DELETE"
|
||||||
), "Header Session Type isn't DELETE"
|
), "Header Session Type isn't DELETE"
|
||||||
assert (
|
assert (
|
||||||
header["sessionToken"]["body"]["object"]["address"]["containerID"] == cid
|
header["sessionToken"]["body"]["object"]["target"]["container"] == cid
|
||||||
), "Header Session ID is wrong"
|
), "Header Session ID is wrong"
|
||||||
assert (
|
assert (
|
||||||
header["sessionToken"]["body"]["object"]["address"]["objectID"] == oid
|
header["sessionToken"]["body"]["object"]["target"]["objects"][0] == oid
|
||||||
), "Header Session OID is wrong"
|
), "Header Session OID is wrong"
|
||||||
|
|
Loading…
Reference in a new issue