mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
set default port to 5150 for veilid-server in config
improve testing fixtures
This commit is contained in:
parent
a1b6da5ab4
commit
55de1dcb5c
@ -13,6 +13,16 @@ logging:
|
||||
terminal:
|
||||
enabled: false
|
||||
core:
|
||||
network:
|
||||
protocol:
|
||||
udp:
|
||||
listen_address: ':5150'
|
||||
tcp:
|
||||
listen_address: ':5150'
|
||||
ws:
|
||||
listen_address: ':5150'
|
||||
wss:
|
||||
listen_address: ':5150'
|
||||
protected_store:
|
||||
directory: '/var/db/veilid-server/protected_store'
|
||||
table_store:
|
||||
|
@ -103,10 +103,11 @@ async fn wasm_test_serialize_routing_table() {
|
||||
setup();
|
||||
test_serialize_routing_table::test_all().await;
|
||||
}
|
||||
|
||||
/* Should be an integration test not a unit test
|
||||
#[wasm_bindgen_test]
|
||||
#[serial]
|
||||
async fn wasm_test_dht() {
|
||||
setup();
|
||||
test_dht::test_all().await;
|
||||
}
|
||||
*/
|
||||
|
@ -112,7 +112,12 @@ class _MyAppState extends State<MyApp> with UiLoggy {
|
||||
Future<void> toggleStartup(bool startup) async {
|
||||
if (startup && !_startedUp) {
|
||||
var config = await getDefaultVeilidConfig(
|
||||
isWeb: kIsWeb, programName: 'Veilid Plugin Example');
|
||||
isWeb: kIsWeb,
|
||||
programName: 'Veilid Plugin Example',
|
||||
// ignore: avoid_redundant_argument_values, do_not_use_environment
|
||||
bootstrap: const String.fromEnvironment('BOOTSTRAP'),
|
||||
// ignore: avoid_redundant_argument_values, do_not_use_environment
|
||||
networkKeyPassword: const String.fromEnvironment('NETWORK_KEY'));
|
||||
// ignore: do_not_use_environment
|
||||
if (const String.fromEnvironment('DELETE_TABLE_STORE') == '1') {
|
||||
config = config.copyWith(
|
||||
|
@ -11,7 +11,7 @@ void veilidInit() {
|
||||
enabled: true,
|
||||
level: VeilidConfigLogLevel.debug,
|
||||
logsInTimings: true,
|
||||
logsInConsole: false),
|
||||
logsInConsole: true),
|
||||
api: VeilidWASMConfigLoggingApi(
|
||||
enabled: true, level: VeilidConfigLogLevel.info)));
|
||||
Veilid.instance.initializeVeilidCore(platformConfig.toJson());
|
||||
|
@ -38,20 +38,24 @@ class DefaultVeilidFixture implements VeilidFixture {
|
||||
? <String>[]
|
||||
: ignoreLogTargetsStr.split(',').map((e) => e.trim()).toList();
|
||||
|
||||
final logLevel = VeilidConfigLogLevel.fromJson(
|
||||
// ignore: do_not_use_environment
|
||||
const String.fromEnvironment('LOG_LEVEL', defaultValue: 'info'));
|
||||
|
||||
final Map<String, dynamic> platformConfigJson;
|
||||
if (kIsWeb) {
|
||||
final platformConfig = VeilidWASMConfig(
|
||||
logging: VeilidWASMConfigLogging(
|
||||
performance: VeilidWASMConfigLoggingPerformance(
|
||||
enabled: true,
|
||||
level: VeilidConfigLogLevel.debug,
|
||||
level: logLevel,
|
||||
logsInTimings: true,
|
||||
logsInConsole: false,
|
||||
logsInConsole: true,
|
||||
ignoreLogTargets: ignoreLogTargets,
|
||||
),
|
||||
api: VeilidWASMConfigLoggingApi(
|
||||
enabled: true,
|
||||
level: VeilidConfigLogLevel.info,
|
||||
level: logLevel,
|
||||
ignoreLogTargets: ignoreLogTargets,
|
||||
)));
|
||||
platformConfigJson = platformConfig.toJson();
|
||||
@ -72,8 +76,7 @@ class DefaultVeilidFixture implements VeilidFixture {
|
||||
),
|
||||
api: VeilidFFIConfigLoggingApi(
|
||||
enabled: true,
|
||||
// level: VeilidConfigLogLevel.debug,
|
||||
level: VeilidConfigLogLevel.info,
|
||||
level: logLevel,
|
||||
ignoreLogTargets: ignoreLogTargets,
|
||||
)));
|
||||
platformConfigJson = platformConfig.toJson();
|
||||
|
2
veilid-wasm/tests/package-lock.json
generated
2
veilid-wasm/tests/package-lock.json
generated
@ -21,7 +21,7 @@
|
||||
},
|
||||
"../pkg": {
|
||||
"name": "veilid-wasm",
|
||||
"version": "0.3.1",
|
||||
"version": "0.3.2",
|
||||
"dev": true,
|
||||
"license": "MPL-2.0"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user