mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-07-27 17:05:27 -04:00
flutter unit/integration tests
This commit is contained in:
parent
d586748333
commit
6a8c0830d2
18 changed files with 1357 additions and 520 deletions
|
@ -2,39 +2,72 @@ import 'package:flutter_test/flutter_test.dart';
|
|||
import 'package:integration_test/integration_test.dart';
|
||||
|
||||
import 'fixtures.dart';
|
||||
import 'test_crypto.dart';
|
||||
import 'test_routing_context.dart';
|
||||
import 'test_table_db.dart';
|
||||
import 'test_veilid_config.dart';
|
||||
import 'test_dht.dart';
|
||||
|
||||
void main() {
|
||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||
final fixture = DefaultFixture();
|
||||
|
||||
group('VeilidConfig', () {
|
||||
final fixture = DefaultFixture();
|
||||
setUp(fixture.setUp);
|
||||
tearDown(fixture.tearDown);
|
||||
|
||||
test('test VeilidConfig defaults', testVeilidConfigDefaults);
|
||||
group('Unstarted Tests', () {
|
||||
test('veilid config defaults', testVeilidConfigDefaults);
|
||||
});
|
||||
|
||||
// group('end-to-end test', () {
|
||||
// testWidgets('tap on the floating action button, verify counter',
|
||||
// (tester) async {
|
||||
// // Load app widget.
|
||||
// await tester.pumpWidget(const MyApp());
|
||||
group('Started Tests', () {
|
||||
setUpAll(fixture.setUp);
|
||||
tearDownAll(fixture.tearDown);
|
||||
|
||||
// // Verify the counter starts at 0.
|
||||
// expect(find.text('0'), findsOneWidget);
|
||||
group('Crypto Tests', () {
|
||||
test('best cryptosystem', testBestCryptoSystem);
|
||||
test('get cryptosystem', testGetCryptoSystem);
|
||||
test('get cryptosystem invalid', testGetCryptoSystemInvalid);
|
||||
test('hash and verify password', testHashAndVerifyPassword);
|
||||
});
|
||||
|
||||
// // Finds the floating action button to tap on.
|
||||
// final fab = find.byKey(const Key('increment'));
|
||||
group('Table DB Tests', () {
|
||||
test('delete table db nonexistent', testDeleteTableDbNonExistent);
|
||||
test('open delete table db', testOpenDeleteTableDb);
|
||||
test('open twice table db', testOpenTwiceTableDb);
|
||||
test('open twice table db store load', testOpenTwiceTableDbStoreLoad);
|
||||
test('open twice table db store delete load',
|
||||
testOpenTwiceTableDbStoreDeleteLoad);
|
||||
test('resize table db', testResizeTableDb);
|
||||
});
|
||||
|
||||
// // Emulate a tap on the floating action button.
|
||||
// await tester.tap(fab);
|
||||
group('Attached Tests', () {
|
||||
setUpAll(fixture.attach);
|
||||
tearDownAll(fixture.detach);
|
||||
|
||||
// // Trigger a frame.
|
||||
// await tester.pumpAndSettle();
|
||||
group('Routing Contexts', () {
|
||||
test('routing contexts', testRoutingContexts);
|
||||
test('app message loopback',
|
||||
() => testAppMessageLoopback(fixture.updateStream));
|
||||
test('app call loopback',
|
||||
() => testAppCallLoopback(fixture.updateStream));
|
||||
test('app message loopback big packets',
|
||||
() => testAppMessageLoopbackBigPackets(fixture.updateStream));
|
||||
test('app call loopback big packets',
|
||||
() => testAppCallLoopbackBigPackets(fixture.updateStream));
|
||||
});
|
||||
|
||||
// // Verify the counter increments by 1.
|
||||
// expect(find.text('1'), findsOneWidget);
|
||||
// });
|
||||
// });
|
||||
group('Veilid DHT', () {
|
||||
test('get dht value unopened', testGetDHTValueUnopened);
|
||||
test('open dht record nonexistent no writer',
|
||||
testOpenDHTRecordNonexistentNoWriter);
|
||||
test('close dht record nonexistent', testCloseDHTRecordNonexistent);
|
||||
test('delete dht record nonexistent', testDeleteDHTRecordNonexistent);
|
||||
test(
|
||||
'create delete dht record simple', testCreateDeleteDHTRecordSimple);
|
||||
test('create delete dht record no close',
|
||||
testCreateDeleteDHTRecordNoClose);
|
||||
test('get dht value nonexistent', testGetDHTValueNonexistent);
|
||||
test('set get dht value', testSetGetDHTValue);
|
||||
test('open writer dht value', testOpenWriterDHTValue);
|
||||
test('inspect dht record', testInspectDHTRecord);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue