mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	 673cf249b0
			
		
	
	673cf249b0
	
	
	
		
			
			Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
		
			
				
	
	
		
			29 lines
		
	
	
		
			641 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			641 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| #![allow(clippy::unwrap_used)]
 | |
| 
 | |
| mod test_module;
 | |
| 
 | |
| use ::config::ConfigError;
 | |
| use router_env::TelemetryGuard;
 | |
| 
 | |
| use self::test_module::fn_with_colon;
 | |
| 
 | |
| fn logger() -> error_stack::Result<&'static TelemetryGuard, ConfigError> {
 | |
|     use std::sync::OnceLock;
 | |
| 
 | |
|     static INSTANCE: OnceLock<TelemetryGuard> = OnceLock::new();
 | |
|     Ok(INSTANCE.get_or_init(|| {
 | |
|         let config = router_env::Config::new().unwrap();
 | |
| 
 | |
|         router_env::setup(&config.log, "router_env_test", []).unwrap()
 | |
|     }))
 | |
| }
 | |
| 
 | |
| #[tokio::test]
 | |
| async fn basic() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
 | |
|     logger()?;
 | |
| 
 | |
|     fn_with_colon(13).await;
 | |
| 
 | |
|     Ok(())
 | |
| }
 |