Skip to content

Commit

Permalink
Add list collections test
Browse files Browse the repository at this point in the history
  • Loading branch information
abnegate committed May 9, 2024
1 parent e36fc25 commit f3192ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/e2e/Adapter/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -15002,6 +15002,8 @@ public function testIsolationModes(): void
])
]);

$this->assertCount(1, $database->listCollections());

if ($database->getAdapter()->getSupportForFulltextIndex()) {
$database->createIndex(
collection: 'people',
Expand All @@ -15027,7 +15029,7 @@ public function testIsolationModes(): void
$this->assertEquals($tenant1, $doc->getAttribute('$tenant'));

$docs = $database->find('people');
$this->assertEquals(1, \count($docs));
$this->assertCount(1, $docs);

// Swap to tenant 2, no access
$database->setTenant($tenant2);
Expand All @@ -15046,6 +15048,8 @@ public function testIsolationModes(): void
$this->assertEquals('Collection not found', $e->getMessage());
}

$this->assertCount(0, $database->listCollections());

// Swap back to tenant 1, allowed
$database->setTenant($tenant1);

Expand Down

0 comments on commit f3192ff

Please sign in to comment.