()
| 129 | |
| 130 | #[tokio::test] |
| 131 | async fn test_inmemorydrive_put_respects_acls() { |
| 132 | let mut drive = InMemoryDrive::default(); |
| 133 | drive.put("untouched", b"some content").await.unwrap(); |
| 134 | |
| 135 | drive.put("file", b"before").await.unwrap(); |
| 136 | drive.update_acls("file", &readers(&["r1"]), &FileAcls::default()).await.unwrap(); |
| 137 | |
| 138 | assert_eq!(b"before", drive.get("file").await.unwrap().as_slice()); |
| 139 | assert_eq!(readers(&["r1"]), drive.get_acls("file").await.unwrap()); |
| 140 | |
| 141 | drive.put("file", b"after").await.unwrap(); |
| 142 | |
| 143 | assert_eq!(b"after", drive.get("file").await.unwrap().as_slice()); |
| 144 | assert_eq!(readers(&["r1"]), drive.get_acls("file").await.unwrap()); |
| 145 | } |
| 146 | |
| 147 | #[tokio::test] |
| 148 | async fn test_inmemorydrive_get_update_acls() { |
nothing calls this directly
no test coverage detected