Skip to content

Commit 782fa68

Browse files
committed
Fix integration tests
1 parent cd4eb17 commit 782fa68

File tree

7 files changed

+24
-7
lines changed

7 files changed

+24
-7
lines changed

integration_tests/flutter_libs/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 28
29+
compileSdkVersion 31
3030

3131
sourceSets {
3232
main.java.srcDirs += 'src/main/kotlin'

integration_tests/flutter_libs/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.3.50'
2+
ext.kotlin_version = '1.6.10'
33
repositories {
44
google()
55
jcenter()

integration_tests/flutter_libs/test_driver/integration.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ void main() {
4444

4545
test('can open databases', () {
4646
final db = sqlite3.openInMemory()
47+
..closeWhenDone()
4748
..execute('CREATE TABLE foo (bar)')
4849
..execute('INSERT INTO foo VALUES (1), (2)');
4950

@@ -53,8 +54,18 @@ void main() {
5354
]);
5455
});
5556

57+
test('has json support', () {
58+
final db = sqlite3.openInMemory()..closeWhenDone();
59+
expect(db.select("SELECT json('[1, 2, 3]') AS r;"), [
60+
{'r': '[1,2,3]'},
61+
]);
62+
});
63+
64+
test('has fts5 support', () {});
65+
5666
test('can create collation', () {
5767
final db = sqlite3.openInMemory()
68+
..closeWhenDone()
5869
..execute('CREATE TABLE foo2 (bar)')
5970
..execute(
6071
"INSERT INTO foo2 VALUES ('AaAaaaAA'), ('BBBbBb'),('cCCCcc '), (' dD ')");
@@ -108,3 +119,7 @@ void main() {
108119
[]);
109120
});
110121
}
122+
123+
extension on Database {
124+
void closeWhenDone() => addTearDown(dispose);
125+
}

integration_tests/sqlcipher_flutter/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29-
compileSdkVersion 28
29+
compileSdkVersion 31
3030

3131
sourceSets {
3232
main.java.srcDirs += 'src/main/kotlin'

integration_tests/sqlcipher_flutter/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.3.50'
2+
ext.kotlin_version = '1.6.10'
33
repositories {
44
google()
55
jcenter()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.5.0'
9+
classpath 'com.android.tools.build:gradle:7.0.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}

integration_tests/sqlcipher_flutter/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip

sqlite3/test/database_test.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ void main() {
181181
// Make sure the path exists
182182
await Directory(dirname(path)).create(recursive: true);
183183
// but not the db
184-
await File(path).delete();
184+
if (File(path).existsSync()) {
185+
await File(path).delete();
186+
}
185187

186188
// Opening a non-existent database should fail
187189
expect(

0 commit comments

Comments
 (0)