mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge pull request #48215 from nextcloud/bugfix/noid/run-all-unit-tests
fix(tests): Fix test selection and run unit tests of DAV and user_status
This commit is contained in:
commit
bec14dc4a5
4 changed files with 28 additions and 15911 deletions
|
|
@ -114,20 +114,30 @@ class ContactsMigratorTest extends TestCase {
|
|||
$exportMetadata = array_filter(['displayName' => $displayName, 'description' => $description]);
|
||||
|
||||
$this->assertEquals($importMetadata, $exportMetadata);
|
||||
$this->assertEquals(count($importCards), count($exportCards));
|
||||
$this->assertSameSize($importCards, $exportCards);
|
||||
|
||||
for ($i = 0; $i < count($importCards); ++$i) {
|
||||
$this->assertNotEqualsCanonicalizing(
|
||||
$this->getPropertiesChangedOnImport($importCards[$i]),
|
||||
$this->getPropertiesChangedOnImport($exportCards[$i]),
|
||||
);
|
||||
$importProperties = [];
|
||||
$exportProperties = [];
|
||||
for ($i = 0, $iMax = count($importCards); $i < $iMax; ++$i) {
|
||||
$importProperties[] = $this->getPropertiesChangedOnImport($importCards[$i]);
|
||||
$exportProperties[] = $this->getPropertiesChangedOnImport($exportCards[$i]);
|
||||
}
|
||||
|
||||
for ($i = 0; $i < count($importCards); ++$i) {
|
||||
$this->assertEqualsCanonicalizing(
|
||||
$this->getProperties($importCards[$i]),
|
||||
$this->getProperties($exportCards[$i]),
|
||||
);
|
||||
$this->assertNotEqualsCanonicalizing(
|
||||
$importProperties,
|
||||
$exportProperties,
|
||||
);
|
||||
|
||||
$importProperties = [];
|
||||
$exportProperties = [];
|
||||
for ($i = 0, $iMax = count($importCards); $i < $iMax; ++$i) {
|
||||
$importProperties[] = $this->getProperties($importCards[$i]);
|
||||
$exportProperties[] = $this->getProperties($exportCards[$i]);
|
||||
}
|
||||
|
||||
$this->assertEqualsCanonicalizing(
|
||||
$importProperties,
|
||||
$exportProperties,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -7,7 +7,7 @@ declare(strict_types=1);
|
|||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\UserStatus\Tests\Integration\BackgroundJob;
|
||||
namespace OCA\UserStatus\Tests\Integration\Service;
|
||||
|
||||
use OCA\UserStatus\Service\StatusService;
|
||||
use OCP\AppFramework\Db\DoesNotExistException;
|
||||
|
|
@ -154,32 +154,26 @@ class StatusServiceIntegrationTest extends TestCase {
|
|||
);
|
||||
$this->service->setUserStatus(
|
||||
'test123',
|
||||
IUserStatus::AWAY,
|
||||
IUserStatus::MESSAGE_CALENDAR_BUSY,
|
||||
IUserStatus::DND,
|
||||
IUserStatus::MESSAGE_AVAILABILITY,
|
||||
true,
|
||||
);
|
||||
self::assertSame(
|
||||
'meeting',
|
||||
'availability',
|
||||
$this->service->findByUserId('test123')->getMessageId(),
|
||||
);
|
||||
|
||||
$nostatus = $this->service->setUserStatus(
|
||||
'test123',
|
||||
IUserStatus::AWAY,
|
||||
IUserStatus::MESSAGE_AVAILABILITY,
|
||||
IUserStatus::MESSAGE_CALENDAR_BUSY,
|
||||
true,
|
||||
);
|
||||
|
||||
self::assertNull($nostatus);
|
||||
self::assertSame(
|
||||
IUserStatus::MESSAGE_CALENDAR_BUSY,
|
||||
IUserStatus::MESSAGE_AVAILABILITY,
|
||||
$this->service->findByUserId('test123')->getMessageId(),
|
||||
);
|
||||
}
|
||||
|
||||
public function testCi(): void {
|
||||
// TODO: remove if CI turns red
|
||||
self::assertTrue(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,11 +6,7 @@
|
|||
*/
|
||||
|
||||
function loadDirectory($path): void {
|
||||
if (strpos($path, 'integration')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (strpos($path, 'Integration')) {
|
||||
if (strpos($path, 'apps/user_ldap/tests/Integration')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue