From 106d4c4a4a031de2b4682e45c7f1f01820873f1f Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Thu, 17 Nov 2022 03:57:40 -0600 Subject: [PATCH] Fix sqlite test (#14642) * Fix sqlite test * Add sqlite database to ci Co-authored-by: Jellyfrog --- .github/workflows/test.yml | 5 ++++- tests/Unit/SqliteTest.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6f37e8a948..b82f65075a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,7 +104,7 @@ jobs: name: Install packages run: | sudo apt-get -qq update - sudo apt-get install -y fping python3-pip python3-setuptools snmp + sudo apt-get install -y fping python3-pip python3-setuptools snmp sqlite3 - name: Pip install run: | @@ -165,6 +165,9 @@ jobs: PORT: ${{ job.services.database.ports[3306] }} run: | mysql -h"127.0.0.1" -P"$PORT" --user=librenms --password=librenms -e 'ALTER DATABASE librenms_phpunit_78hunjuybybh CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;' + - + name: Setup SQLite + run: sqlite3 storage/testing.sqlite "" - name: Artisan serve if: matrix.skip-web-check != '1' diff --git a/tests/Unit/SqliteTest.php b/tests/Unit/SqliteTest.php index f73755611b..28af5b1dbc 100644 --- a/tests/Unit/SqliteTest.php +++ b/tests/Unit/SqliteTest.php @@ -31,7 +31,7 @@ use LibreNMS\Tests\TestCase; class SqliteTest extends TestCase { - private $connection = 'testing_memory'; + private $connection = 'testing_persistent'; public function testMigrationsRunWithoutError() {