Initial commit: Full Crawl API implementation
Some checks failed
CI / Test (push) Has been cancelled
Deploy / Deploy to Staging (push) Has been cancelled
CI / Build & Push (push) Has been cancelled
Deploy / Deploy to Production (push) Has been cancelled

This commit is contained in:
2026-04-29 07:03:48 +00:00
commit 62994d4f3d
92 changed files with 6176 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
use serde_json::json;
#[tokio::test]
async fn test_health_check() {
// This is a placeholder for integration tests
// In a real setup, you would spawn the API server and make HTTP requests
assert!(true);
}
#[tokio::test]
async fn test_crawl_request_validation() {
let req = shared::models::CrawlRequest {
url: "https://example.com".to_string(),
options: shared::models::CrawlOptions::default(),
};
assert_eq!(req.url, "https://example.com");
}
#[tokio::test]
async fn test_api_response_format() {
let response = shared::api::ApiResponse::ok(json!({"test": true}));
assert!(response.success);
assert!(response.data.is_some());
assert!(response.error.is_none());
let error = shared::api::ApiResponse::<()>::err("Something went wrong");
assert!(!error.success);
assert!(error.error.is_some());
}