forked from TrueCloudLab/frostfs-testcases
[#297] remove robot.logger
Signed-off-by: Yulia Kovshova <y.kovshova@yadro.com>
This commit is contained in:
parent
035175894d
commit
a8a00c1c53
15 changed files with 811 additions and 713 deletions
|
@ -3,46 +3,33 @@
|
|||
import allure
|
||||
import json
|
||||
|
||||
import allure
|
||||
import neofs_verbs
|
||||
from neo3 import wallet
|
||||
from robot.libraries.BuiltIn import BuiltIn
|
||||
|
||||
ROBOT_AUTO_KEYWORDS = False
|
||||
|
||||
|
||||
@allure.step('Verify Head Tombstone')
|
||||
@allure.step("Verify Head Tombstone")
|
||||
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 = header['header']
|
||||
|
||||
BuiltIn().should_be_equal(header["containerID"], cid,
|
||||
msg="Tombstone Header CID is wrong")
|
||||
header = header["header"]
|
||||
assert header["containerID"] == cid, "Tombstone Header CID is wrong"
|
||||
|
||||
wlt_data = dict()
|
||||
with open(wallet_path, 'r') as fout:
|
||||
with open(wallet_path, "r") as fout:
|
||||
wlt_data = json.loads(fout.read())
|
||||
wlt = wallet.Wallet.from_json(wlt_data, password='')
|
||||
wlt = wallet.Wallet.from_json(wlt_data, password="")
|
||||
addr = wlt.accounts[0].address
|
||||
|
||||
BuiltIn().should_be_equal(header["ownerID"], addr,
|
||||
msg="Tombstone Owner ID is wrong")
|
||||
|
||||
BuiltIn().should_be_equal(header["objectType"], 'TOMBSTONE',
|
||||
msg="Header Type isn't Tombstone")
|
||||
|
||||
BuiltIn().should_be_equal(
|
||||
header["sessionToken"]["body"]["object"]["verb"], 'DELETE',
|
||||
msg="Header Session Type isn't DELETE"
|
||||
)
|
||||
|
||||
BuiltIn().should_be_equal(
|
||||
header["sessionToken"]["body"]["object"]["address"]["containerID"],
|
||||
cid,
|
||||
msg="Header Session ID is wrong"
|
||||
)
|
||||
|
||||
BuiltIn().should_be_equal(
|
||||
header["sessionToken"]["body"]["object"]["address"]["objectID"],
|
||||
oid,
|
||||
msg="Header Session OID is wrong"
|
||||
)
|
||||
assert header["ownerID"] == addr, "Tombstone Owner ID is wrong"
|
||||
assert header["objectType"] == "TOMBSTONE", "Header Type isn't Tombstone"
|
||||
assert (
|
||||
header["sessionToken"]["body"]["object"]["verb"] == "DELETE"
|
||||
), "Header Session Type isn't DELETE"
|
||||
assert (
|
||||
header["sessionToken"]["body"]["object"]["address"]["containerID"] == cid
|
||||
), "Header Session ID is wrong"
|
||||
assert (
|
||||
header["sessionToken"]["body"]["object"]["address"]["objectID"] == oid
|
||||
), "Header Session OID is wrong"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue