()
| 818 | #[tokio::test] |
| 819 | #[ignore = "needs auth which is not in CI"] |
| 820 | async fn test_all_telemetry() { |
| 821 | let mut database = Database::new().await.unwrap(); |
| 822 | let thread = TelemetryThread::new(&Env::new(), &Fs::new(), &mut database) |
| 823 | .await |
| 824 | .unwrap(); |
| 825 | |
| 826 | thread.send_user_logged_in().ok(); |
| 827 | thread |
| 828 | .send_cli_subcommand_executed(&database, &RootSubcommand::Version { changelog: None }) |
| 829 | .await |
| 830 | .ok(); |
| 831 | thread |
| 832 | .send_chat_added_message( |
| 833 | &database, |
| 834 | "conv_id".to_owned(), |
| 835 | TelemetryResult::Succeeded, |
| 836 | ChatAddedMessageParams { |
| 837 | message_id: Some("message_id".to_owned()), |
| 838 | context_file_length: Some(123), |
| 839 | ..Default::default() |
| 840 | }, |
| 841 | ) |
| 842 | .await |
| 843 | .ok(); |
| 844 | |
| 845 | drop(thread); |
| 846 | |
| 847 | assert!(!logs_contain("ERROR")); |
| 848 | assert!(!logs_contain("error")); |
| 849 | assert!(!logs_contain("WARN")); |
| 850 | assert!(!logs_contain("warn")); |
| 851 | assert!(!logs_contain("Failed to post metric")); |
| 852 | } |
| 853 | |
| 854 | #[tokio::test] |
| 855 | #[ignore = "needs auth which is not in CI"] |
nothing calls this directly
no test coverage detected