Skip to content

Commit 74ce953

Browse files
committed
Update spec test paths
1 parent bdb64a7 commit 74ce953

File tree

1 file changed

+32
-22
lines changed

1 file changed

+32
-22
lines changed

tests/UnifiedSpecTests/UnifiedSpecTest.php

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,16 @@ class UnifiedSpecTest extends FunctionalTestCase
178178
'valid-pass/entity-commandCursor: runCursorCommand creates and exhausts cursor by running getMores' => 'commandCursor API is not yet implemented (PHPLIB-1077)',
179179
'valid-pass/entity-commandCursor: createCommandCursor creates a cursor and stores it as an entity that can be iterated one document at a time' => 'commandCursor API is not yet implemented (PHPLIB-1077)',
180180
'valid-pass/entity-commandCursor: createCommandCursor\'s cursor can be closed and will perform a killCursors operation' => 'commandCursor API is not yet implemented (PHPLIB-1077)',
181+
'run-command/runCursorCommand: successfully executes checkMetadataConsistency cursor creating command' => 'commandCursor API is not yet implemented (PHPLIB-1077)',
182+
'run-command/runCursorCommand: errors if the command response is not a cursor' => 'commandCursor API is not yet implemented (PHPLIB-1077)',
183+
'run-command/runCursorCommand: creates an implicit session that is reused across getMores' => 'commandCursor API is not yet implemented (PHPLIB-1077)',
184+
'run-command/runCursorCommand: accepts an explicit session that is reused across getMores' => 'commandCursor API is not yet implemented (PHPLIB-1077)',
185+
'run-command/runCursorCommand: returns pinned connections to the pool when the cursor is exhausted' => 'commandCursor API is not yet implemented (PHPLIB-1077)',
186+
'run-command/runCursorCommand: returns pinned connections to the pool when the cursor is closed' => 'commandCursor API is not yet implemented (PHPLIB-1077)',
187+
'run-command/runCursorCommand: supports configuring getMore batchSize' => 'commandCursor API is not yet implemented (PHPLIB-1077)',
188+
'run-command/runCursorCommand: supports configuring getMore maxTimeMS' => 'commandCursor API is not yet implemented (PHPLIB-1077)',
189+
'run-command/runCursorCommand: supports configuring getMore comment' => 'commandCursor API is not yet implemented (PHPLIB-1077)',
190+
'run-command/runCursorCommand: does not close the cursor when receiving an empty batch' => 'commandCursor API is not yet implemented (PHPLIB-1077)',
181191
// libmongoc always adds readConcern to aggregate command
182192
'index-management/search index operations ignore read and write concern: listSearchIndexes ignores read and write concern' => 'libmongoc appends readConcern to aggregate command',
183193
];
@@ -229,7 +239,7 @@ public function testAtlasDataLake(UnifiedTestCase $test): void
229239

230240
public static function provideAtlasDataLakeTests(): Generator
231241
{
232-
return self::provideTests('atlas-data-lake');
242+
return self::provideTests('atlas-data-lake-testing/tests/unified', 'atlas-data-lake');
233243
}
234244

235245
#[DataProvider('provideChangeStreamsTests')]
@@ -241,7 +251,7 @@ public function testChangeStreams(UnifiedTestCase $test): void
241251

242252
public static function provideChangeStreamsTests(): Generator
243253
{
244-
return self::provideTests('change-streams');
254+
return self::provideTests('change-streams/tests/unified', 'change-streams');
245255
}
246256

247257
#[DataProvider('provideClientSideEncryptionTests')]
@@ -254,7 +264,7 @@ public function testClientSideEncryption(UnifiedTestCase $test): void
254264

255265
public static function provideClientSideEncryptionTests(): Generator
256266
{
257-
return self::provideTests('client-side-encryption');
267+
return self::provideTests('client-side-encryption/tests/unified', 'client-side-encryption');
258268
}
259269

260270
#[DataProvider('provideCollectionManagementTests')]
@@ -266,7 +276,7 @@ public function testCollectionManagement(UnifiedTestCase $test): void
266276

267277
public static function provideCollectionManagementTests(): Generator
268278
{
269-
return self::provideTests('collection-management');
279+
return self::provideTests('collection-management/tests', 'collection-management');
270280
}
271281

272282
#[DataProvider('provideCommandMonitoringTests')]
@@ -278,7 +288,7 @@ public function testCommandMonitoring(UnifiedTestCase $test): void
278288

279289
public static function provideCommandMonitoringTests(): Generator
280290
{
281-
return self::provideTests('command-monitoring');
291+
return self::provideTests('command-logging-and-monitoring/tests/monitoring', 'command-monitoring');
282292
}
283293

284294
#[DataProvider('provideCrudTests')]
@@ -290,7 +300,7 @@ public function testCrud(UnifiedTestCase $test): void
290300

291301
public static function provideCrudTests(): Generator
292302
{
293-
return self::provideTests('crud');
303+
return self::provideTests('crud/tests/unified', 'crud');
294304
}
295305

296306
#[DataProvider('provideGridFSTests')]
@@ -302,7 +312,7 @@ public function testGridFS(UnifiedTestCase $test): void
302312

303313
public static function provideGridFSTests(): Generator
304314
{
305-
return self::provideTests('gridfs');
315+
return self::provideTests('gridfs/tests', 'gridfs');
306316
}
307317

