Skip to content

Commit 34f9a57

Browse files
authored
DRIVERS-3023 Add spec tests for GridFS rename and require client errors (#1700)
1 parent c51ca1a commit 34f9a57

File tree

8 files changed

+275
-18
lines changed

8 files changed

+275
-18
lines changed

source/gridfs/tests/delete.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/gridfs/tests/delete.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ tests:
141141
object: *bucket0
142142
arguments:
143143
id: { $oid: "000000000000000000000000" }
144-
expectError: { isError: true } # FileNotFound
144+
expectError: { isClientError: true } # FileNotFound
145145
outcome:
146146
- collectionName: *bucket0_files_collectionName
147147
databaseName: *database0Name
@@ -170,7 +170,7 @@ tests:
170170
object: *bucket0
171171
arguments:
172172
id: { $oid: "000000000000000000000004" }
173-
expectError: { isError: true } # FileNotFound
173+
expectError: { isClientError: true } # FileNotFound
174174
outcome:
175175
- collectionName: *bucket0_files_collectionName
176176
databaseName: *database0Name

source/gridfs/tests/download.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/gridfs/tests/download.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ tests:
139139
object: *bucket0
140140
arguments:
141141
id: { $oid: "000000000000000000000000" }
142-
expectError: { isError: true } # FileNotFound
142+
expectError: { isClientError: true } # FileNotFound
143143
- description: "download when an intermediate chunk is missing"
144144
operations:
145145
- name: deleteOne
@@ -154,7 +154,7 @@ tests:
154154
object: *bucket0
155155
arguments:
156156
id: { $oid: "000000000000000000000005" }
157-
expectError: { isError: true } # ChunkIsMissing
157+
expectError: { isClientError: true } # ChunkIsMissing
158158
- description: "download when final chunk is missing"
159159
operations:
160160
- name: deleteOne
@@ -169,7 +169,7 @@ tests:
169169
object: *bucket0
170170
arguments:
171171
id: { $oid: "000000000000000000000005" }
172-
expectError: { isError: true } # ChunkIsMissing
172+
expectError: { isClientError: true } # ChunkIsMissing
173173
- description: "download when an intermediate chunk is the wrong size"
174174
operations:
175175
- name: bulkWrite
@@ -195,7 +195,7 @@ tests:
195195
object: *bucket0
196196
arguments:
197197
id: { $oid: "000000000000000000000005" }
198-
expectError: { isError: true } # ChunkIsWrongSize
198+
expectError: { isClientError: true } # ChunkIsWrongSize
199199
- description: "download when final chunk is the wrong size"
200200
operations:
201201
- name: updateOne
@@ -213,7 +213,7 @@ tests:
213213
object: *bucket0
214214
arguments:
215215
id: { $oid: "000000000000000000000005" }
216-
expectError: { isError: true } # ChunkIsWrongSize
216+
expectError: { isClientError: true } # ChunkIsWrongSize
217217
- description: "download legacy file with no name"
218218
operations:
219219
- name: download

source/gridfs/tests/downloadByName.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/gridfs/tests/downloadByName.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ tests:
133133
object: *bucket0
134134
arguments:
135135
filename: "xyz"
136-
expectError: { isError: true } # FileNotFound
136+
expectError: { isClientError: true } # FileNotFound
137137
- description: "downloadByName when revision does not exist"
138138
operations:
139139
- name: downloadByName
140140
object: *bucket0
141141
arguments:
142142
filename: "abc"
143143
revision: 999
144-
expectError: { isError: true } # RevisionNotFound
144+
expectError: { isClientError: true } # RevisionNotFound

source/gridfs/tests/rename.json

Lines changed: 179 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)