Skip to content

Commit a6396a4

Browse files
Bump tests/specifications from 9058491 to 34f9a57 (#1509)
* Bump tests/specifications from `9058491` to `34f9a57` Bumps [tests/specifications](https://github.com/mongodb/specifications) from `9058491` to `34f9a57`. - [Release notes](https://github.com/mongodb/specifications/releases) - [Commits](mongodb/specifications@9058491...34f9a57) --- updated-dependencies: - dependency-name: tests/specifications dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * DRIVERS-3023 Add spec tests for GridFS Bucket rename (#1507) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jérôme Tamarelle <[email protected]>
1 parent f9dd433 commit a6396a4

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

tests/UnifiedSpecTests/Operation.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,15 @@ private function executeForBucket(Bucket $bucket)
803803

804804
return stream_get_contents($bucket->openDownloadStream($args['id']));
805805

806+
case 'rename':
807+
assertArrayHasKey('id', $args);
808+
assertArrayHasKey('newFilename', $args);
809+
assertIsString($args['newFilename']);
810+
811+
$bucket->rename($args['id'], $args['newFilename']);
812+
813+
return null;
814+
806815
case 'uploadWithId':
807816
assertArrayHasKey('id', $args);
808817
$args['_id'] = $args['id'];

tests/UnifiedSpecTests/Util.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ final class Util
134134
'delete' => ['id'],
135135
'downloadByName' => ['filename', 'revision'],
136136
'download' => ['id'],
137+
'rename' => ['id', 'newFilename'],
137138
'uploadWithId' => ['id', 'filename', 'source', 'chunkSizeBytes', 'disableMD5', 'contentType', 'metadata'],
138139
'upload' => ['filename', 'source', 'chunkSizeBytes', 'disableMD5', 'contentType', 'metadata'],
139140
],

0 commit comments

Comments
 (0)