Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
try only clean up on all test
Browse files Browse the repository at this point in the history
  • Loading branch information
schwartz-concordium committed Dec 13, 2023
1 parent 24d238b commit ad7c7ae
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
flutter_version: 3.13.6
iphone_model: iPhone 8
android_profile: Nexus 6
android_api_level: 31
android_api_level: 32
android_target: google_apis

jobs:
Expand Down
34 changes: 25 additions & 9 deletions integration_test/secret_storage/secret_storage_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void main() {
try {
// [Hive.deleteFromDisk] doesn't close by itself on
// web https://github.com/isar/hive/pull/734.
await Hive.deleteFromDisk().timeout(const Duration(seconds: 2));
await Hive.deleteFromDisk().timeout(const Duration(seconds: 1));
} catch (_) {}
}

Expand All @@ -38,25 +38,41 @@ void main() {
await mobileStorage.deleteAll();
}

// setUpAll(() async {
// await Hive.initFlutter();
// storage = await SecretStorageProviderFactory.create();
// });

// tearDown(() async {
// if (kIsWeb) {
// await clearHiveBox();
// } else {
// await clearMobileStorage();
// }
// });

// tearDownAll(() async {
// if (kIsWeb) {
// await deleteHiveFromDisk();
// }
// });

setUpAll(() async {
await Hive.initFlutter();
storage = await SecretStorageProviderFactory.create();
});

setUp(() async {
storage = await SecretStorageProviderFactory.create();
});

tearDown(() async {
if (kIsWeb) {
await clearHiveBox();
await deleteHiveFromDisk();
} else {
await clearMobileStorage();
}
});

tearDownAll(() async {
if (kIsWeb) {
await deleteHiveFromDisk();
}
});

testWidgets("When set, read and delete from storage, then update storage correctly", (widgetTester) async {
// Arrange
await storage.setPassword("password");
Expand Down

0 comments on commit ad7c7ae

Please sign in to comment.