From 693f05a0e015b5d2064424b7ff530cb357607f9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Thu, 2 Jan 2025 09:24:33 +0100 Subject: [PATCH] fix tests on x64 --- tests/Features/NoAttachTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Features/NoAttachTest.php b/tests/Features/NoAttachTest.php index 4ebfb39a..90477103 100644 --- a/tests/Features/NoAttachTest.php +++ b/tests/Features/NoAttachTest.php @@ -26,7 +26,11 @@ test('sqlite ATTACH statements can be blocked', function (bool $disallow) { symlink(base_path('vendor'), '/var/www/html/vendor'); } - DisallowSqliteAttach::$extensionPath = '/var/www/html/extensions/lib/arm/noattach.so'; + if (php_uname('m') == 'aarch64') { + DisallowSqliteAttach::$extensionPath = '/var/www/html/extensions/lib/arm/noattach.so'; + } else { + DisallowSqliteAttach::$extensionPath = '/var/www/html/extensions/lib/noattach.so'; + } if ($disallow) config(['tenancy.features' => [DisallowSqliteAttach::class]]); @@ -87,7 +91,7 @@ test('sqlite ATTACH statements can be blocked', function (bool $disallow) { expect(fn () => pest()->post($tenant->id . '/tenant-sqli', [ 'q1' => 'ATTACH DATABASE "' . $tempdb2 . '" as baz', 'q2' => 'SELECT * from bar.secrets', - ])->json())->toThrow(QueryException::class); + ])->json())->toThrow(QueryException::class, 'not authorized'); } else { expect(pest()->post($tenant->id . '/tenant-sqli', [ 'q1' => 'ATTACH DATABASE "' . $tempdb2 . '" as baz',