Revert "Update helper message for --suppress-analytics" (#125141)

Reverts flutter/flutter#124810
This commit is contained in:
godofredoc
2023-04-19 09:43:29 -07:00
committed by GitHub
parent 3476b96652
commit 03d725620a
3 changed files with 39 additions and 7 deletions

View File

@@ -346,6 +346,34 @@ void main() {
ProcessManager: () => FakeProcessManager.any(),
},
);
testUsingContext(
'legacy analytics disabled will disable new analytics',
() async {
io.setExitFunctionForTests((int exitCode) {});
await runner.run(
<String>[],
() => <FlutterCommand>[],
// This flutterVersion disables crash reporting.
flutterVersion: '[user-branch]/',
shutdownHooks: ShutdownHooks(),
);
expect(globals.flutterUsage.enabled, false);
expect(globals.analytics.telemetryEnabled, false);
expect(testLogger.statusText.contains(
'Please note that analytics '
'reporting was already disabled'), true);
},
overrides: <Type, Generator>{
Analytics: () => FakeAnalytics(),
FileSystem: () => MemoryFileSystem.test(),
ProcessManager: () => FakeProcessManager.any(),
Usage: () => legacyAnalytics,
},
);
});
}