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:
|
terminal:
|
||||||
enabled: false
|
enabled: false
|
||||||
core:
|
core:
|
||||||
|
network:
|
||||||
|
protocol:
|
||||||
|
udp:
|
||||||
|
listen_address: ':5150'
|
||||||
|
tcp:
|
||||||
|
listen_address: ':5150'
|
||||||
|
ws:
|
||||||
|
listen_address: ':5150'
|
||||||
|
wss:
|
||||||
|
listen_address: ':5150'
|
||||||
protected_store:
|
protected_store:
|
||||||
directory: '/var/db/veilid-server/protected_store'
|
directory: '/var/db/veilid-server/protected_store'
|
||||||
table_store:
|
table_store:
|
||||||
|
@ -103,10 +103,11 @@ async fn wasm_test_serialize_routing_table() {
|
|||||||
setup();
|
setup();
|
||||||
test_serialize_routing_table::test_all().await;
|
test_serialize_routing_table::test_all().await;
|
||||||
}
|
}
|
||||||
|
/* Should be an integration test not a unit test
|
||||||
#[wasm_bindgen_test]
|
#[wasm_bindgen_test]
|
||||||
#[serial]
|
#[serial]
|
||||||
async fn wasm_test_dht() {
|
async fn wasm_test_dht() {
|
||||||
setup();
|
setup();
|
||||||
test_dht::test_all().await;
|
test_dht::test_all().await;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
@ -112,7 +112,12 @@ class _MyAppState extends State<MyApp> with UiLoggy {
|
|||||||
Future<void> toggleStartup(bool startup) async {
|
Future<void> toggleStartup(bool startup) async {
|
||||||
if (startup && !_startedUp) {
|
if (startup && !_startedUp) {
|
||||||
var config = await getDefaultVeilidConfig(
|
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
|
// ignore: do_not_use_environment
|
||||||
if (const String.fromEnvironment('DELETE_TABLE_STORE') == '1') {
|
if (const String.fromEnvironment('DELETE_TABLE_STORE') == '1') {
|
||||||
config = config.copyWith(
|
config = config.copyWith(
|
||||||
|
@ -11,7 +11,7 @@ void veilidInit() {
|
|||||||
enabled: true,
|
enabled: true,
|
||||||
level: VeilidConfigLogLevel.debug,
|
level: VeilidConfigLogLevel.debug,
|
||||||
logsInTimings: true,
|
logsInTimings: true,
|
||||||
logsInConsole: false),
|
logsInConsole: true),
|
||||||
api: VeilidWASMConfigLoggingApi(
|
api: VeilidWASMConfigLoggingApi(
|
||||||
enabled: true, level: VeilidConfigLogLevel.info)));
|
enabled: true, level: VeilidConfigLogLevel.info)));
|
||||||
Veilid.instance.initializeVeilidCore(platformConfig.toJson());
|
Veilid.instance.initializeVeilidCore(platformConfig.toJson());
|
||||||
|
@ -38,20 +38,24 @@ class DefaultVeilidFixture implements VeilidFixture {
|
|||||||
? <String>[]
|
? <String>[]
|
||||||
: ignoreLogTargetsStr.split(',').map((e) => e.trim()).toList();
|
: 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;
|
final Map<String, dynamic> platformConfigJson;
|
||||||
if (kIsWeb) {
|
if (kIsWeb) {
|
||||||
final platformConfig = VeilidWASMConfig(
|
final platformConfig = VeilidWASMConfig(
|
||||||
logging: VeilidWASMConfigLogging(
|
logging: VeilidWASMConfigLogging(
|
||||||
performance: VeilidWASMConfigLoggingPerformance(
|
performance: VeilidWASMConfigLoggingPerformance(
|
||||||
enabled: true,
|
enabled: true,
|
||||||
level: VeilidConfigLogLevel.debug,
|
level: logLevel,
|
||||||
logsInTimings: true,
|
logsInTimings: true,
|
||||||
logsInConsole: false,
|
logsInConsole: true,
|
||||||
ignoreLogTargets: ignoreLogTargets,
|
ignoreLogTargets: ignoreLogTargets,
|
||||||
),
|
),
|
||||||
api: VeilidWASMConfigLoggingApi(
|
api: VeilidWASMConfigLoggingApi(
|
||||||
enabled: true,
|
enabled: true,
|
||||||
level: VeilidConfigLogLevel.info,
|
level: logLevel,
|
||||||
ignoreLogTargets: ignoreLogTargets,
|
ignoreLogTargets: ignoreLogTargets,
|
||||||
)));
|
)));
|
||||||
platformConfigJson = platformConfig.toJson();
|
platformConfigJson = platformConfig.toJson();
|
||||||
@ -72,8 +76,7 @@ class DefaultVeilidFixture implements VeilidFixture {
|
|||||||
),
|
),
|
||||||
api: VeilidFFIConfigLoggingApi(
|
api: VeilidFFIConfigLoggingApi(
|
||||||
enabled: true,
|
enabled: true,
|
||||||
// level: VeilidConfigLogLevel.debug,
|
level: logLevel,
|
||||||
level: VeilidConfigLogLevel.info,
|
|
||||||
ignoreLogTargets: ignoreLogTargets,
|
ignoreLogTargets: ignoreLogTargets,
|
||||||
)));
|
)));
|
||||||
platformConfigJson = platformConfig.toJson();
|
platformConfigJson = platformConfig.toJson();
|
||||||
|
2
veilid-wasm/tests/package-lock.json
generated
2
veilid-wasm/tests/package-lock.json
generated
@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"../pkg": {
|
"../pkg": {
|
||||||
"name": "veilid-wasm",
|
"name": "veilid-wasm",
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MPL-2.0"
|
"license": "MPL-2.0"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user