2019-11-27 23:04:02 +00:00
|
|
|
// Copyright 2014 The Flutter Authors. All rights reserved.
|
2017-09-01 02:35:05 +00:00
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2021-01-27 23:17:53 +00:00
|
|
|
// @dart = 2.8
|
|
|
|
|
2017-09-01 02:35:05 +00:00
|
|
|
import 'package:file/file.dart';
|
|
|
|
import 'package:file/memory.dart';
|
2020-01-13 18:12:06 +00:00
|
|
|
import 'package:flutter_tools/src/base/bot_detector.dart';
|
2019-10-03 18:08:42 +00:00
|
|
|
import 'package:flutter_tools/src/base/common.dart';
|
2019-10-23 05:05:00 +00:00
|
|
|
import 'package:flutter_tools/src/base/file_system.dart';
|
2020-04-22 23:34:12 +00:00
|
|
|
import 'package:flutter_tools/src/base/logger.dart';
|
2020-05-06 15:15:39 +00:00
|
|
|
import 'package:flutter_tools/src/base/platform.dart';
|
2019-10-23 05:05:00 +00:00
|
|
|
import 'package:flutter_tools/src/cache.dart';
|
2017-09-01 02:35:05 +00:00
|
|
|
import 'package:flutter_tools/src/dart/pub.dart';
|
2019-10-03 18:08:42 +00:00
|
|
|
import 'package:flutter_tools/src/reporting/reporting.dart';
|
2020-08-12 02:36:05 +00:00
|
|
|
import 'package:fake_async/fake_async.dart';
|
2017-09-01 02:35:05 +00:00
|
|
|
|
2019-07-13 18:51:44 +00:00
|
|
|
import '../../src/common.dart';
|
2021-03-13 00:38:04 +00:00
|
|
|
import '../../src/fake_process_manager.dart';
|
2017-09-01 02:35:05 +00:00
|
|
|
|
|
|
|
void main() {
|
2019-10-05 03:01:04 +00:00
|
|
|
setUpAll(() {
|
2020-04-22 23:34:12 +00:00
|
|
|
Cache.flutterRoot = '';
|
2019-10-05 03:01:04 +00:00
|
|
|
});
|
2017-12-06 21:27:29 +00:00
|
|
|
|
2020-11-10 21:56:36 +00:00
|
|
|
testWithoutContext('checkUpToDate skips pub get if the package config is newer than the pubspec '
|
|
|
|
'and the current framework version is the same as the last version', () async {
|
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[]);
|
|
|
|
final BufferLogger logger = BufferLogger.test();
|
|
|
|
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
|
|
|
|
|
|
|
|
fileSystem.file('pubspec.yaml').createSync();
|
|
|
|
fileSystem.file('pubspec.lock').createSync();
|
|
|
|
fileSystem.file('.dart_tool/package_config.json').createSync(recursive: true);
|
|
|
|
fileSystem.file('.dart_tool/version').writeAsStringSync('a');
|
|
|
|
fileSystem.file('version').writeAsStringSync('a');
|
|
|
|
|
|
|
|
final Pub pub = Pub(
|
|
|
|
fileSystem: fileSystem,
|
|
|
|
logger: logger,
|
|
|
|
processManager: processManager,
|
2021-01-29 02:49:04 +00:00
|
|
|
usage: TestUsage(),
|
2020-11-10 21:56:36 +00:00
|
|
|
platform: FakePlatform(
|
|
|
|
environment: const <String, String>{},
|
|
|
|
),
|
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
);
|
|
|
|
|
|
|
|
await pub.get(
|
|
|
|
context: PubContext.pubGet,
|
|
|
|
checkUpToDate: true,
|
|
|
|
);
|
|
|
|
|
|
|
|
expect(logger.traceText, contains('Skipping pub get: version match.'));
|
|
|
|
});
|
|
|
|
|
|
|
|
testWithoutContext('checkUpToDate does not skip pub get if the package config is newer than the pubspec '
|
|
|
|
'but the current framework version is not the same as the last version', () async {
|
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
const FakeCommand(command: <String>[
|
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
])
|
|
|
|
]);
|
|
|
|
final BufferLogger logger = BufferLogger.test();
|
|
|
|
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
|
|
|
|
|
|
|
|
fileSystem.file('pubspec.yaml').createSync();
|
|
|
|
fileSystem.file('pubspec.lock').createSync();
|
|
|
|
fileSystem.file('.dart_tool/package_config.json').createSync(recursive: true);
|
|
|
|
fileSystem.file('.dart_tool/version').writeAsStringSync('a');
|
|
|
|
fileSystem.file('version').writeAsStringSync('b');
|
|
|
|
|
|
|
|
final Pub pub = Pub(
|
|
|
|
fileSystem: fileSystem,
|
|
|
|
logger: logger,
|
|
|
|
processManager: processManager,
|
2021-01-29 02:49:04 +00:00
|
|
|
usage: TestUsage(),
|
2020-11-10 21:56:36 +00:00
|
|
|
platform: FakePlatform(
|
|
|
|
environment: const <String, String>{},
|
|
|
|
),
|
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
);
|
|
|
|
|
|
|
|
await pub.get(
|
|
|
|
context: PubContext.pubGet,
|
|
|
|
checkUpToDate: true,
|
|
|
|
);
|
|
|
|
|
2021-03-13 00:38:04 +00:00
|
|
|
expect(processManager, hasNoRemainingExpectations);
|
2020-11-10 21:56:36 +00:00
|
|
|
expect(fileSystem.file('.dart_tool/version').readAsStringSync(), 'b');
|
|
|
|
});
|
|
|
|
|
|
|
|
testWithoutContext('checkUpToDate does not skip pub get if the package config is newer than the pubspec '
|
|
|
|
'but the current framework version does not exist yet', () async {
|
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
const FakeCommand(command: <String>[
|
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
])
|
|
|
|
]);
|
|
|
|
final BufferLogger logger = BufferLogger.test();
|
|
|
|
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
|
|
|
|
|
|
|
|
fileSystem.file('pubspec.yaml').createSync();
|
|
|
|
fileSystem.file('pubspec.lock').createSync();
|
|
|
|
fileSystem.file('.dart_tool/package_config.json').createSync(recursive: true);
|
|
|
|
fileSystem.file('version').writeAsStringSync('b');
|
|
|
|
|
|
|
|
final Pub pub = Pub(
|
|
|
|
fileSystem: fileSystem,
|
|
|
|
logger: logger,
|
|
|
|
processManager: processManager,
|
2021-01-29 02:49:04 +00:00
|
|
|
usage: TestUsage(),
|
2020-11-10 21:56:36 +00:00
|
|
|
platform: FakePlatform(
|
|
|
|
environment: const <String, String>{},
|
|
|
|
),
|
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
);
|
|
|
|
|
|
|
|
await pub.get(
|
|
|
|
context: PubContext.pubGet,
|
|
|
|
checkUpToDate: true,
|
|
|
|
);
|
|
|
|
|
2021-03-13 00:38:04 +00:00
|
|
|
expect(processManager, hasNoRemainingExpectations);
|
2020-11-10 21:56:36 +00:00
|
|
|
expect(fileSystem.file('.dart_tool/version').readAsStringSync(), 'b');
|
|
|
|
});
|
|
|
|
|
|
|
|
testWithoutContext('checkUpToDate does not skip pub get if the package config does not exist', () async {
|
|
|
|
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
|
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
FakeCommand(command: const <String>[
|
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
], onRun: () {
|
|
|
|
fileSystem.file('.dart_tool/package_config.json').createSync(recursive: true);
|
|
|
|
})
|
|
|
|
]);
|
|
|
|
final BufferLogger logger = BufferLogger.test();
|
|
|
|
|
|
|
|
fileSystem.file('pubspec.yaml').createSync();
|
|
|
|
fileSystem.file('pubspec.lock').createSync();
|
|
|
|
fileSystem.file('version').writeAsStringSync('b');
|
|
|
|
|
|
|
|
final Pub pub = Pub(
|
|
|
|
fileSystem: fileSystem,
|
|
|
|
logger: logger,
|
|
|
|
processManager: processManager,
|
2021-01-29 02:49:04 +00:00
|
|
|
usage: TestUsage(),
|
2020-11-10 21:56:36 +00:00
|
|
|
platform: FakePlatform(
|
|
|
|
environment: const <String, String>{},
|
|
|
|
),
|
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
);
|
|
|
|
|
|
|
|
await pub.get(
|
|
|
|
context: PubContext.pubGet,
|
|
|
|
checkUpToDate: true,
|
|
|
|
);
|
|
|
|
|
2021-03-13 00:38:04 +00:00
|
|
|
expect(processManager, hasNoRemainingExpectations);
|
2020-11-10 21:56:36 +00:00
|
|
|
expect(fileSystem.file('.dart_tool/version').readAsStringSync(), 'b');
|
|
|
|
});
|
|
|
|
|
|
|
|
testWithoutContext('checkUpToDate does not skip pub get if the pubspec.lock does not exist', () async {
|
|
|
|
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
|
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
const FakeCommand(command: <String>[
|
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
]),
|
|
|
|
]);
|
|
|
|
final BufferLogger logger = BufferLogger.test();
|
|
|
|
|
|
|
|
fileSystem.file('pubspec.yaml').createSync();
|
|
|
|
fileSystem.file('version').writeAsStringSync('b');
|
|
|
|
fileSystem.file('.dart_tool/package_config.json').createSync(recursive: true);
|
|
|
|
fileSystem.file('.dart_tool/version').writeAsStringSync('b');
|
|
|
|
|
|
|
|
final Pub pub = Pub(
|
|
|
|
fileSystem: fileSystem,
|
|
|
|
logger: logger,
|
|
|
|
processManager: processManager,
|
2021-01-29 02:49:04 +00:00
|
|
|
usage: TestUsage(),
|
2020-11-10 21:56:36 +00:00
|
|
|
platform: FakePlatform(
|
|
|
|
environment: const <String, String>{},
|
|
|
|
),
|
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
);
|
|
|
|
|
|
|
|
await pub.get(
|
|
|
|
context: PubContext.pubGet,
|
|
|
|
checkUpToDate: true,
|
|
|
|
);
|
|
|
|
|
2021-03-13 00:38:04 +00:00
|
|
|
expect(processManager, hasNoRemainingExpectations);
|
2020-11-10 21:56:36 +00:00
|
|
|
expect(fileSystem.file('.dart_tool/version').readAsStringSync(), 'b');
|
|
|
|
});
|
|
|
|
|
|
|
|
testWithoutContext('checkUpToDate does not skip pub get if the package config is older that the pubspec', () async {
|
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
const FakeCommand(command: <String>[
|
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
])
|
|
|
|
]);
|
|
|
|
final BufferLogger logger = BufferLogger.test();
|
|
|
|
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
|
|
|
|
|
|
|
|
fileSystem.file('pubspec.yaml').createSync();
|
|
|
|
fileSystem.file('pubspec.lock').createSync();
|
|
|
|
fileSystem.file('.dart_tool/package_config.json')
|
|
|
|
..createSync(recursive: true)
|
|
|
|
..setLastModifiedSync(DateTime(1991));
|
|
|
|
fileSystem.file('version').writeAsStringSync('b');
|
|
|
|
|
|
|
|
final Pub pub = Pub(
|
|
|
|
fileSystem: fileSystem,
|
|
|
|
logger: logger,
|
|
|
|
processManager: processManager,
|
2021-01-29 02:49:04 +00:00
|
|
|
usage: TestUsage(),
|
2020-11-10 21:56:36 +00:00
|
|
|
platform: FakePlatform(
|
|
|
|
environment: const <String, String>{},
|
|
|
|
),
|
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
);
|
|
|
|
|
|
|
|
await pub.get(
|
|
|
|
context: PubContext.pubGet,
|
|
|
|
checkUpToDate: true,
|
|
|
|
);
|
|
|
|
|
2021-03-13 00:38:04 +00:00
|
|
|
expect(processManager, hasNoRemainingExpectations);
|
2020-11-10 21:56:36 +00:00
|
|
|
expect(fileSystem.file('.dart_tool/version').readAsStringSync(), 'b');
|
|
|
|
});
|
|
|
|
|
|
|
|
testWithoutContext('checkUpToDate does not skip pub get if the pubspec.lock is older that the pubspec', () async {
|
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
const FakeCommand(command: <String>[
|
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
])
|
|
|
|
]);
|
|
|
|
final BufferLogger logger = BufferLogger.test();
|
|
|
|
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
|
|
|
|
|
|
|
|
fileSystem.file('pubspec.yaml').createSync();
|
|
|
|
fileSystem.file('pubspec.lock')
|
|
|
|
..createSync()
|
|
|
|
..setLastModifiedSync(DateTime(1991));
|
|
|
|
fileSystem.file('.dart_tool/package_config.json')
|
|
|
|
.createSync(recursive: true);
|
|
|
|
fileSystem.file('version').writeAsStringSync('b');
|
|
|
|
fileSystem.file('.dart_tool/version').writeAsStringSync('b');
|
|
|
|
|
|
|
|
final Pub pub = Pub(
|
|
|
|
fileSystem: fileSystem,
|
|
|
|
logger: logger,
|
|
|
|
processManager: processManager,
|
2021-01-29 02:49:04 +00:00
|
|
|
usage: TestUsage(),
|
2020-11-10 21:56:36 +00:00
|
|
|
platform: FakePlatform(
|
|
|
|
environment: const <String, String>{},
|
|
|
|
),
|
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
);
|
|
|
|
|
|
|
|
await pub.get(
|
|
|
|
context: PubContext.pubGet,
|
|
|
|
checkUpToDate: true,
|
|
|
|
);
|
|
|
|
|
2021-03-13 00:38:04 +00:00
|
|
|
expect(processManager, hasNoRemainingExpectations);
|
2020-11-10 21:56:36 +00:00
|
|
|
expect(fileSystem.file('.dart_tool/version').readAsStringSync(), 'b');
|
|
|
|
});
|
|
|
|
|
2020-04-22 23:34:12 +00:00
|
|
|
testWithoutContext('pub get 69', () async {
|
2017-09-01 02:35:05 +00:00
|
|
|
String error;
|
2017-12-02 00:20:06 +00:00
|
|
|
|
2021-04-13 20:53:18 +00:00
|
|
|
const FakeCommand pubGetCommand = FakeCommand(
|
|
|
|
command: <String>[
|
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
],
|
|
|
|
exitCode: 69,
|
|
|
|
environment: <String, String>{'FLUTTER_ROOT': '', 'PUB_ENVIRONMENT': 'flutter_cli:flutter_tests'},
|
|
|
|
);
|
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
pubGetCommand,
|
|
|
|
pubGetCommand,
|
|
|
|
pubGetCommand,
|
|
|
|
pubGetCommand,
|
|
|
|
pubGetCommand,
|
|
|
|
pubGetCommand,
|
|
|
|
pubGetCommand,
|
|
|
|
pubGetCommand,
|
|
|
|
pubGetCommand,
|
|
|
|
pubGetCommand,
|
|
|
|
]);
|
2020-04-22 23:34:12 +00:00
|
|
|
final BufferLogger logger = BufferLogger.test();
|
2021-02-18 05:26:03 +00:00
|
|
|
final FileSystem fileSystem = MemoryFileSystem.test();
|
2020-04-22 23:34:12 +00:00
|
|
|
final Pub pub = Pub(
|
2021-02-18 05:26:03 +00:00
|
|
|
fileSystem: fileSystem,
|
2020-04-22 23:34:12 +00:00
|
|
|
logger: logger,
|
2021-04-13 20:53:18 +00:00
|
|
|
processManager: processManager,
|
2021-01-29 02:49:04 +00:00
|
|
|
usage: TestUsage(),
|
2020-04-22 23:34:12 +00:00
|
|
|
platform: FakePlatform(
|
|
|
|
environment: const <String, String>{},
|
|
|
|
),
|
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
);
|
2017-12-02 00:20:06 +00:00
|
|
|
|
2018-09-12 06:29:29 +00:00
|
|
|
FakeAsync().run((FakeAsync time) {
|
2020-04-22 23:34:12 +00:00
|
|
|
expect(logger.statusText, '');
|
2020-10-23 17:00:56 +00:00
|
|
|
pub.get(context: PubContext.flutterTests).then((void value) {
|
2017-09-01 02:35:05 +00:00
|
|
|
error = 'test completed unexpectedly';
|
2017-12-05 22:46:39 +00:00
|
|
|
}, onError: (dynamic thrownError) {
|
|
|
|
error = 'test failed unexpectedly: $thrownError';
|
2017-09-01 02:35:05 +00:00
|
|
|
});
|
|
|
|
time.elapse(const Duration(milliseconds: 500));
|
2020-04-22 23:34:12 +00:00
|
|
|
expect(logger.statusText,
|
2019-05-21 14:38:58 +00:00
|
|
|
'Running "flutter pub get" in /...\n'
|
2019-10-11 02:37:01 +00:00
|
|
|
'pub get failed (server unavailable) -- attempting retry 1 in 1 second...\n',
|
2017-09-01 02:35:05 +00:00
|
|
|
);
|
2021-04-13 20:53:18 +00:00
|
|
|
|
2017-09-01 02:35:05 +00:00
|
|
|
time.elapse(const Duration(milliseconds: 500));
|
2020-04-22 23:34:12 +00:00
|
|
|
expect(logger.statusText,
|
2019-05-21 14:38:58 +00:00
|
|
|
'Running "flutter pub get" in /...\n'
|
2019-10-11 02:37:01 +00:00
|
|
|
'pub get failed (server unavailable) -- attempting retry 1 in 1 second...\n'
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 2 in 2 seconds...\n',
|
2017-09-01 02:35:05 +00:00
|
|
|
);
|
|
|
|
time.elapse(const Duration(seconds: 1));
|
2020-04-22 23:34:12 +00:00
|
|
|
expect(logger.statusText,
|
2019-05-21 14:38:58 +00:00
|
|
|
'Running "flutter pub get" in /...\n'
|
2019-10-11 02:37:01 +00:00
|
|
|
'pub get failed (server unavailable) -- attempting retry 1 in 1 second...\n'
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 2 in 2 seconds...\n',
|
2017-09-01 02:35:05 +00:00
|
|
|
);
|
|
|
|
time.elapse(const Duration(seconds: 100)); // from t=0 to t=100
|
2020-04-22 23:34:12 +00:00
|
|
|
expect(logger.statusText,
|
2019-05-21 14:38:58 +00:00
|
|
|
'Running "flutter pub get" in /...\n'
|
2019-10-11 02:37:01 +00:00
|
|
|
'pub get failed (server unavailable) -- attempting retry 1 in 1 second...\n'
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 2 in 2 seconds...\n'
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 3 in 4 seconds...\n' // at t=1
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 4 in 8 seconds...\n' // at t=5
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 5 in 16 seconds...\n' // at t=13
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 6 in 32 seconds...\n' // at t=29
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 7 in 64 seconds...\n', // at t=61
|
2017-09-01 02:35:05 +00:00
|
|
|
);
|
|
|
|
time.elapse(const Duration(seconds: 200)); // from t=0 to t=200
|
2020-04-22 23:34:12 +00:00
|
|
|
expect(logger.statusText,
|
2019-05-21 14:38:58 +00:00
|
|
|
'Running "flutter pub get" in /...\n'
|
2019-10-11 02:37:01 +00:00
|
|
|
'pub get failed (server unavailable) -- attempting retry 1 in 1 second...\n'
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 2 in 2 seconds...\n'
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 3 in 4 seconds...\n'
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 4 in 8 seconds...\n'
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 5 in 16 seconds...\n'
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 6 in 32 seconds...\n'
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 7 in 64 seconds...\n'
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 8 in 64 seconds...\n' // at t=39
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 9 in 64 seconds...\n' // at t=103
|
|
|
|
'pub get failed (server unavailable) -- attempting retry 10 in 64 seconds...\n', // at t=167
|
2017-09-01 02:35:05 +00:00
|
|
|
);
|
|
|
|
});
|
2020-04-22 23:34:12 +00:00
|
|
|
expect(logger.errorText, isEmpty);
|
2017-09-01 02:35:05 +00:00
|
|
|
expect(error, isNull);
|
2021-04-13 20:53:18 +00:00
|
|
|
expect(processManager, hasNoRemainingExpectations);
|
2017-12-05 22:46:39 +00:00
|
|
|
});
|
|
|
|
|
2020-04-22 23:34:12 +00:00
|
|
|
testWithoutContext('pub get 66 shows message from pub', () async {
|
|
|
|
final BufferLogger logger = BufferLogger.test();
|
2021-02-18 05:26:03 +00:00
|
|
|
final FileSystem fileSystem = MemoryFileSystem.test();
|
2021-04-13 20:53:18 +00:00
|
|
|
|
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
const FakeCommand(
|
|
|
|
command: <String>[
|
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
],
|
|
|
|
exitCode: 66,
|
|
|
|
stderr: 'err1\nerr2\nerr3\n',
|
|
|
|
stdout: 'out1\nout2\nout3\n',
|
|
|
|
environment: <String, String>{'FLUTTER_ROOT': '', 'PUB_ENVIRONMENT': 'flutter_cli:flutter_tests'},
|
|
|
|
),
|
|
|
|
]);
|
|
|
|
|
2020-04-22 23:34:12 +00:00
|
|
|
final Pub pub = Pub(
|
|
|
|
platform: FakePlatform(environment: const <String, String>{}),
|
2021-02-18 05:26:03 +00:00
|
|
|
fileSystem: fileSystem,
|
2020-04-22 23:34:12 +00:00
|
|
|
logger: logger,
|
2021-01-29 02:49:04 +00:00
|
|
|
usage: TestUsage(),
|
2020-04-22 23:34:12 +00:00
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
2021-04-13 20:53:18 +00:00
|
|
|
processManager: processManager,
|
2020-04-22 23:34:12 +00:00
|
|
|
);
|
2019-10-11 02:37:01 +00:00
|
|
|
try {
|
2020-10-23 17:00:56 +00:00
|
|
|
await pub.get(context: PubContext.flutterTests);
|
2019-10-11 02:37:01 +00:00
|
|
|
throw AssertionError('pubGet did not fail');
|
|
|
|
} on ToolExit catch (error) {
|
|
|
|
expect(error.message, 'pub get failed (66; err3)');
|
|
|
|
}
|
2020-04-22 23:34:12 +00:00
|
|
|
expect(logger.statusText,
|
2019-10-11 02:37:01 +00:00
|
|
|
'Running "flutter pub get" in /...\n'
|
|
|
|
'out1\n'
|
|
|
|
'out2\n'
|
|
|
|
'out3\n'
|
|
|
|
);
|
2020-04-22 23:34:12 +00:00
|
|
|
expect(logger.errorText,
|
2019-10-11 02:37:01 +00:00
|
|
|
'err1\n'
|
|
|
|
'err2\n'
|
|
|
|
'err3\n'
|
|
|
|
);
|
2021-04-13 20:53:18 +00:00
|
|
|
expect(processManager, hasNoRemainingExpectations);
|
2019-10-11 02:37:01 +00:00
|
|
|
});
|
|
|
|
|
2020-04-22 23:34:12 +00:00
|
|
|
testWithoutContext('pub cache in root is used', () async {
|
2017-12-05 22:46:39 +00:00
|
|
|
String error;
|
2021-02-18 05:26:03 +00:00
|
|
|
final FileSystem fileSystem = MemoryFileSystem.test();
|
2021-04-13 20:53:18 +00:00
|
|
|
final Directory pubCache = fileSystem.directory(Cache.flutterRoot).childDirectory('.pub-cache')..createSync();
|
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
FakeCommand(
|
|
|
|
command: const <String>[
|
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
],
|
|
|
|
exitCode: 69,
|
|
|
|
environment: <String, String>{
|
|
|
|
'FLUTTER_ROOT': '',
|
|
|
|
'PUB_ENVIRONMENT': 'flutter_cli:flutter_tests',
|
|
|
|
'PUB_CACHE': pubCache.path,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
]);
|
2021-02-18 05:26:03 +00:00
|
|
|
|
2020-04-22 23:34:12 +00:00
|
|
|
final Pub pub = Pub(
|
|
|
|
platform: FakePlatform(environment: const <String, String>{}),
|
2021-01-29 02:49:04 +00:00
|
|
|
usage: TestUsage(),
|
2021-02-18 05:26:03 +00:00
|
|
|
fileSystem: fileSystem,
|
2020-04-22 23:34:12 +00:00
|
|
|
logger: BufferLogger.test(),
|
2021-04-13 20:53:18 +00:00
|
|
|
processManager: processManager,
|
2020-04-22 23:34:12 +00:00
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
);
|
2017-12-05 22:46:39 +00:00
|
|
|
|
2018-09-12 06:29:29 +00:00
|
|
|
FakeAsync().run((FakeAsync time) {
|
2020-10-23 17:00:56 +00:00
|
|
|
pub.get(context: PubContext.flutterTests).then((void value) {
|
2017-12-05 22:46:39 +00:00
|
|
|
error = 'test completed unexpectedly';
|
|
|
|
}, onError: (dynamic thrownError) {
|
|
|
|
error = 'test failed unexpectedly: $thrownError';
|
|
|
|
});
|
|
|
|
time.elapse(const Duration(milliseconds: 500));
|
|
|
|
expect(error, isNull);
|
2021-04-13 20:53:18 +00:00
|
|
|
expect(processManager, hasNoRemainingExpectations);
|
2017-12-05 22:46:39 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2020-04-22 23:34:12 +00:00
|
|
|
testWithoutContext('pub cache in environment is used', () async {
|
2021-02-18 05:26:03 +00:00
|
|
|
final FileSystem fileSystem = MemoryFileSystem.test();
|
|
|
|
fileSystem.directory('custom/pub-cache/path').createSync(recursive: true);
|
2021-04-13 20:53:18 +00:00
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
const FakeCommand(
|
|
|
|
command: <String>[
|
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
],
|
|
|
|
exitCode: 69,
|
|
|
|
environment: <String, String>{
|
|
|
|
'FLUTTER_ROOT': '',
|
|
|
|
'PUB_ENVIRONMENT': 'flutter_cli:flutter_tests',
|
|
|
|
'PUB_CACHE': 'custom/pub-cache/path',
|
|
|
|
},
|
|
|
|
),
|
|
|
|
]);
|
2020-04-22 23:34:12 +00:00
|
|
|
final Pub pub = Pub(
|
2021-02-18 05:26:03 +00:00
|
|
|
fileSystem: fileSystem,
|
2020-04-22 23:34:12 +00:00
|
|
|
logger: BufferLogger.test(),
|
2021-04-13 20:53:18 +00:00
|
|
|
processManager: processManager,
|
2021-01-29 02:49:04 +00:00
|
|
|
usage: TestUsage(),
|
2020-04-22 23:34:12 +00:00
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
platform: FakePlatform(
|
|
|
|
environment: const <String, String>{
|
|
|
|
'PUB_CACHE': 'custom/pub-cache/path',
|
|
|
|
},
|
|
|
|
),
|
|
|
|
);
|
2017-12-05 22:46:39 +00:00
|
|
|
|
2018-09-12 06:29:29 +00:00
|
|
|
FakeAsync().run((FakeAsync time) {
|
2020-04-22 23:34:12 +00:00
|
|
|
String error;
|
2020-10-23 17:00:56 +00:00
|
|
|
pub.get(context: PubContext.flutterTests).then((void value) {
|
2017-12-05 22:46:39 +00:00
|
|
|
error = 'test completed unexpectedly';
|
|
|
|
}, onError: (dynamic thrownError) {
|
|
|
|
error = 'test failed unexpectedly: $thrownError';
|
|
|
|
});
|
|
|
|
time.elapse(const Duration(milliseconds: 500));
|
|
|
|
expect(error, isNull);
|
2021-04-13 20:53:18 +00:00
|
|
|
expect(processManager, hasNoRemainingExpectations);
|
2017-12-05 22:46:39 +00:00
|
|
|
});
|
2017-09-01 02:35:05 +00:00
|
|
|
});
|
2019-10-03 18:08:42 +00:00
|
|
|
|
2020-04-22 23:34:12 +00:00
|
|
|
testWithoutContext('analytics sent on success', () async {
|
2020-07-15 17:12:52 +00:00
|
|
|
final FileSystem fileSystem = MemoryFileSystem.test();
|
2021-01-29 02:49:04 +00:00
|
|
|
final TestUsage usage = TestUsage();
|
2020-04-22 23:34:12 +00:00
|
|
|
final Pub pub = Pub(
|
2020-07-15 17:12:52 +00:00
|
|
|
fileSystem: fileSystem,
|
2020-04-22 23:34:12 +00:00
|
|
|
logger: BufferLogger.test(),
|
2021-04-13 20:53:18 +00:00
|
|
|
processManager: FakeProcessManager.any(),
|
2020-04-22 23:34:12 +00:00
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
usage: usage,
|
|
|
|
platform: FakePlatform(
|
|
|
|
environment: const <String, String>{
|
|
|
|
'PUB_CACHE': 'custom/pub-cache/path',
|
|
|
|
}
|
|
|
|
),
|
|
|
|
);
|
2020-11-10 21:56:36 +00:00
|
|
|
fileSystem.file('version').createSync();
|
2020-07-15 17:12:52 +00:00
|
|
|
fileSystem.file('pubspec.yaml').createSync();
|
|
|
|
fileSystem.file('.dart_tool/package_config.json')
|
|
|
|
..createSync(recursive: true)
|
|
|
|
..writeAsStringSync('{"configVersion": 2,"packages": []}');
|
2020-04-22 23:34:12 +00:00
|
|
|
|
2020-07-15 17:12:52 +00:00
|
|
|
await pub.get(
|
|
|
|
context: PubContext.flutterTests,
|
|
|
|
generateSyntheticPackage: true,
|
|
|
|
);
|
2021-01-29 02:49:04 +00:00
|
|
|
expect(usage.events, contains(
|
|
|
|
const TestUsageEvent('pub-result', 'flutter-tests', label: 'success'),
|
|
|
|
));
|
2019-10-03 18:08:42 +00:00
|
|
|
});
|
|
|
|
|
2020-10-07 15:46:11 +00:00
|
|
|
testWithoutContext('package_config_subset file is generated from packages and not timestamp', () async {
|
|
|
|
final FileSystem fileSystem = MemoryFileSystem.test();
|
2021-01-29 02:49:04 +00:00
|
|
|
final TestUsage usage = TestUsage();
|
2020-10-07 15:46:11 +00:00
|
|
|
final Pub pub = Pub(
|
|
|
|
fileSystem: fileSystem,
|
|
|
|
logger: BufferLogger.test(),
|
2021-04-13 20:53:18 +00:00
|
|
|
processManager: FakeProcessManager.any(),
|
2020-10-07 15:46:11 +00:00
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
usage: usage,
|
|
|
|
platform: FakePlatform(
|
|
|
|
environment: const <String, String>{
|
|
|
|
'PUB_CACHE': 'custom/pub-cache/path',
|
|
|
|
}
|
|
|
|
),
|
|
|
|
);
|
2020-11-10 21:56:36 +00:00
|
|
|
fileSystem.file('version').createSync();
|
2020-10-07 15:46:11 +00:00
|
|
|
fileSystem.file('pubspec.yaml').createSync();
|
|
|
|
fileSystem.file('.dart_tool/package_config.json')
|
|
|
|
..createSync(recursive: true)
|
|
|
|
..writeAsStringSync('''
|
|
|
|
{"configVersion": 2,"packages": [
|
|
|
|
{
|
|
|
|
"name": "flutter_tools",
|
|
|
|
"rootUri": "../",
|
|
|
|
"packageUri": "lib/",
|
|
|
|
"languageVersion": "2.7"
|
|
|
|
}
|
|
|
|
],"generated":"some-time"}
|
|
|
|
''');
|
|
|
|
|
|
|
|
await pub.get(
|
|
|
|
context: PubContext.flutterTests,
|
|
|
|
generateSyntheticPackage: true,
|
|
|
|
);
|
|
|
|
|
|
|
|
expect(
|
|
|
|
fileSystem.file('.dart_tool/package_config_subset').readAsStringSync(),
|
|
|
|
'flutter_tools\n'
|
|
|
|
'2.7\n'
|
|
|
|
'file:///\n'
|
|
|
|
'file:///lib/\n'
|
|
|
|
'2\n',
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
2020-04-22 23:34:12 +00:00
|
|
|
testWithoutContext('analytics sent on failure', () async {
|
2021-02-18 05:26:03 +00:00
|
|
|
final FileSystem fileSystem = MemoryFileSystem.test();
|
|
|
|
fileSystem.directory('custom/pub-cache/path').createSync(recursive: true);
|
2021-01-29 02:49:04 +00:00
|
|
|
final TestUsage usage = TestUsage();
|
2021-04-13 20:53:18 +00:00
|
|
|
|
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
const FakeCommand(
|
|
|
|
command: <String>[
|
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
],
|
|
|
|
exitCode: 1,
|
|
|
|
),
|
|
|
|
]);
|
|
|
|
|
2020-04-22 23:34:12 +00:00
|
|
|
final Pub pub = Pub(
|
|
|
|
usage: usage,
|
2021-02-18 05:26:03 +00:00
|
|
|
fileSystem: fileSystem,
|
2020-04-22 23:34:12 +00:00
|
|
|
logger: BufferLogger.test(),
|
2021-04-13 20:53:18 +00:00
|
|
|
processManager: processManager,
|
2020-04-22 23:34:12 +00:00
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
platform: FakePlatform(
|
|
|
|
environment: const <String, String>{
|
|
|
|
'PUB_CACHE': 'custom/pub-cache/path',
|
|
|
|
},
|
|
|
|
),
|
|
|
|
);
|
2019-10-03 18:08:42 +00:00
|
|
|
try {
|
2020-10-23 17:00:56 +00:00
|
|
|
await pub.get(context: PubContext.flutterTests);
|
2019-10-03 18:08:42 +00:00
|
|
|
} on ToolExit {
|
|
|
|
// Ignore.
|
|
|
|
}
|
2020-04-22 23:34:12 +00:00
|
|
|
|
2021-01-29 02:49:04 +00:00
|
|
|
expect(usage.events, contains(
|
|
|
|
const TestUsageEvent('pub-result', 'flutter-tests', label: 'failure'),
|
|
|
|
));
|
2021-04-13 20:53:18 +00:00
|
|
|
expect(processManager, hasNoRemainingExpectations);
|
2019-10-03 18:08:42 +00:00
|
|
|
});
|
|
|
|
|
2020-04-22 23:34:12 +00:00
|
|
|
testWithoutContext('analytics sent on failed version solve', () async {
|
2021-01-29 02:49:04 +00:00
|
|
|
final TestUsage usage = TestUsage();
|
2020-07-15 17:12:52 +00:00
|
|
|
final FileSystem fileSystem = MemoryFileSystem.test();
|
2021-04-13 20:53:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
const FakeCommand(
|
|
|
|
command: <String>[
|
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
],
|
|
|
|
exitCode: 1,
|
|
|
|
stderr: 'version solving failed',
|
|
|
|
),
|
|
|
|
]);
|
|
|
|
|
2020-04-22 23:34:12 +00:00
|
|
|
final Pub pub = Pub(
|
2020-07-15 17:12:52 +00:00
|
|
|
fileSystem: fileSystem,
|
2020-04-22 23:34:12 +00:00
|
|
|
logger: BufferLogger.test(),
|
2021-04-13 20:53:18 +00:00
|
|
|
processManager: processManager,
|
2020-04-22 23:34:12 +00:00
|
|
|
platform: FakePlatform(
|
|
|
|
environment: <String, String>{
|
|
|
|
'PUB_CACHE': 'custom/pub-cache/path',
|
|
|
|
},
|
|
|
|
),
|
|
|
|
usage: usage,
|
|
|
|
botDetector: const BotDetectorAlwaysNo(),
|
|
|
|
);
|
2020-07-15 17:12:52 +00:00
|
|
|
fileSystem.file('pubspec.yaml').writeAsStringSync('name: foo');
|
2020-04-22 23:34:12 +00:00
|
|
|
|
2019-10-03 18:08:42 +00:00
|
|
|
try {
|
2020-10-23 17:00:56 +00:00
|
|
|
await pub.get(context: PubContext.flutterTests);
|
2019-10-03 18:08:42 +00:00
|
|
|
} on ToolExit {
|
|
|
|
// Ignore.
|
|
|
|
}
|
2020-04-22 23:34:12 +00:00
|
|
|
|
2021-01-29 02:49:04 +00:00
|
|
|
expect(usage.events, contains(
|
|
|
|
const TestUsageEvent('pub-result', 'flutter-tests', label: 'version-solving-failed'),
|
|
|
|
));
|
2021-04-13 20:53:18 +00:00
|
|
|
expect(processManager, hasNoRemainingExpectations);
|
2019-10-03 18:08:42 +00:00
|
|
|
});
|
2019-10-23 05:05:00 +00:00
|
|
|
|
2020-04-22 23:34:12 +00:00
|
|
|
testWithoutContext('Pub error handling', () async {
|
|
|
|
final BufferLogger logger = BufferLogger.test();
|
|
|
|
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
|
2019-10-23 05:05:00 +00:00
|
|
|
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[
|
|
|
|
FakeCommand(
|
|
|
|
command: const <String>[
|
2020-04-22 23:34:12 +00:00
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
2019-10-23 05:05:00 +00:00
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
],
|
|
|
|
onRun: () {
|
2020-04-22 23:34:12 +00:00
|
|
|
fileSystem.file('.dart_tool/package_config.json')
|
2020-03-05 07:03:26 +00:00
|
|
|
.setLastModifiedSync(DateTime(2002));
|
2019-10-23 05:05:00 +00:00
|
|
|
}
|
|
|
|
),
|
|
|
|
const FakeCommand(
|
|
|
|
command: <String>[
|
2020-04-22 23:34:12 +00:00
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
2019-10-23 05:05:00 +00:00
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
],
|
|
|
|
),
|
|
|
|
FakeCommand(
|
|
|
|
command: const <String>[
|
2020-04-22 23:34:12 +00:00
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
2019-10-23 05:05:00 +00:00
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
],
|
|
|
|
onRun: () {
|
2020-04-22 23:34:12 +00:00
|
|
|
fileSystem.file('pubspec.yaml')
|
2020-03-05 07:03:26 +00:00
|
|
|
.setLastModifiedSync(DateTime(2002));
|
2019-10-23 05:05:00 +00:00
|
|
|
}
|
|
|
|
),
|
2019-11-01 02:31:42 +00:00
|
|
|
const FakeCommand(
|
|
|
|
command: <String>[
|
2020-04-22 23:34:12 +00:00
|
|
|
'bin/cache/dart-sdk/bin/pub',
|
2019-11-01 02:31:42 +00:00
|
|
|
'--verbosity=warning',
|
|
|
|
'get',
|
|
|
|
'--no-precompile',
|
|
|
|
],
|
|
|
|
),
|
2019-10-23 05:05:00 +00:00
|
|
|
]);
|
2020-04-22 23:34:12 +00:00
|
|
|
final Pub pub = Pub(
|
2021-01-29 02:49:04 +00:00
|
|
|
usage: TestUsage(),
|
2020-04-22 23:34:12 +00:00
|
|
|
fileSystem: fileSystem,
|
|
|
|
logger: logger,
|
|
|
|
processManager: processManager,
|
|
|
|
platform: FakePlatform(
|
2019-10-23 05:05:00 +00:00
|
|
|
operatingSystem: 'linux', // so that the command executed is consistent
|
|
|
|
environment: <String, String>{},
|
|
|
|
),
|
2020-04-22 23:34:12 +00:00
|
|
|
botDetector: const BotDetectorAlwaysNo()
|
|
|
|
);
|
|
|
|
|
2020-11-10 21:56:36 +00:00
|
|
|
fileSystem.file('version').createSync();
|
2020-04-22 23:34:12 +00:00
|
|
|
// the good scenario: .packages is old, pub updates the file.
|
|
|
|
fileSystem.file('.dart_tool/package_config.json')
|
|
|
|
..createSync(recursive: true)
|
|
|
|
..setLastModifiedSync(DateTime(2000));
|
|
|
|
fileSystem.file('pubspec.yaml')
|
|
|
|
..createSync()
|
|
|
|
..setLastModifiedSync(DateTime(2001));
|
2020-10-23 17:00:56 +00:00
|
|
|
await pub.get(context: PubContext.flutterTests); // pub sets date of .packages to 2002
|
2020-04-22 23:34:12 +00:00
|
|
|
|
|
|
|
expect(logger.statusText, 'Running "flutter pub get" in /...\n');
|
|
|
|
expect(logger.errorText, isEmpty);
|
|
|
|
expect(fileSystem.file('pubspec.yaml').lastModifiedSync(), DateTime(2001)); // because nothing should touch it
|
|
|
|
logger.clear();
|
|
|
|
|
|
|
|
// bad scenario 1: pub doesn't update file; doesn't matter, because we do instead
|
|
|
|
fileSystem.file('.dart_tool/package_config.json')
|
|
|
|
.setLastModifiedSync(DateTime(2000));
|
|
|
|
fileSystem.file('pubspec.yaml')
|
|
|
|
.setLastModifiedSync(DateTime(2001));
|
2020-10-23 17:00:56 +00:00
|
|
|
await pub.get(context: PubContext.flutterTests); // pub does nothing
|
2020-04-22 23:34:12 +00:00
|
|
|
|
|
|
|
expect(logger.statusText, 'Running "flutter pub get" in /...\n');
|
|
|
|
expect(logger.errorText, isEmpty);
|
|
|
|
expect(fileSystem.file('pubspec.yaml').lastModifiedSync(), DateTime(2001)); // because nothing should touch it
|
|
|
|
logger.clear();
|
2019-10-23 05:05:00 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
class BotDetectorAlwaysNo implements BotDetector {
|
|
|
|
const BotDetectorAlwaysNo();
|
2020-04-22 23:34:12 +00:00
|
|
|
|
2019-10-23 05:05:00 +00:00
|
|
|
@override
|
2020-02-12 18:58:02 +00:00
|
|
|
Future<bool> get isRunningOnBot async => false;
|
2017-09-01 02:35:05 +00:00
|
|
|
}
|