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

Function client_context

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

Source from the content-addressed store, hash-verified

777
778 #[tokio::test]
779 async fn client_context() {
780 let mut database = Database::new().await.unwrap();
781 let client = TelemetryClient::new(&Env::new(), &Fs::new(), &mut database)
782 .await
783 .unwrap();
784 let context = client.user_context().unwrap();
785
786 assert_eq!(context.ide_category, IdeCategory::Cli);
787 assert!(matches!(
788 context.operating_system,
789 OperatingSystem::Linux | OperatingSystem::Mac | OperatingSystem::Windows
790 ));
791 assert_eq!(context.product, PRODUCT);
792 assert_eq!(
793 context.client_id,
794 Some(uuid!("ffffffff-ffff-ffff-ffff-ffffffffffff").hyphenated().to_string())
795 );
796 assert_eq!(context.ide_version.as_deref(), Some(PRODUCT_VERSION));
797 }
798
799 #[tracing_test::traced_test]
800 #[tokio::test]

Callers

nothing calls this directly

Calls 1

user_contextMethod · 0.45

Tested by

no test coverage detected