Skip to content

Commit

Permalink
fix(tests): Reset OCM retries and PCM after integration tests
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Mar 13, 2024
1 parent 80344d6 commit e29b401
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/integration/spreedcheats/lib/Controller/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
use OCP\IRequest;
use OCP\Share\IShare;
Expand Down Expand Up @@ -85,16 +86,21 @@ public function resetSpreed(): DataResponse {
$delete = $this->db->getQueryBuilder();
$delete->delete('talk_poll_votes')->executeStatement();

$delete = $this->db->getQueryBuilder();
$delete->delete('talk_proxy_messages')->executeStatement();

$delete = $this->db->getQueryBuilder();
$delete->delete('talk_reminders')->executeStatement();

$delete = $this->db->getQueryBuilder();
$delete->delete('talk_retry_ocm')->executeStatement();

$delete = $this->db->getQueryBuilder();
$delete->delete('talk_rooms')->executeStatement();

$delete = $this->db->getQueryBuilder();
$delete->delete('talk_sessions')->executeStatement();


$delete = $this->db->getQueryBuilder();
$delete->delete('share')
->where($delete->expr()->orX(
Expand All @@ -103,6 +109,13 @@ public function resetSpreed(): DataResponse {
))
->executeStatement();


$delete = $this->db->getQueryBuilder();
$delete->delete('preferences')
->where($delete->expr()->in('configkey', $delete->createNamedParameter(['changelog', 'note_to_self'], IQueryBuilder::PARAM_STR_ARRAY)))
->andWhere($delete->expr()->eq('appid', $delete->createNamedParameter('spreed')))
->executeStatement();

try {
$delete = $this->db->getQueryBuilder();
$delete->delete('notifications')
Expand Down

0 comments on commit e29b401

Please sign in to comment.