[flutter_tool] Disable analytics on more bots (#50669)
This commit is contained in:
@@ -66,6 +66,11 @@ class BotDetector {
|
||||
|| _platform.environment['CHROME_HEADLESS'] == '1'
|
||||
|| _platform.environment.containsKey('BUILDBOT_BUILDERNAME')
|
||||
|| _platform.environment.containsKey('SWARMING_TASK_ID')
|
||||
|
||||
// Property when running on borg.
|
||||
|| _platform.environment.containsKey('BORG_ALLOC_DIR')
|
||||
|
||||
// Property when running on Azure.
|
||||
|| await _azureDetector.isRunningOnAzure;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,11 @@ void main() {
|
||||
when(mockHttpClientRequest.headers).thenReturn(mockHttpHeaders);
|
||||
expect(await botDetector.isRunningOnBot, isTrue);
|
||||
});
|
||||
|
||||
testWithoutContext('returns true when running on borg', () async {
|
||||
fakePlatform.environment['BORG_ALLOC_DIR'] = 'true';
|
||||
expect(await botDetector.isRunningOnBot, isTrue);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user