308318
#[DataProvider('provideLoadBalancers')]
@@ -314,7 +324,7 @@ public function testLoadBalancers(UnifiedTestCase $test): void
314324

315325
public static function provideLoadBalancers(): Generator
316326
{
317-
return self::provideTests('load-balancers');
327+
return self::provideTests('load-balancers/tests', 'load-balancers');
318328
}
319329

320330
#[DataProvider('provideReadWriteConcernTests')]
@@ -325,7 +335,7 @@ public function testReadWriteConcern(UnifiedTestCase $test): void
325335

326336
public static function provideReadWriteConcernTests(): Generator
327337
{
328-
return self::provideTests('read-write-concern');
338+
return self::provideTests('read-write-concern/tests/operation', 'read-write-concern');
329339
}
330340

331341
#[DataProvider('provideRetryableReadsTests')]
@@ -337,7 +347,7 @@ public function testRetryableReads(UnifiedTestCase $test): void
337347

338348
public static function provideRetryableReadsTests(): Generator
339349
{
340-
return self::provideTests('retryable-reads');
350+
return self::provideTests('retryable-reads/tests/unified', 'retryable-reads');
341351
}
342352

343353
#[DataProvider('provideRetryableWritesTests')]
@@ -349,7 +359,7 @@ public function testRetryableWrites(UnifiedTestCase $test): void
349359

350360
public static function provideRetryableWritesTests(): Generator
351361
{
352-
return self::provideTests('retryable-writes');
362+
return self::provideTests('retryable-writes/tests/unified', 'retryable-writes');
353363
}
354364

355365
#[DataProvider('provideRunCommandTests')]
@@ -361,7 +371,7 @@ public function testRunCommand(UnifiedTestCase $test): void
361371

362372
public static function provideRunCommandTests(): Generator
363373
{
364-
return self::provideTests('run-command');
374+
return self::provideTests('run-command/tests/unified', 'run-command');
365375
}
366376

367377
#[DataProvider('provideSessionsTests')]
@@ -373,7 +383,7 @@ public function testSessions(UnifiedTestCase $test): void
373383

374384
public static function provideSessionsTests(): Generator
375385
{
376-
return self::provideTests('sessions');
386+
return self::provideTests('sessions/tests', 'sessions');
377387
}
378388

379389
#[DataProvider('provideTransactionsTests')]
@@ -385,7 +395,7 @@ public function testTransactions(UnifiedTestCase $test): void
385395

386396
public static function provideTransactionsTests(): Generator
387397
{
388-
return self::provideTests('transactions');
398+
return self::provideTests('transactions/tests/unified', 'transactions');
389399
}
390400

391401
#[DataProvider('provideTransactionsConvenientApiTests')]
@@ -396,7 +406,7 @@ public function testTransactionsConvenientApi(UnifiedTestCase $test): void
396406

397407
public static function provideTransactionsConvenientApiTests(): Generator
398408
{
399-
return self::provideTests('transactions-convenient-api');
409+
return self::provideTests('transactions-convenient-api/tests/unified', 'transactions-convenient-api');
400410
}
401411

402412
#[DataProvider('provideVersionedApiTests')]
@@ -409,7 +419,7 @@ public function testVersionedApi(UnifiedTestCase $test): void
409419

410420
public static function provideVersionedApiTests(): Generator
411421
{
412-
return self::provideTests('versioned-api');
422+
return self::provideTests('versioned-api/tests', 'versioned-api');
413423
}
414424

415425
#[DataProvider('providePassingTests')]
@@ -420,7 +430,7 @@ public function testPassingTests(UnifiedTestCase $test): void
420430

421431
public static function providePassingTests(): Generator
422432
{
423-
yield from self::provideTests('valid-pass');
433+
yield from self::provideTests('unified-test-format/tests/valid-pass', 'valid-pass');
424434
}
425435

426436
#[DataProvider('provideFailingTests')]
@@ -458,7 +468,7 @@ public function testFailingTests(UnifiedTestCase $test): void
458468

459469
public static function provideFailingTests(): Generator
460470
{
461-
yield from self::provideTests('valid-fail');
471+
yield from self::provideTests('unified-test-format/tests/valid-fail', 'valid-fail');
462472
}
463473

464474
#[DataProvider('provideIndexManagementTests')]
@@ -477,18 +487,18 @@ public function testIndexManagement(UnifiedTestCase $test): void
477487

478488
public static function provideIndexManagementTests(): Generator
479489
{
480-
yield from self::provideTests('index-management');
490+
yield from self::provideTests('index-management/tests', 'index-management');
481491
}
482492

483-
private static function provideTests(string $directory): Generator
493+
private static function provideTests(string $directory, ?string $group = null): Generator
484494
{
485495
$pattern = self::$testDir . '/' . $directory . '/*.json';
486496

487497
foreach (glob($pattern) as $filename) {
488-
$group = basename(dirname($filename));
498+
$testGroup = $group ?? dirname(basename($filename));
489499

490500
foreach (UnifiedTestCase::fromFile($filename) as $name => $test) {
491-
yield $group . '/' . $name => [$test];
501+
yield $testGroup . '/' . $name => [$test];
492502
}
493503
}
494504
}

0 commit comments

Comments
 (0)