| 732 | #[test] |
| 733 | #[ignore = "Requires environment configuration and is expensive"] |
| 734 | fn test_patch_file_without_login() { |
| 735 | #[tokio::main] |
| 736 | async fn run(context: &mut TestContext) { |
| 737 | let username = context.get_username(1); |
| 738 | |
| 739 | context.do_login(1).await; |
| 740 | let (filename, _content) = context.random_file(); |
| 741 | |
| 742 | context.do_logout().await; |
| 743 | let err = context |
| 744 | .service |
| 745 | .patch_file_content(&username, &filename, b"foo".to_vec()) |
| 746 | .await |
| 747 | .unwrap_err(); |
| 748 | assert_eq!(io::ErrorKind::PermissionDenied, err.kind(), "{}", err); |
| 749 | assert!(format!("{}", err).contains("Not logged in")); |
| 750 | } |
| 751 | run(&mut TestContext::new_from_env()); |
| 752 | } |
| 753 | |
| 754 | #[test] |
| 755 | #[ignore = "Requires environment configuration and is expensive"] |