forked from TrueCloudLab/frostfs-testcases
Cleanup teardown has been added. Fixes. Added ACL bearer token scrnario for filter with user headers.
This commit is contained in:
parent
ee4c775ef4
commit
522de42ab6
9 changed files with 318 additions and 236 deletions
|
@ -826,18 +826,20 @@ def verify_file_hash(filename, expected_hash):
|
|||
else:
|
||||
raise Exception("File hash '{}' is not equal to {}".format(file_hash, expected_hash))
|
||||
|
||||
@keyword('Cleanup File')
|
||||
# remove temp files
|
||||
def cleanup_file(filename: str):
|
||||
if os.path.isfile(filename):
|
||||
try:
|
||||
os.remove(filename)
|
||||
except OSError as e:
|
||||
raise Exception("Error: '%s' - %s." % (e.filename, e.strerror))
|
||||
else:
|
||||
raise Exception("Error: '%s' file not found" % filename)
|
||||
|
||||
logger.info("File '%s' has been deleted." % filename)
|
||||
@keyword('Cleanup Files')
|
||||
def cleanup_file(*filename_list):
|
||||
|
||||
for filename in filename_list:
|
||||
if os.path.isfile(filename):
|
||||
try:
|
||||
os.remove(filename)
|
||||
except OSError as e:
|
||||
raise Exception("Error: '%s' - %s." % (e.filename, e.strerror))
|
||||
else:
|
||||
logger.warn("Error: '%s' file not found" % filename)
|
||||
|
||||
logger.info("File '%s' has been deleted." % filename)
|
||||
|
||||
|
||||
@keyword('Put object to NeoFS')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue