Fix wasm and postgres integration tests

This commit is contained in:
Simon Binder 2022-06-25 15:07:01 +02:00
parent e109cf3564
commit 4959ec6235
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
3 changed files with 5 additions and 13 deletions

View File

@ -20,7 +20,7 @@ class DriftWasmExecutor extends TestExecutor {
@override
DatabaseConnection createConnection() {
return DatabaseConnection.fromExecutor(
WasmDatabase(sqlite3: sqlite3(), path: 'drift_test.db'));
WasmDatabase(sqlite3: sqlite3(), path: '/drift_test.db'));
}
@override
@ -39,7 +39,8 @@ void main() {
final response =
await http.get(Uri.parse('http://localhost:$port/sqlite3.wasm'));
sqlite3 = await WasmSqlite3.load(response.bodyBytes);
sqlite3 = await WasmSqlite3.load(
response.bodyBytes, SqliteEnvironment(fileSystem: fs));
});
runAllTests(DriftWasmExecutor(fs, () => sqlite3));

View File

@ -92,6 +92,7 @@ void transactionTests(TestExecutor executor) {
});
expect(await db.select(db.users).get(), hasLength(1));
await executor.clearDatabaseAndClose(db);
},
skip: executor.supportsNestedTransactions
? false

View File

@ -2,17 +2,7 @@
EXIT_CODE=0
pushd extras/integration_tests
find . -type d -name .dart_tool -exec rm -rf {} \;
popd
pushd extras/integration_tests/vm
echo "Running integration tests with moor_ffi & VM"
dart pub upgrade
dart test || EXIT_CODE=$?
popd
pushd extras/integration_tests/postgres
pushd extras/drift_postgres
echo "Running integration tests with Postgres"
dart pub upgrade
dart test || EXIT_CODE=$?