()
| 52 | |
| 53 | #[tokio::test] |
| 54 | async fn test_get_artifact() { |
| 55 | let artifact_data = b"hello world"; |
| 56 | let artifact_id = ARTIFACT_SERVICE.create(artifact_data.to_vec()).unwrap(); |
| 57 | |
| 58 | let response = CONTROLLER |
| 59 | .get_artifact(GetArtifactInput { |
| 60 | artifact_id: Uuid::from_bytes(artifact_id).to_string(), |
| 61 | }) |
| 62 | .await |
| 63 | .unwrap(); |
| 64 | |
| 65 | assert_eq!( |
| 66 | response.artifact.id, |
| 67 | Uuid::from_bytes(artifact_id).to_string() |
| 68 | ); |
| 69 | assert_eq!(response.artifact.size, artifact_data.len() as u64); |
| 70 | assert_eq!(response.artifact.artifact, artifact_data); |
| 71 | } |
| 72 | |
| 73 | #[tokio::test] |
| 74 | async fn test_get_artifact_invalid_id() { |
nothing calls this directly
no test coverage detected