()
| 1097 | |
| 1098 | #[tokio::test] |
| 1099 | async fn checkout_409_dirty_yields_conflict() { |
| 1100 | let (server, backend) = server_and_backend().await; |
| 1101 | Mock::given(method("POST")) |
| 1102 | .and(path("/v1/repos/test/git/checkout")) |
| 1103 | .respond_with(ResponseTemplate::new(409).set_body_json(json!({ |
| 1104 | "error":{"code":"WORKING_TREE_DIRTY","message":"please stash first"} |
| 1105 | }))) |
| 1106 | .mount(&server) |
| 1107 | .await; |
| 1108 | |
| 1109 | let err = backend |
| 1110 | .checkout(WorkspaceGitCheckoutRequest { |
| 1111 | refspec: "main".into(), |
| 1112 | force: false, |
| 1113 | }) |
| 1114 | .await |
| 1115 | .unwrap_err(); |
| 1116 | let c = err.downcast_ref::<RemoteGitConflict>().unwrap(); |
| 1117 | assert_eq!(c.code, "WORKING_TREE_DIRTY"); |
| 1118 | } |
| 1119 | |
| 1120 | #[tokio::test] |
| 1121 | async fn diff_passes_target_through_and_surfaces_server_truncation() { |
nothing calls this directly
no test coverage detected