Skip to content

Commit

Permalink
test: Remove faces sharing test code
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Jul 5, 2024
1 parent 29fe792 commit 4e69ade
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions tests/ClassifierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,31 +487,6 @@ public function testFacesPipeline() : void {
}
}
}

// Test FileListener for moving files across share boundaries

self::assertCount(0, $this->faceDetectionMapper->findByUserId(self::TEST_USER2), 'user 2 should have no face detections');

$sharedFolder = $this->userFolder->newFolder('/shared/');
$share = $this->shareManager->newShare();
$share->setSharedBy(self::TEST_USER1);
$share->setSharedWith(self::TEST_USER2);
$share->setShareType(\OCP\Share\IShare::TYPE_USER);
$share->setNode($sharedFolder);
$share->setPermissions(\OCP\Constants::PERMISSION_ALL);
$this->shareManager->createShare($share);
$this->shareManager->acceptShare($share, self::TEST_USER2);

$testFiles[0]->move($sharedFolder->getPath().'/'.$testFiles[0]->getName());

try {
self::assertCount(1, $this->faceDetectionMapper->findByUserId(self::TEST_USER2), 'user 2 should have 1 face detection now');
$this->shareManager->deleteShare($share);
self::assertCount(0, $this->faceDetectionMapper->findByUserId(self::TEST_USER2), 'user 2 should have 0 face detections after deleting the share');
} catch (\Throwable $e) {
$this->shareManager->deleteShare($share);
throw $e;
}
}

/**
Expand Down

0 comments on commit 4e69ade

Please sign in to comment.