From 24b8ac182e08020b05534c9b2f0c78e88936ff9c Mon Sep 17 00:00:00 2001 From: philipp lang Date: Fri, 26 Jan 2024 00:35:00 +0100 Subject: [PATCH] Fix member index test --- .drone.yml | 4 ++++ tests/EndToEnd/MemberIndexTest.php | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6ec84ede..691b8aeb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -156,6 +156,10 @@ services: MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes - name: redis image: redis + - name: meilisearch + image: getmeili/meilisearch:v1.6 + commands: + - meilisearch --master-key="abc" trigger: event: diff --git a/tests/EndToEnd/MemberIndexTest.php b/tests/EndToEnd/MemberIndexTest.php index ec680e49..dc6ec09d 100644 --- a/tests/EndToEnd/MemberIndexTest.php +++ b/tests/EndToEnd/MemberIndexTest.php @@ -6,15 +6,23 @@ use App\Group; use App\Invoice\Models\Invoice; use App\Invoice\Models\InvoicePosition; use App\Member\Member; -use App\Payment\Payment; use Illuminate\Foundation\Testing\DatabaseMigrations; -use Tests\RequestFactories\Child; +use Illuminate\Support\Facades\Artisan; +use Laravel\Scout\Console\SyncIndexSettingsCommand; use Tests\TestCase; class MemberIndexTest extends TestCase { use DatabaseMigrations; + public function setUp(): void + { + parent::setUp(); + + config()->set('scout.driver', 'meilisearch'); + Artisan::call(SyncIndexSettingsCommand::class); + } + public function testItHandlesFullTextSearch(): void { $this->withoutExceptionHandling()->login()->loginNami();