-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_data_upload.py
646 lines (565 loc) · 26.4 KB
/
test_data_upload.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
"""
DATA UPLOAD
"""
import hashlib
import os
import pytest
import random
import string
import time
import math
from cdislogging import get_logger
from services.fence import Fence
from services.indexd import Indexd
from services.graph import GraphDataTools
from playwright.sync_api import Page
from pages.login import LoginPage
from pages.submission import SubmissionPage
from gen3.auth import Gen3Auth
logger = get_logger(__name__, log_level=os.getenv("LOG_LEVEL", "info"))
def create_large_file(filePath, megabytes, text):
with open(filePath, mode="w") as f:
# 1MB = 1024 times the previous text
for i in range(megabytes * 1024):
f.write(text)
# Global variables used across TestDataUpload class
rand = "".join(random.choices(string.ascii_lowercase + string.digits, k=5))
file_name = f"qa-upload-file_{rand}.txt"
file_path = f"./{file_name}"
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sit amet iaculis neque, at mattis mi. Donec pharetra lacus sit amet dui tincidunt, a varius risus tempor. Duis dictum sodales dignissim. Ut luctus turpis non nibh pretium consequat. Fusce faucibus vulputate magna vel congue. Proin sit amet libero mauris. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed dictum lacus. Vestibulum bibendum ipsum quis lacus dignissim euismod. Mauris et dignissim leo. Phasellus pretium molestie nunc, varius gravida augue congue quis. Maecenas faucibus, velit dignissim feugiat viverra, eros diam tempor tortor, sed maximus mi justo a massa. Mauris at metus tincidunt augue iaculis mollis et id eros. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aliquam sagittis porta vestibulum. Cras molestie nulla metus, a sollicitudin neque suscipit nec. Nunc sem lectus, molestie eu mauris eget, volutpat posuere mauris. Donec gravida venenatis sodales. Pellentesque risus lorem, pulvinar nec molestie eu amet. "
file_content = (
"this fake data file was generated and uploaded by the integration test suite1\n"
)
big_file_name = f"qa-upload-7mb-file_{rand}.txt"
big_file_path = f"./{big_file_name}"
class FileRecord:
def __init__(self, did: str, props: dict) -> None:
self.did = did
self.props = props
class FileRecordWithCCs:
def __init__(self, did: str, props: dict, authz: list) -> None:
self.did = did
self.props = props
self.authz = authz
@pytest.mark.fence
@pytest.mark.indexd
@pytest.mark.graph_submission
class TestDataUpload:
auth = Gen3Auth(refresh_token=pytest.api_keys["main_account"])
sd_tools = GraphDataTools(auth=auth, program_name="DEV", project_code="test")
fence = Fence()
indexd = Indexd()
login_page = LoginPage()
submission = SubmissionPage()
created_guids = []
@classmethod
def setup_class(cls):
# Create the graph record for core_metadata_collection
cls.sd_tools.delete_all_records()
node_name = "core_metadata_collection"
cls.sd_tools.submit_new_record(node_name)
# Clear previously uploaded files
cls.indexd.clear_previous_upload_files(user="main_account")
cls.indexd.clear_previous_upload_files(user="user1_account")
cls.indexd.clear_previous_upload_files(user="indexing_account")
@classmethod
def teardown_class(cls):
cls.sd_tools.delete_all_records()
def setup_method(self, method):
# Create a local small file to upload. Store its size and hash
with open(file_path, "w") as file:
file.write(file_content)
# Create a local large file (size 7MB)
create_large_file(big_file_path, 7, text)
node_name = "core_metadata_collection"
self.sd_tools.submit_new_record(node_name)
def teardown_method(self, method):
os.remove(file_path)
os.remove(big_file_path)
# Delete all test records at the end of each test
self.sd_tools.delete_all_records()
# Delete all guids
self.indexd.delete_records(self.created_guids)
self.created_guids = []
def test_file_upload_and_download_via_api(self):
"""
Scenario: Test Upload and Download via api
Steps:
1. Get an upload url from fence
2. Verify metadata can't be linked to a file without hash and size
3. Upload a file to S3 using url
4. Verify indexd listener updates the record with correct hash and size
5. Link metadata to the file via sheepdog
6. Download the file via fence and check who can download
"""
file_size = os.path.getsize(file_path)
file_md5 = hashlib.md5(open(file_path, "rb").read()).hexdigest()
fence_upload_res = self.fence.get_url_for_data_upload(
file_name, "main_account"
).json()
file_guid = fence_upload_res["guid"]
self.created_guids.append(file_guid)
presigned_url = fence_upload_res["url"]
# Check blank record was created in indexd
file_record = FileRecord(
did=file_guid, props={"md5sum": file_md5, "file_size": file_size}
)
self.indexd.get_record(indexd_guid=file_record.did)
# fail to submit metadata for this file without hash and size
try:
file_type_node = self.sd_tools.get_file_record()
file_type_node.props["object_id"] = file_guid
file_type_node.props["file_size"] = file_size
file_type_node.props["md5sum"] = file_md5
self.sd_tools.submit_links_for_record(file_type_node)
self.sd_tools.submit_record(record=file_type_node)
except Exception as e:
assert (
"400" in f"{e}"
), f"Linking metadata to file without hash and size should not be possible."
# check that we CANNOT download the file (there is no URL in indexd yet)
signed_url_res = self.fence.create_signed_url(
id=file_guid, user="main_account", expected_status=404
)
assert (
"url" not in signed_url_res.content.decode()
), f"URL key is missing.\n{signed_url_res}"
# Upload the file to the S3 bucket using the presigned URL
self.fence.upload_file_using_presigned_url(presigned_url, file_path, file_size)
# wait for the indexd listener to add size, hashes and URL to the record
self.fence.wait_upload_file_updated_from_indexd_listener(
self.indexd, file_record
)
# Try downloading before linking metadata to the file. It should succeed for the uploader but fail for other users
# the uploader can now download the file
signed_url_res = self.fence.create_signed_url(
id=file_guid, user="main_account", expected_status=200
)
self.fence.check_file_equals(signed_url_res, file_content)
# a user who is not the uploader CANNOT download the file
signed_url_res = self.fence.create_signed_url(
id=file_guid, user="auxAcct2_account", expected_status=401
)
# submit metadata for this file
file_type_node = self.sd_tools.get_file_record()
file_type_node.props["object_id"] = file_guid
file_type_node.props["file_size"] = file_size
file_type_node.props["md5sum"] = file_md5
self.sd_tools.submit_links_for_record(file_type_node)
self.sd_tools.submit_record(record=file_type_node)
# a user who is not the uploader can now download the file
signed_url_res = self.fence.create_signed_url(
id=file_guid, user="auxAcct2_account", expected_status=200
)
self.fence.check_file_equals(signed_url_res, file_content)
def test_user_without_role_cannot_upload(self):
"""
Scenario: User without role can't upload
Steps:
1. Get an upload url from fence for a user that has no role.
2. No url should be returned from fence.
"""
fence_upload_res = self.fence.get_url_for_data_upload(
file_name, "auxAcct1_account"
)
assert (
"url" not in fence_upload_res.content.decode()
), f"URL key is missing.\n{fence_upload_res}"
assert (
fence_upload_res.status_code == 403
), f"This user should not be able to download.\n{fence_upload_res.content}"
def test_data_file_deletion(self):
"""
Scenario: Test Upload and Download via api
Steps:
1. Get an upload url from fence
2. Upload a file to S3 using url
3. Verify indexd listener updates the record with correct hash and size
4. Check that a user who is not the uploader cannot delete the file
5. Delete the file
6. Verify metadata can't be linked to file after delete
7. Verify signed url can't be created now
"""
file_size = os.path.getsize(file_path)
file_md5 = hashlib.md5(open(file_path, "rb").read()).hexdigest()
fence_upload_res = self.fence.get_url_for_data_upload(
file_name, "main_account"
).json()
file_guid = fence_upload_res["guid"]
self.created_guids.append(file_guid)
presigned_url = fence_upload_res["url"]
# Upload the file to the S3 bucket using the presigned URL
self.fence.upload_file_using_presigned_url(presigned_url, file_path, file_size)
file_record = FileRecord(
did=file_guid, props={"md5sum": file_md5, "file_size": file_size}
)
# wait for the indexd listener to add size, hashes and URL to the record
self.fence.wait_upload_file_updated_from_indexd_listener(
self.indexd, file_record
)
# check that a user who is not the uploader cannot delete the file
record = self.indexd.get_record(self.created_guids[-1])
rev = record.get("rev", None)
response = self.indexd.delete_record_via_api(
guid=self.created_guids[-1], rev=rev, user="auxAcct2_account"
)
assert (
response == 401
), "File deletion from user who is not file uploader should not be possible"
# delete the file
response = self.fence.delete_file(
guid=self.created_guids[-1], user="main_account"
)
assert response == 204, f"File not deleted. Response : {response}"
# no metadata linking after delete
try:
file_record = self.sd_tools.get_file_record()
file_record.props["object_id"] = file_guid
file_record.props["file_size"] = file_size
file_record.props["md5sum"] = file_md5
self.sd_tools.submit_links_for_record(file_record)
self.sd_tools.submit_record(record=file_record)
except Exception as e:
assert (
"400" in f"{e}"
), f"Linking metadata to file without hash and size should not be possible.\n{metadata_response}"
# no download after delete
self.fence.create_signed_url(
id=file_guid, user="main_account", expected_status=404
)
def test_upload_the_same_file_twice(self):
"""
Scenario: Upload the same file twice
Steps:
1. Get an upload url from fence
2. Upload a file to S3 using url
3. Verify indexd listener updates the record with correct hash and size
4. Submit metadata for the file
5. Check the file can be downloaded
6. Repeat step 1-3 again for same file.
7. Submit metadata with Create New Parents options
8. Verify the file can be downloaded
"""
file_size = os.path.getsize(file_path)
file_md5 = hashlib.md5(open(file_path, "rb").read()).hexdigest()
# First Attempt to Upload file
fence_upload_res = self.fence.get_url_for_data_upload(
file_name, "main_account"
).json()
file_guid = fence_upload_res["guid"]
self.created_guids.append(file_guid)
presigned_url = fence_upload_res["url"]
# Upload the file to the S3 bucket using the presigned URL
self.fence.upload_file_using_presigned_url(presigned_url, file_path, file_size)
file_record = FileRecord(
did=file_guid, props={"md5sum": file_md5, "file_size": file_size}
)
# wait for the indexd listener to add size, hashes and URL to the record
self.fence.wait_upload_file_updated_from_indexd_listener(
self.indexd, file_record
)
# submit metadata for this file
file_type_node = self.sd_tools.get_file_record()
file_type_node.props["object_id"] = file_guid
file_type_node.props["file_size"] = file_size
file_type_node.props["md5sum"] = file_md5
self.sd_tools.submit_links_for_record(file_type_node)
self.sd_tools.submit_record(record=file_type_node)
# check that the file can be downloaded
signed_url_res = self.fence.create_signed_url(
id=file_guid, user="auxAcct2_account", expected_status=200
)
self.fence.check_file_equals(signed_url_res, file_content)
# Second Attempt to Upload file
fence_upload_res = self.fence.get_url_for_data_upload(
file_name, "main_account"
).json()
file_guid = fence_upload_res["guid"]
self.created_guids.append(file_guid)
presigned_url = fence_upload_res["url"]
# Upload the file to the S3 bucket using the presigned URL
self.fence.upload_file_using_presigned_url(presigned_url, file_path, file_size)
# wait for the indexd listener to add size, hashes and URL to the record
self.fence.wait_upload_file_updated_from_indexd_listener(
self.indexd, file_record
)
# submit metadata for this file
# `createNewParents=True` creates new nodes to avoid conflicts with the nodes already submitted by the
file_type_node = self.sd_tools.get_file_record()
file_type_node.props["object_id"] = file_guid
file_type_node.props["file_size"] = file_size
file_type_node.props["md5sum"] = file_md5
file_type_node.props["submitter_id"] = "submitter_id_new_value"
self.sd_tools.submit_links_for_record(file_type_node, new_submitter_ids=True)
self.sd_tools.submit_record(record=file_type_node)
# check that the file can be downloaded
signed_url_res = self.fence.create_signed_url(
id=file_guid, user="auxAcct2_account", expected_status=200
)
self.fence.check_file_equals(signed_url_res, file_content)
def test_file_upload_with_consent_codes(self):
"""
Scenario: File upload with consent codes
Steps:
1. Get an upload url from fence
2. Verify metadata can't be linked to a file without hash and size
3. Upload a file to S3 using url
4. Verify indexd listener updates the record with correct hash and size
5. Link metadata to the file via sheepdog
6. Download the file via fence and check who can download
"""
metadata = self.sd_tools.get_file_record()
if "consent_codes" not in metadata.props.keys():
pytest.skip(
"Skipping consent code tests since dictionary does not have them"
)
file_size = os.path.getsize(file_path)
file_md5 = hashlib.md5(open(file_path, "rb").read()).hexdigest()
fence_upload_res = self.fence.get_url_for_data_upload(
file_name, "main_account"
).json()
file_guid = fence_upload_res["guid"]
self.created_guids.append(file_guid)
presigned_url = fence_upload_res["url"]
# Check blank record was created in indexd
file_record = FileRecord(
did=file_guid, props={"md5sum": file_md5, "file_size": file_size}
)
self.indexd.get_record(indexd_guid=file_record.did)
# Upload the file to the S3 bucket using the presigned URL
self.fence.upload_file_using_presigned_url(presigned_url, file_path, file_size)
# wait for the indexd listener to add size, hashes and URL to the record
self.fence.wait_upload_file_updated_from_indexd_listener(
self.indexd, file_record
)
# submit metadata for this file
file_type_node = self.sd_tools.get_file_record()
file_type_node.props["object_id"] = file_guid
file_type_node.props["file_size"] = file_size
file_type_node.props["md5sum"] = file_md5
file_type_node.props["consent_codes"] = ["cc1", "cc_2"]
self.sd_tools.submit_links_for_record(file_type_node)
self.sd_tools.submit_record(record=file_type_node)
file_record_with_ccs = FileRecordWithCCs(
did=file_guid,
props={"md5sum": file_md5, "file_size": file_size},
authz=["/consents/cc1", "/consents/cc_2"],
)
self.fence.wait_upload_file_updated_from_indexd_listener(
self.indexd, file_record_with_ccs
)
def test_successful_multipart_upload(self):
"""
Scenario: Successful multipart upload
Steps:
1. Generate a 7MB file.
2. Perform an initialize multipart upload for the file.
3. Split the file data into 2 parts.
4. Generate url for multipart upload.
5. Upload the data using the fence presigned url.
6. Complete the multipart upload.
7. Create a signed url using the same guid id as in previous steps.
8. Verify the contents of the file are correct.
"""
# Generate a 7MB file.
file_size = os.path.getsize(big_file_path)
file_md5 = hashlib.md5(open(big_file_path, "rb").read()).hexdigest()
with open(big_file_path, "r") as file:
file_contents = file.read()
# Split the file data into 2 parts.
five_mb_length = math.floor(len(file_contents * 5) / 7)
big_file_parts = {
1: file_contents[0:five_mb_length],
2: file_contents[five_mb_length:],
}
# Perform an initialize multipart upload for the file.
init_multipart_upload_res = self.fence.initialize_multipart_upload(
big_file_name, user="main_account"
)
assert (
"guid" in init_multipart_upload_res.keys()
), f"Expected guid key not found. {init_multipart_upload_res}"
assert (
"uploadId" in init_multipart_upload_res.keys()
), f"Expected uploadId key not found. {init_multipart_upload_res}"
file_guid = init_multipart_upload_res["guid"]
self.created_guids.append(file_guid)
key = f"{file_guid}/{big_file_name}"
parts_summary = []
for part_number, val in big_file_parts.items():
# Generate url for multipart upload.
multipart_upload_res = self.fence.get_url_for_multipart_upload(
key=key,
upload_id=init_multipart_upload_res["uploadId"],
part_number=part_number,
user="main_account",
)
# Upload the data using the fence presigned url.
etag = self.fence.upload_data_using_presigned_url(
presigned_url=multipart_upload_res["presigned_url"], file_data=val
)
parts_summary.append({"PartNumber": part_number, "ETag": etag})
# Complete the multipart upload.
self.fence.complete_mulitpart_upload(
key=key,
upload_id=init_multipart_upload_res["uploadId"],
parts=parts_summary,
user="main_account",
)
file_record = FileRecord(
did=file_guid, props={"md5sum": file_md5, "file_size": file_size}
)
self.fence.wait_upload_file_updated_from_indexd_listener(
self.indexd, file_record
)
# Create a signed url using the same guid id as in previous steps.
signed_url_res = self.fence.create_signed_url(
id=file_guid, user="main_account", expected_status=200
)
# Verify the contents of the file are correct.
self.fence.check_file_equals(signed_url_res, file_contents)
def test_failed_multipart_upload(self):
"""
Scenario: Failed multipart upload
Steps:
1. Generate a 7MB file.
2. Perform an initialize multipart upload for the file.
3. Split the file data into 2 parts.
4. Generate url for multipart upload.
5. Upload the data using the fence presigned url.
6. Complete the multipart upload using a fake ETag, which should fail.
7. Create a signed url using the same guid id as in previous steps, which shouldn't get created.
"""
# Generate a 7MB file.
with open(big_file_path, "r") as file:
file_contents = file.read()
# Split the file data into 2 parts.
five_mb_length = math.floor(len(file_contents * 5) / 7)
big_file_parts = {
1: file_contents[0:five_mb_length],
2: file_contents[five_mb_length:],
}
# Perform an initialize multipart upload for the file.
init_multipart_upload_res = self.fence.initialize_multipart_upload(
big_file_name, user="main_account"
)
assert (
"guid" in init_multipart_upload_res.keys()
), f"Expected guid key not found. {init_multipart_upload_res}"
assert (
"uploadId" in init_multipart_upload_res.keys()
), f"Expected uploadId key not found. {init_multipart_upload_res}"
file_guid = init_multipart_upload_res["guid"]
self.created_guids.append(file_guid)
key = f"{file_guid}/{big_file_name}"
parts_summary = []
for part_number, val in big_file_parts.items():
# Generate url for multipart upload.
multipart_upload_res = self.fence.get_url_for_multipart_upload(
key=key,
upload_id=init_multipart_upload_res["uploadId"],
part_number=part_number,
user="main_account",
)
# Upload the data using the fence presigned url.
etag = self.fence.upload_data_using_presigned_url(
presigned_url=multipart_upload_res["presigned_url"], file_data=val
)
parts_summary.append({"PartNumber": part_number, "ETag": f"{etag}fake"})
# Complete the multipart upload using a fake ETag, which should fail.
self.fence.complete_mulitpart_upload(
key=key,
upload_id=init_multipart_upload_res["uploadId"],
parts=parts_summary,
user="main_account",
expected_status=504,
)
# Create a signed url using the same guid id as in previous steps, which shouldn't get created.
self.fence.create_signed_url(
id=file_guid, user="main_account", expected_status=404
)
@pytest.mark.portal
def test_map_uploaded_files_in_submission_page(self, page: Page):
"""
Scenario: Map uploaded files in windmill submission page
Steps:
1. Create a presigned url for uploading the file with main_account
2. Goto submission page and verify "1 files | 0 B" entry is available under unmapped files section
3. Upload the file using the presigned url
4. Goto submission page and verify "1 files | 128 B" entry is available under unmapped files section
5. Perform mapping by going to submission/files endpoint
6. Verify no files are present under unmapped files section
"""
file_object = {
"file_name": file_name,
"file_path": file_path,
"file_size": os.path.getsize(file_path),
"file_md5": hashlib.md5(file_content.encode()).hexdigest(),
}
fence_upload_res = self.fence.get_url_for_data_upload(
file_name, "main_account"
).json()
assert (
"url" in fence_upload_res.keys()
), f"Expected guid key not found. {fence_upload_res}"
file_guid = fence_upload_res["guid"]
self.created_guids.append(file_guid)
presigned_url = fence_upload_res["url"]
logger.info(file_guid)
logger.info(presigned_url)
if "midrc" not in pytest.namespace:
self.login_page.go_to(page)
self.login_page.login(page)
# user should see 1 file, but not ready yet
self.submission.check_unmapped_files_submission_page(
page, text="1 files | 0 B"
)
self.fence.upload_file_using_presigned_url(
presigned_url, file_object, file_object["file_size"]
)
# user should see 1 file ready
time.sleep(30)
self.login_page.go_to(page)
self.submission.check_unmapped_files_submission_page(
page, text=f"1 files | 128 B"
)
# Perform mapping
self.submission.map_files(page)
self.submission.select_submission_fields(page)
# user should see 0 file ready
self.submission.check_unmapped_files_submission_page(
page, text="0 files | 0 B"
)
self.login_page.logout(page)
@pytest.mark.portal
def test_cannot_see_files_uploaded_by_other_users(self, page: Page):
"""
Scenario: Cannot see files uploaded by other users
Steps:
1. Create a presigned url for uploading the file with user1_account
2. Upload the file using the presigned url
3. Goto submission page and verify no files are present under unmapped files.
"""
file_object = {
"file_name": file_name,
"file_path": file_path,
"file_size": os.path.getsize(file_path),
"file_md5": hashlib.md5(file_content.encode()).hexdigest(),
}
fence_upload_res = self.fence.get_url_for_data_upload(
file_name, "user1_account"
).json()
assert (
"url" in fence_upload_res.keys()
), f"Expected guid key not found. {fence_upload_res}"
file_guid = fence_upload_res["guid"]
self.created_guids.append(file_guid)
presigned_url = fence_upload_res["url"]
# Upload the file using user1_accounts presgined url
self.fence.upload_file_using_presigned_url(
presigned_url, file_object, file_object["file_size"]
)
self.login_page.go_to(page)
self.login_page.login(page)
self.submission.check_unmapped_files_submission_page(page, text="0 files | 0 B")
self.login_page.logout(page)