MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / test_from_args

Function test_from_args

src/instruments/mod.rs:105–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected