Skip to content

Commit 6340a8e

Browse files
author
Devdutt Shenoi
committed
don't handle test path
1 parent 3902bd2 commit 6340a8e

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

src/handlers/http/logstream.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ pub async fn get_stats(
227227
) -> Result<HttpResponse, StreamError> {
228228
let stream_name = stream_name.into_inner();
229229

230-
if cfg!(not(test)) && !PARSEABLE.streams.contains(&stream_name) {
230+
if !PARSEABLE.streams.contains(&stream_name) {
231231
// For query mode, if the stream not found in memory map,
232232
//check if it exists in the storage
233233
//create stream and schema from storage
@@ -634,27 +634,6 @@ mod tests {
634634

635635
use crate::handlers::http::modal::utils::logstream_utils::PutStreamHeaders;
636636

637-
// TODO: Fix this test with routes
638-
// #[actix_web::test]
639-
// #[should_panic]
640-
// async fn get_stats_panics_without_logstream() {
641-
// let req = TestRequest::default().to_http_request();
642-
// let _ = get_stats(req).await;
643-
// }
644-
645-
// #[actix_web::test]
646-
// async fn get_stats_stream_not_found_error_for_unknown_logstream() -> anyhow::Result<()> {
647-
// match get_stats(
648-
// web::Path::from("test".to_string()),
649-
// Query(StatsParams { date: None }),
650-
// )
651-
// .await
652-
// {
653-
// Err(StreamError::StreamNotFound(_)) => Ok(()),
654-
// _ => bail!("expected StreamNotFound error"),
655-
// }
656-
// }
657-
658637
#[actix_web::test]
659638
async fn header_without_log_source() {
660639
let req = TestRequest::default().to_http_request();

0 commit comments

Comments
 (0)