mirror of https://github.com/AMT-Cheif/drift.git
Fix wasm and postgres integration tests
This commit is contained in:
parent
e109cf3564
commit
4959ec6235
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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=$?
|
||||
|
|
Loading…
Reference in New Issue