Skip to content

Commit 2cd6387

Browse files
committed
disableMD5 option is allowed in the spec, but ignored
1 parent 3317992 commit 2cd6387

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

tests/UnifiedSpecTests/Context.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ private function createSession(string $id, stdClass $o): void
463463

464464
private function createBucket(string $id, stdClass $o): void
465465
{
466-
Util::assertHasOnlyKeys($o, ['id', 'database', 'bucketOptions']);
466+
Util::assertHasOnlyKeys($o, ['id', 'database', 'bucketOptions', 'disableMD5']);
467467

468468
$databaseId = $o->database ?? null;
469469
assertIsString($databaseId);
@@ -499,7 +499,7 @@ private static function prepareCollectionOrDatabaseOptions(array $options): arra
499499

500500
private static function prepareBucketOptions(array $options): array
501501
{
502-
Util::assertHasOnlyKeys($options, ['bucketName', 'chunkSizeBytes', 'readConcern', 'readPreference', 'writeConcern']);
502+
Util::assertHasOnlyKeys($options, ['bucketName', 'chunkSizeBytes', 'disableMD5', 'readConcern', 'readPreference', 'writeConcern']);
503503

504504
if (array_key_exists('bucketName', $options)) {
505505
assertIsString($options['bucketName']);

tests/UnifiedSpecTests/Operation.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -769,10 +769,6 @@ private function executeForSession(Session $session)
769769
private function executeForBucket(Bucket $bucket)
770770
{
771771
$args = $this->prepareArguments();
772-
773-
// "md5" field is removed from the spec, option "disableMD5" is ignored
774-
unset($args['disableMD5']);
775-
776772
Util::assertArgumentsBySchema(Bucket::class, $this->name, $args);
777773

778774
switch ($this->name) {

tests/UnifiedSpecTests/Util.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ final class Util
134134
'delete' => ['id'],
135135
'downloadByName' => ['filename', 'revision'],
136136
'download' => ['id'],
137-
'uploadWithId' => ['id', 'filename', 'source', 'chunkSizeBytes', 'metadata'],
138-
'upload' => ['filename', 'source', 'chunkSizeBytes', 'metadata'],
137+
'uploadWithId' => ['id', 'filename', 'source', 'chunkSizeBytes', 'disableMD5', 'metadata'],
138+
'upload' => ['filename', 'source', 'chunkSizeBytes', 'disableMD5', 'metadata'],
139139
],
140140
];
141141

0 commit comments

Comments
 (0)