MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / test_without_optout

Function test_without_optout

crates/chat-cli/src/telemetry/mod.rs:856–879  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

854 #[tokio::test]
855 #[ignore = "needs auth which is not in CI"]
856 async fn test_without_optout() {
857 let mut database = Database::new().await.unwrap();
858 let client = TelemetryClient::new(&Env::new(), &Fs::new(), &mut database)
859 .await
860 .unwrap();
861 client
862 .codewhisperer_client
863 .as_ref()
864 .expect("cw telemetry client should exist")
865 .send_telemetry_event(
866 TelemetryEvent::ChatAddMessageEvent(
867 ChatAddMessageEvent::builder()
868 .conversation_id("debug".to_owned())
869 .message_id("debug".to_owned())
870 .build()
871 .unwrap(),
872 ),
873 client.user_context().unwrap(),
874 false,
875 Some("model".to_owned()),
876 )
877 .await
878 .unwrap();
879 }
880}

Callers

nothing calls this directly

Calls 7

ChatAddMessageEventClass · 0.85
send_telemetry_eventMethod · 0.45
as_refMethod · 0.45
buildMethod · 0.45
message_idMethod · 0.45
conversation_idMethod · 0.45
user_contextMethod · 0.45

Tested by

no test coverage detected