File tree Expand file tree Collapse file tree 1 file changed +1
-32
lines changed Expand file tree Collapse file tree 1 file changed +1
-32
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ async fn run_oneshot(file_path: &str, config: &Config) -> anyhow::Result<()> {
167167
168168#[ rocket:: launch]
169169fn rocket ( ) -> _ {
170- tracing_subscriber:: fmt:: init ( ) ;
170+ tracing_subscriber:: fmt:: try_init ( ) . ok ( ) ;
171171
172172 let cli = Cli :: parse ( ) ;
173173
@@ -208,34 +208,3 @@ fn rocket() -> _ {
208208 } )
209209 } ) )
210210}
211-
212- #[ cfg( test) ]
213- mod tests {
214- use super :: * ;
215- use rocket:: http:: { ContentType , Status } ;
216- use rocket:: local:: asynchronous:: Client ;
217-
218- #[ tokio:: test]
219- async fn test_health_endpoint ( ) {
220- let client = Client :: tracked ( rocket ( ) )
221- . await
222- . expect ( "valid rocket instance" ) ;
223- let response = client. get ( "/health" ) . dispatch ( ) . await ;
224- assert_eq ! ( response. status( ) , Status :: Ok ) ;
225- }
226-
227- #[ tokio:: test]
228- async fn test_verify_endpoint_invalid_request ( ) {
229- let client = Client :: tracked ( rocket ( ) )
230- . await
231- . expect ( "valid rocket instance" ) ;
232- let response = client
233- . post ( "/verify" )
234- . header ( ContentType :: JSON )
235- . body ( r#"{"invalid": "request"}"# )
236- . dispatch ( )
237- . await ;
238-
239- assert_eq ! ( response. status( ) , Status :: UnprocessableEntity ) ;
240- }
241- }
You can’t perform that action at this time.
0 commit comments