()
| 132 | |
| 133 | #[tokio::test] |
| 134 | async fn copy_to_csv_no_header() { |
| 135 | let srv = TestServer::start().await; |
| 136 | |
| 137 | seed_collection(&srv, "copy_to_csv_nohdr").await; |
| 138 | |
| 139 | let (_dir, out_path) = temp_output_path(".csv"); |
| 140 | srv.exec(&format!( |
| 141 | "COPY copy_to_csv_nohdr TO '{out_path}' WITH (FORMAT csv, HEADER false)" |
| 142 | )) |
| 143 | .await |
| 144 | .expect("COPY TO CSV without header"); |
| 145 | |
| 146 | let content = std::fs::read_to_string(&out_path).expect("read output file"); |
| 147 | let lines: Vec<&str> = content.lines().collect(); |
| 148 | // No header: should have exactly 3 rows. |
| 149 | assert_eq!(lines.len(), 3, "expected 3 data rows, no header"); |
| 150 | } |
| 151 | |
| 152 | // ── test 5: COPY (SELECT ...) TO query-form ────────────────────────────────── |
| 153 |
nothing calls this directly
no test coverage detected