chore(config): 开发默认地址改为公网 39.162.50.99
This commit is contained in:
1 parent
51c363540a
commit
0c6a103c1c
2 files changed
+14
-36
No files matched your search
@@ -62,8 +62,8 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
test('should_use_the_configured_lan_address_for_device_default', () {
|
||||
expect(AppConfig.devHostBaseUrl, 'http://192.168.31.187:8081');
|
||||
test('should_use_the_configured_public_address_for_device_default', () {
|
||||
expect(AppConfig.devHostBaseUrl, 'http://39.162.50.99:8081');
|
||||
});
|
||||
|
||||
test('should_skip_probe_when_compiled_override_is_set', () async {
|
||||
@@ -111,11 +111,7 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
expect(attempts, [
|
||||
AppConfig.lanBaseUrl,
|
||||
AppConfig.devHostBaseUrl,
|
||||
AppConfig.publicBaseUrl,
|
||||
]);
|
||||
expect(attempts, [AppConfig.lanBaseUrl, AppConfig.devHostBaseUrl]);
|
||||
expect(AppConfig.apiBaseUrl, AppConfig.publicBaseUrl);
|
||||
});
|
||||
|
||||
@@ -133,7 +129,7 @@ void main() {
|
||||
attempts.add(baseUrl);
|
||||
active++;
|
||||
if (active > maxActive) maxActive = active;
|
||||
if (active == 3) allStarted.complete();
|
||||
if (active == 2) allStarted.complete();
|
||||
await allStarted.future;
|
||||
active--;
|
||||
return baseUrl == AppConfig.lanBaseUrl ||
|
||||
@@ -143,17 +139,13 @@ void main() {
|
||||
|
||||
await probing.timeout(const Duration(seconds: 1));
|
||||
|
||||
expect(attempts, [
|
||||
AppConfig.lanBaseUrl,
|
||||
AppConfig.devHostBaseUrl,
|
||||
AppConfig.publicBaseUrl,
|
||||
]);
|
||||
expect(maxActive, 3);
|
||||
expect(attempts, [AppConfig.lanBaseUrl, AppConfig.devHostBaseUrl]);
|
||||
expect(maxActive, 2);
|
||||
expect(AppConfig.apiBaseUrl, AppConfig.lanBaseUrl);
|
||||
},
|
||||
);
|
||||
|
||||
test('should_probe_loopback_dev_host_then_public_in_order', () async {
|
||||
test('should_probe_loopback_then_public_in_order', () async {
|
||||
final attempts = <String>[];
|
||||
|
||||
await AppConfig.probeAndApplyBaseUrl(
|
||||
@@ -164,11 +156,7 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
expect(attempts, [
|
||||
AppConfig.lanBaseUrl,
|
||||
AppConfig.devHostBaseUrl,
|
||||
AppConfig.publicBaseUrl,
|
||||
]);
|
||||
expect(attempts, [AppConfig.lanBaseUrl, AppConfig.devHostBaseUrl]);
|
||||
expect(AppConfig.apiBaseUrl, AppConfig.publicBaseUrl);
|
||||
});
|
||||
|
||||
@@ -183,11 +171,7 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
expect(attempts, [
|
||||
AppConfig.lanBaseUrl,
|
||||
AppConfig.devHostBaseUrl,
|
||||
AppConfig.publicBaseUrl,
|
||||
]);
|
||||
expect(attempts, [AppConfig.lanBaseUrl, AppConfig.devHostBaseUrl]);
|
||||
expect(AppConfig.apiBaseUrl, AppConfig.devHostBaseUrl);
|
||||
});
|
||||
|
||||
@@ -203,12 +187,7 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
expect(attempts, [
|
||||
custom,
|
||||
AppConfig.lanBaseUrl,
|
||||
AppConfig.devHostBaseUrl,
|
||||
AppConfig.publicBaseUrl,
|
||||
]);
|
||||
expect(attempts, [custom, AppConfig.lanBaseUrl, AppConfig.devHostBaseUrl]);
|
||||
expect(AppConfig.apiBaseUrl, custom);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user