Skip to content

Commit

Permalink
disableMD5 option is allowed in the spec, but ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Oct 30, 2024
1 parent 3317992 commit 2cd6387
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/UnifiedSpecTests/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ private function createSession(string $id, stdClass $o): void

private function createBucket(string $id, stdClass $o): void
{
Util::assertHasOnlyKeys($o, ['id', 'database', 'bucketOptions']);
Util::assertHasOnlyKeys($o, ['id', 'database', 'bucketOptions', 'disableMD5']);

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

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

if (array_key_exists('bucketName', $options)) {
assertIsString($options['bucketName']);
Expand Down
4 changes: 0 additions & 4 deletions tests/UnifiedSpecTests/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -769,10 +769,6 @@ private function executeForSession(Session $session)
private function executeForBucket(Bucket $bucket)
{
$args = $this->prepareArguments();

// "md5" field is removed from the spec, option "disableMD5" is ignored
unset($args['disableMD5']);

Util::assertArgumentsBySchema(Bucket::class, $this->name, $args);

switch ($this->name) {
Expand Down
4 changes: 2 additions & 2 deletions tests/UnifiedSpecTests/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ final class Util
'delete' => ['id'],
'downloadByName' => ['filename', 'revision'],
'download' => ['id'],
'uploadWithId' => ['id', 'filename', 'source', 'chunkSizeBytes', 'metadata'],
'upload' => ['filename', 'source', 'chunkSizeBytes', 'metadata'],
'uploadWithId' => ['id', 'filename', 'source', 'chunkSizeBytes', 'disableMD5', 'metadata'],
'upload' => ['filename', 'source', 'chunkSizeBytes', 'disableMD5', 'metadata'],
],
];

Expand Down

0 comments on commit 2cd6387

Please sign in to comment.