File tree Expand file tree Collapse file tree
rsworkspace/crates/trogon-gateway/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1111,7 +1111,7 @@ fn resolve_sentry(
11111111) -> Option < trogon_source_sentry:: SentryConfig > {
11121112 let explicitly_enabled = matches ! (
11131113 section. status. as_deref( ) ,
1114- Some ( status) if status. eq_ignore_ascii_case( "enabled" )
1114+ Some ( status) if status. trim ( ) . eq_ignore_ascii_case( "enabled" )
11151115 ) ;
11161116
11171117 if !resolve_source_status ( "sentry" , section. status . as_deref ( ) , errors) {
@@ -1624,6 +1624,19 @@ status = "enabled"
16241624 ) ;
16251625 }
16261626
1627+ #[ test]
1628+ fn sentry_enabled_with_surrounding_whitespace_without_client_secret_is_invalid ( ) {
1629+ let toml = r#"
1630+ [sources.sentry]
1631+ status = " enabled "
1632+ "# ;
1633+ let f = write_toml ( toml) ;
1634+ let result = load ( Some ( f. path ( ) ) ) ;
1635+ assert ! (
1636+ matches!( result, Err ( ConfigError :: Validation ( ref errs) ) if errs. iter( ) . any( |e| e. contains( "sentry: missing client_secret" ) ) )
1637+ ) ;
1638+ }
1639+
16271640 #[ test]
16281641 fn notion_missing_token_returns_none ( ) {
16291642 let toml = r#"
You can’t perform that action at this time.
0 commit comments