Skip to content

Commit c1adc27

Browse files
committed
test: sync gridfs tests
1 parent 742736d commit c1adc27

File tree

8 files changed

+18
-257
lines changed

8 files changed

+18
-257
lines changed

test/spec/gridfs/delete.json

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,7 @@
4949
"uploadDate": {
5050
"$date": "1970-01-01T00:00:00.000Z"
5151
},
52-
"md5": "d41d8cd98f00b204e9800998ecf8427e",
5352
"filename": "length-0",
54-
"contentType": "application/octet-stream",
55-
"aliases": [],
5653
"metadata": {}
5754
},
5855
{
@@ -64,10 +61,7 @@
6461
"uploadDate": {
6562
"$date": "1970-01-01T00:00:00.000Z"
6663
},
67-
"md5": "d41d8cd98f00b204e9800998ecf8427e",
6864
"filename": "length-0-with-empty-chunk",
69-
"contentType": "application/octet-stream",
70-
"aliases": [],
7165
"metadata": {}
7266
},
7367
{
@@ -79,10 +73,7 @@
7973
"uploadDate": {
8074
"$date": "1970-01-01T00:00:00.000Z"
8175
},
82-
"md5": "c700ed4fdb1d27055aa3faa2c2432283",
8376
"filename": "length-2",
84-
"contentType": "application/octet-stream",
85-
"aliases": [],
8677
"metadata": {}
8778
},
8879
{
@@ -94,10 +85,7 @@
9485
"uploadDate": {
9586
"$date": "1970-01-01T00:00:00.000Z"
9687
},
97-
"md5": "dd254cdc958e53abaa67da9f797125f5",
9888
"filename": "length-8",
99-
"contentType": "application/octet-stream",
100-
"aliases": [],
10189
"metadata": {}
10290
}
10391
]
@@ -197,10 +185,7 @@
197185
"uploadDate": {
198186
"$date": "1970-01-01T00:00:00.000Z"
199187
},
200-
"md5": "d41d8cd98f00b204e9800998ecf8427e",
201188
"filename": "length-0-with-empty-chunk",
202-
"contentType": "application/octet-stream",
203-
"aliases": [],
204189
"metadata": {}
205190
},
206191
{
@@ -212,10 +197,7 @@
212197
"uploadDate": {
213198
"$date": "1970-01-01T00:00:00.000Z"
214199
},
215-
"md5": "c700ed4fdb1d27055aa3faa2c2432283",
216200
"filename": "length-2",
217-
"contentType": "application/octet-stream",
218-
"aliases": [],
219201
"metadata": {}
220202
},
221203
{
@@ -227,10 +209,7 @@
227209
"uploadDate": {
228210
"$date": "1970-01-01T00:00:00.000Z"
229211
},
230-
"md5": "dd254cdc958e53abaa67da9f797125f5",
231212
"filename": "length-8",
232-
"contentType": "application/octet-stream",
233-
"aliases": [],
234213
"metadata": {}
235214
}
236215
]
@@ -330,10 +309,7 @@
330309
"uploadDate": {
331310
"$date": "1970-01-01T00:00:00.000Z"
332311
},
333-
"md5": "d41d8cd98f00b204e9800998ecf8427e",
334312
"filename": "length-0",
335-
"contentType": "application/octet-stream",
336-
"aliases": [],
337313
"metadata": {}
338314
},
339315
{
@@ -345,10 +321,7 @@
345321
"uploadDate": {
346322
"$date": "1970-01-01T00:00:00.000Z"
347323
},
348-
"md5": "c700ed4fdb1d27055aa3faa2c2432283",
349324
"filename": "length-2",
350-
"contentType": "application/octet-stream",
351-
"aliases": [],
352325
"metadata": {}
353326
},
354327
{
@@ -360,10 +333,7 @@
360333
"uploadDate": {
361334
"$date": "1970-01-01T00:00:00.000Z"
362335
},
363-
"md5": "dd254cdc958e53abaa67da9f797125f5",
364336
"filename": "length-8",
365-
"contentType": "application/octet-stream",
366-
"aliases": [],
367337
"metadata": {}
368338
}
369339
]
@@ -448,10 +418,7 @@
448418
"uploadDate": {
449419
"$date": "1970-01-01T00:00:00.000Z"
450420
},
451-
"md5": "d41d8cd98f00b204e9800998ecf8427e",
452421
"filename": "length-0",
453-
"contentType": "application/octet-stream",
454-
"aliases": [],
455422
"metadata": {}
456423
},
457424
{
@@ -463,10 +430,7 @@
463430
"uploadDate": {
464431
"$date": "1970-01-01T00:00:00.000Z"
465432
},
466-
"md5": "d41d8cd98f00b204e9800998ecf8427e",
467433
"filename": "length-0-with-empty-chunk",
468-
"contentType": "application/octet-stream",
469-
"aliases": [],
470434
"metadata": {}
471435
},
472436
{
@@ -478,10 +442,7 @@
478442
"uploadDate": {
479443
"$date": "1970-01-01T00:00:00.000Z"
480444
},
481-
"md5": "c700ed4fdb1d27055aa3faa2c2432283",
482445
"filename": "length-2",
483-
"contentType": "application/octet-stream",
484-
"aliases": [],
485446
"metadata": {}
486447
}
487448
]
@@ -536,7 +497,7 @@
536497
}
537498
},
538499
"expectError": {
539-
"isError": true
500+
"isClientError": true
540501
}
541502
}
542503
],
@@ -554,10 +515,7 @@
554515
"uploadDate": {
555516
"$date": "1970-01-01T00:00:00.000Z"
556517
},
557-
"md5": "d41d8cd98f00b204e9800998ecf8427e",
558518
"filename": "length-0",
559-
"contentType": "application/octet-stream",
560-
"aliases": [],
561519
"metadata": {}
562520
},
563521
{
@@ -569,10 +527,7 @@
569527
"uploadDate": {
570528
"$date": "1970-01-01T00:00:00.000Z"
571529
},
572-
"md5": "d41d8cd98f00b204e9800998ecf8427e",
573530
"filename": "length-0-with-empty-chunk",
574-
"contentType": "application/octet-stream",
575-
"aliases": [],
576531
"metadata": {}
577532
},
578533
{
@@ -584,10 +539,7 @@
584539
"uploadDate": {
585540
"$date": "1970-01-01T00:00:00.000Z"
586541
},
587-
"md5": "c700ed4fdb1d27055aa3faa2c2432283",
588542
"filename": "length-2",
589-
"contentType": "application/octet-stream",
590-
"aliases": [],
591543
"metadata": {}
592544
},
593545
{
@@ -599,10 +551,7 @@
599551
"uploadDate": {
600552
"$date": "1970-01-01T00:00:00.000Z"
601553
},
602-
"md5": "dd254cdc958e53abaa67da9f797125f5",
603554
"filename": "length-8",
604-
"contentType": "application/octet-stream",
605-
"aliases": [],
606555
"metadata": {}
607556
}
608557
]
@@ -701,7 +650,7 @@
701650
}
702651
},
703652
"expectError": {
704-
"isError": true
653+
"isClientError": true
705654
}
706655
}
707656
],
@@ -719,10 +668,7 @@
719668
"uploadDate": {
720669
"$date": "1970-01-01T00:00:00.000Z"
721670
},
722-
"md5": "d41d8cd98f00b204e9800998ecf8427e",
723671
"filename": "length-0",
724-
"contentType": "application/octet-stream",
725-
"aliases": [],
726672
"metadata": {}
727673
},
728674
{
@@ -734,10 +680,7 @@
734680
"uploadDate": {
735681
"$date": "1970-01-01T00:00:00.000Z"
736682
},
737-
"md5": "d41d8cd98f00b204e9800998ecf8427e",
738683
"filename": "length-0-with-empty-chunk",
739-
"contentType": "application/octet-stream",
740-
"aliases": [],
741684
"metadata": {}
742685
},
743686
{
@@ -749,10 +692,7 @@
749692
"uploadDate": {
750693
"$date": "1970-01-01T00:00:00.000Z"
751694
},
752-
"md5": "c700ed4fdb1d27055aa3faa2c2432283",
753695
"filename": "length-2",
754-
"contentType": "application/octet-stream",
755-
"aliases": [],
756696
"metadata": {}
757697
}
758698
]

test/spec/gridfs/delete.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,40 +30,28 @@ initialData:
3030
length: 0
3131
chunkSize: 4
3232
uploadDate: { "$date": "1970-01-01T00:00:00.000Z" }
33-
md5: "d41d8cd98f00b204e9800998ecf8427e"
3433
filename: "length-0"
35-
contentType: "application/octet-stream"
36-
aliases: []
3734
metadata: {}
3835
- &file2
3936
_id: { "$oid": "000000000000000000000002" }
4037
length: 0
4138
chunkSize: 4
4239
uploadDate: { "$date": "1970-01-01T00:00:00.000Z" }
43-
md5: "d41d8cd98f00b204e9800998ecf8427e"
4440
filename: "length-0-with-empty-chunk"
45-
contentType: "application/octet-stream"
46-
aliases: []
4741
metadata: {}
4842
- &file3
4943
_id: { "$oid": "000000000000000000000003" }
5044
length: 2
5145
chunkSize: 4
5246
uploadDate: { "$date": "1970-01-01T00:00:00.000Z" }
53-
md5: "c700ed4fdb1d27055aa3faa2c2432283"
5447
filename: "length-2"
55-
contentType: "application/octet-stream"
56-
aliases: []
5748
metadata: {}
5849
- &file4
5950
_id: { "$oid": "000000000000000000000004" }
6051
length: 8
6152
chunkSize: 4
6253
uploadDate: { "$date": "1970-01-01T00:00:00.000Z" }
63-
md5: "dd254cdc958e53abaa67da9f797125f5"
6454
filename: "length-8"
65-
contentType: "application/octet-stream"
66-
aliases: []
6755
metadata: {}
6856
- collectionName: *bucket0_chunks_collectionName
6957
databaseName: *database0Name
@@ -153,7 +141,7 @@ tests:
153141
object: *bucket0
154142
arguments:
155143
id: { $oid: "000000000000000000000000" }
156-
expectError: { isError: true } # FileNotFound
144+
expectError: { isClientError: true } # FileNotFound
157145
outcome:
158146
- collectionName: *bucket0_files_collectionName
159147
databaseName: *database0Name
@@ -182,7 +170,7 @@ tests:
182170
object: *bucket0
183171
arguments:
184172
id: { $oid: "000000000000000000000004" }
185-
expectError: { isError: true } # FileNotFound
173+
expectError: { isClientError: true } # FileNotFound
186174
outcome:
187175
- collectionName: *bucket0_files_collectionName
188176
databaseName: *database0Name

0 commit comments

Comments
 (0)