diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index 3bb5c9b578..1e73ba5e59 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -707,7 +707,12 @@ trait UsersBase $this->assertCount(1, $response['body']['users']); //mongodb fulltext search support only in complete words. + $adapter = \Utopia\System\System::getEnv('_APP_DB_ADAPTER', 'not-set'); + $isMongo = $this->isMongoDB(); + error_log("DEBUG testListUsers: _APP_DB_ADAPTER={$adapter}, isMongoDB={$isMongo}"); + if (!$this->isMongoDB()) { + error_log("DEBUG testListUsers: Running man search test for MariaDB"); $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], @@ -715,6 +720,8 @@ trait UsersBase 'search' => "man", ]); + error_log("DEBUG testListUsers: man search returned status=" . $response['headers']['status-code'] . + ", total=" . ($response['body']['total'] ?? 'N/A')); $this->assertEquals($response['headers']['status-code'], 200); $this->assertIsArray($response['body']); @@ -722,6 +729,8 @@ trait UsersBase $this->assertIsInt($response['body']['total']); $this->assertEquals(1, $response['body']['total']); $this->assertCount(1, $response['body']['users']); + } else { + error_log("DEBUG testListUsers: Skipping man search test for MongoDB"); } $response = $this->client->call(Client::METHOD_GET, '/users', array_merge([