MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / v1_routes_exist

Function v1_routes_exist

nodedb/src/control/server/http/server.rs:414–457  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

412
413 #[tokio::test]
414 async fn v1_routes_exist() {
415 let r = stub_router();
416 assert_eq!(
417 status_for(&r, Method::POST, "/v1/query").await,
418 StatusCode::OK
419 );
420 assert_eq!(
421 status_for(&r, Method::POST, "/v1/query/stream").await,
422 StatusCode::OK
423 );
424 assert_eq!(
425 status_for(&r, Method::GET, "/v1/status").await,
426 StatusCode::OK
427 );
428 assert_eq!(
429 status_for(&r, Method::GET, "/v1/cluster/status").await,
430 StatusCode::OK
431 );
432 assert_eq!(
433 status_for(&r, Method::POST, "/v1/auth/exchange-key").await,
434 StatusCode::OK
435 );
436 assert_eq!(
437 status_for(&r, Method::POST, "/v1/auth/session").await,
438 StatusCode::OK
439 );
440 assert_eq!(
441 status_for(&r, Method::DELETE, "/v1/auth/session").await,
442 StatusCode::OK
443 );
444 assert_eq!(
445 status_for(&r, Method::POST, "/v1/collections/mycoll/crdt/apply").await,
446 StatusCode::OK
447 );
448 assert_eq!(status_for(&r, Method::GET, "/v1/ws").await, StatusCode::OK);
449 assert_eq!(
450 status_for(&r, Method::GET, "/v1/streams/mystream/poll").await,
451 StatusCode::OK
452 );
453 assert_eq!(
454 status_for(&r, Method::GET, "/v1/streams/mystream/events").await,
455 StatusCode::OK
456 );
457 }
458
459 #[tokio::test]
460 async fn promql_route_exists() {

Callers

nothing calls this directly

Calls 1

stub_routerFunction · 0.85

Tested by

no test coverage detected