diff --git a/.evergreen/config/functions.yml b/.evergreen/config/functions.yml index 470f7dc8e..3cb013b87 100644 --- a/.evergreen/config/functions.yml +++ b/.evergreen/config/functions.yml @@ -207,19 +207,6 @@ functions: TESTS=${TESTS} \ bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh - "run atlas data lake test": - - command: shell.exec - type: test - params: - working_dir: "src" - script: | - ${PREPARE_SHELL} - export PATH="${PHP_PATH}/bin:$PATH" - - MONGODB_URI="mongodb://mhuser:pencil@127.0.0.1:27017" \ - TESTS="atlas-data-lake" \ - bash ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh - "cleanup": - command: shell.exec params: diff --git a/.evergreen/config/generated/test-variant/modern-php-full.yml b/.evergreen/config/generated/test-variant/modern-php-full.yml index c267ec7d1..b10d7fdbb 100644 --- a/.evergreen/config/generated/test-variant/modern-php-full.yml +++ b/.evergreen/config/generated/test-variant/modern-php-full.yml @@ -18,7 +18,6 @@ buildvariants: - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - "test-atlas-data-lake" # Test MongoDB 5.0 and 6.0 - name: test-debian11-php-8.4-local @@ -77,7 +76,6 @@ buildvariants: - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - "test-atlas-data-lake" # Test MongoDB 5.0 and 6.0 - name: test-debian11-php-8.3-local @@ -136,7 +134,6 @@ buildvariants: - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - "test-atlas-data-lake" # Test MongoDB 5.0 and 6.0 - name: test-debian11-php-8.2-local @@ -195,7 +192,6 @@ buildvariants: - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - "test-atlas-data-lake" # Test MongoDB 5.0 and 6.0 - name: test-debian11-php-8.1-local diff --git a/.evergreen/config/generated/test-variant/phpc.yml b/.evergreen/config/generated/test-variant/phpc.yml index af251d220..335eaa1fd 100644 --- a/.evergreen/config/generated/test-variant/phpc.yml +++ b/.evergreen/config/generated/test-variant/phpc.yml @@ -17,4 +17,3 @@ buildvariants: - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - "test-atlas-data-lake" diff --git a/.evergreen/config/templates/test-variant/modern-php-full.yml b/.evergreen/config/templates/test-variant/modern-php-full.yml index 043e5f219..48bc6e503 100644 --- a/.evergreen/config/templates/test-variant/modern-php-full.yml +++ b/.evergreen/config/templates/test-variant/modern-php-full.yml @@ -16,7 +16,6 @@ - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - "test-atlas-data-lake" # Test MongoDB 5.0 and 6.0 - name: test-debian11-php-%phpVersion%-local diff --git a/.evergreen/config/templates/test-variant/phpc.yml b/.evergreen/config/templates/test-variant/phpc.yml index 0f1738569..35cbb4780 100644 --- a/.evergreen/config/templates/test-variant/phpc.yml +++ b/.evergreen/config/templates/test-variant/phpc.yml @@ -15,4 +15,3 @@ - ".replicaset .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".sharded .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - ".loadbalanced .local !.csfle !.4.0 !.4.2 !.4.4 !.5.0 !.6.0" - - "test-atlas-data-lake" diff --git a/.evergreen/config/test-tasks.yml b/.evergreen/config/test-tasks.yml index 1ed40a32d..5dabc8a10 100644 --- a/.evergreen/config/test-tasks.yml +++ b/.evergreen/config/test-tasks.yml @@ -7,14 +7,6 @@ tasks: vars: TESTS: "atlas" - - name: "test-atlas-data-lake" - commands: - - command: ec2.assume_role - params: - role_arn: ${aws_test_secrets_role} - - func: "bootstrap mongohoused" - - func: "run atlas data lake test" - - name: "run-benchmark" exec_timeout_secs: 3600 commands: diff --git a/.evergreen/config/test-variants.yml b/.evergreen/config/test-variants.yml index 9166476e4..816d1bc76 100644 --- a/.evergreen/config/test-variants.yml +++ b/.evergreen/config/test-variants.yml @@ -13,18 +13,3 @@ buildvariants: name: "build-php-8.2" tasks: - "run-benchmark" - - # Run Atlas Data Lake Tests on Ubuntu - - name: test-ubuntu2204-php82-local - tags: ["test", "ubuntu", "x64"] - display_name: "Test: Ubuntu 22.04 x64, PHP 8.2" - run_on: ubuntu2204-small - expansions: - FETCH_BUILD_VARIANT: "build-ubuntu2204" - FETCH_BUILD_TASK: "build-php-8.2" - PHP_VERSION: "8.2" - depends_on: - - variant: "build-ubuntu2204" - name: "build-php-8.2" - tasks: - - "test-atlas-data-lake" diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 497ad89dd..b76b97004 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -86,10 +86,6 @@ case "$TESTS" in php vendor/bin/phpunit $PHPUNIT_OPTS --group atlas ;; - atlas-data-lake) - php vendor/bin/phpunit $PHPUNIT_OPTS --group atlas-data-lake - ;; - csfle) php vendor/bin/phpunit $PHPUNIT_OPTS --group csfle ;; diff --git a/tests/FunctionalTestCase.php b/tests/FunctionalTestCase.php index 5d5238361..5084c27d4 100644 --- a/tests/FunctionalTestCase.php +++ b/tests/FunctionalTestCase.php @@ -519,16 +519,6 @@ protected function skipIfTransactionsAreNotSupported(): void } } - protected function isAtlasDataLake(): bool - { - $buildInfo = $this->getPrimaryServer()->executeCommand( - $this->getDatabaseName(), - new Command(['buildInfo' => 1]), - )->toArray()[0]; - - return ! empty($buildInfo->dataLake); - } - protected function isEnterprise(): bool { $buildInfo = $this->getPrimaryServer()->executeCommand( diff --git a/tests/SpecTests/AtlasDataLakeSpecTest.php b/tests/SpecTests/AtlasDataLakeSpecTest.php deleted file mode 100644 index da8af86df..000000000 --- a/tests/SpecTests/AtlasDataLakeSpecTest.php +++ /dev/null @@ -1,140 +0,0 @@ -isAtlasDataLake()) { - $this->markTestSkipped('Server is not Atlas Data Lake'); - } - } - - /** - * Prose test 1: killCursors command - */ - public function testKillCursors(): void - { - $cursorId = null; - $cursorNamespace = null; - - (new CommandObserver())->observe( - function (): void { - $client = static::createTestClient(); - $client->test->driverdata->find([], ['batchSize' => 2, 'limit' => 3]); - }, - function (array $event) use (&$cursorId, &$cursorNamespace): void { - if ($event['started']->getCommandName() === 'find') { - $this->assertArrayHasKey('succeeded', $event); - - $reply = $event['succeeded']->getReply(); - $this->assertObjectHasProperty('cursor', $reply); - $this->assertIsObject($reply->cursor); - $this->assertObjectHasProperty('id', $reply->cursor); - $this->assertIsInt($reply->cursor->id); - $this->assertObjectHasProperty('ns', $reply->cursor); - $this->assertIsString($reply->cursor->ns); - - /* Note: MongoDB\Driver\CursorId is not used here; however, - * we shouldn't have to worry about encoutnering a 64-bit - * cursor IDs on a 32-bit platform mongohoused allocates IDs - * sequentially (starting from 1). */ - $cursorId = $reply->cursor->id; - $cursorNamespace = $reply->cursor->ns; - - return; - } - - /* After the initial find command, expect that killCursors is - * next and that a cursor ID and namespace were collected. */ - $this->assertSame('killCursors', $event['started']->getCommandName()); - $this->assertIsInt($cursorId); - $this->assertIsString($cursorNamespace); - - [$databaseName, $collectionName] = explode('.', $cursorNamespace, 2); - $command = $event['started']->getCommand(); - - /* Assert that the killCursors command uses the namespace and - * cursor ID from the find command reply. */ - $this->assertSame($databaseName, $event['started']->getDatabaseName()); - $this->assertSame($databaseName, $command->{'$db'}); - $this->assertObjectHasProperty('killCursors', $command); - $this->assertSame($collectionName, $command->killCursors); - $this->assertObjectHasProperty('cursors', $command); - $this->assertIsArray($command->cursors); - $this->assertArrayHasKey(0, $command->cursors); - $this->assertSame($cursorId, $command->cursors[0]); - - /* Assert that the killCursors command reply indicates that the - * expected cursor ID was killed. */ - $reply = $event['succeeded']->getReply(); - $this->assertObjectHasProperty('cursorsKilled', $reply); - $this->assertIsArray($reply->cursorsKilled); - $this->assertArrayHasKey(0, $reply->cursorsKilled); - $this->assertSame($cursorId, $reply->cursorsKilled[0]); - }, - ); - } - - /** - * Prose test 2: Connect without authentication - */ - public function testConnectWithoutAuth(): void - { - /* Parse URI to remove userinfo component. The query string is left - * as-is and must not include authMechanism or credentials. */ - $parts = parse_url(static::getUri()); - $port = isset($parts['port']) ? ':' . $parts['port'] : ''; - $path = $parts['path'] ?? '/'; - $query = isset($parts['query']) ? '?' . $parts['query'] : ''; - - $uri = $parts['scheme'] . '://' . $parts['host'] . $port . $path . $query; - - $client = static::createTestClient($uri); - $cursor = $client->selectDatabase($this->getDatabaseName())->command(['ping' => 1]); - - $this->assertInstanceOf(Cursor::class, $cursor); - $this->assertCommandSucceeded(current($cursor->toArray())); - } - - /** - * Prose test 3: Connect with SCRAM-SHA-1 authentication - */ - public function testConnectwithSCRAMSHA1(): void - { - $client = static::createTestClient(null, ['authMechanism' => 'SCRAM-SHA-1']); - $cursor = $client->selectDatabase($this->getDatabaseName())->command(['ping' => 1]); - - $this->assertInstanceOf(Cursor::class, $cursor); - $this->assertCommandSucceeded(current($cursor->toArray())); - } - - /** - * Prose test 4: Connect with SCRAM-SHA-256 authentication - */ - public function testConnectwithSCRAMSHA256(): void - { - $client = static::createTestClient(null, ['authMechanism' => 'SCRAM-SHA-256']); - $cursor = $client->selectDatabase($this->getDatabaseName())->command(['ping' => 1]); - - $this->assertInstanceOf(Cursor::class, $cursor); - $this->assertCommandSucceeded(current($cursor->toArray())); - } -} diff --git a/tests/UnifiedSpecTests/UnifiedSpecTest.php b/tests/UnifiedSpecTests/UnifiedSpecTest.php index 363151fb1..fa302acf1 100644 --- a/tests/UnifiedSpecTests/UnifiedSpecTest.php +++ b/tests/UnifiedSpecTests/UnifiedSpecTest.php @@ -114,22 +114,6 @@ public function setUp(): void } } - #[DataProvider('provideAtlasDataLakeTests')] - #[Group('atlas-data-lake')] - public function testAtlasDataLake(UnifiedTestCase $test): void - { - if (! $this->isAtlasDataLake()) { - $this->markTestSkipped('Server is not Atlas Data Lake'); - } - - self::$runner->run($test); - } - - public static function provideAtlasDataLakeTests(): Generator - { - return self::provideTests('atlas-data-lake-testing/tests/unified', 'atlas-data-lake'); - } - #[DataProvider('provideChangeStreamsTests')] public function testChangeStreams(UnifiedTestCase $test): void {