()
| 103 | |
| 104 | #[test] |
| 105 | fn test_from_args() { |
| 106 | let args = RunArgs { |
| 107 | instruments: vec!["mongodb".into()], |
| 108 | mongo_uri_env_name: Some("MONGODB_URI".into()), |
| 109 | ..RunArgs::test() |
| 110 | }; |
| 111 | let instruments = Instruments::try_from(&args).unwrap(); |
| 112 | assert_eq!( |
| 113 | instruments.mongodb, |
| 114 | Some(MongoDBConfig { |
| 115 | uri_env_name: Some("MONGODB_URI".into()) |
| 116 | }) |
| 117 | ); |
| 118 | assert!(instruments.is_mongodb_enabled()); |
| 119 | } |
| 120 | |
| 121 | #[test] |
| 122 | fn test_from_args_mongodb_disabled() { |
nothing calls this directly
no outgoing calls
no test coverage detected