Skip to content

Commit

Permalink
fix tests on x64
Browse files Browse the repository at this point in the history
  • Loading branch information
stancl committed Jan 2, 2025
1 parent 1bb8a42 commit 693f05a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/Features/NoAttachTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
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]]);

Expand Down Expand Up @@ -87,7 +91,7 @@
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',
Expand Down

0 comments on commit 693f05a

Please sign in to comment.