()
| 159 | |
| 160 | #[tokio::test] |
| 161 | async fn copy_csv_header_false() { |
| 162 | let srv = TestServer::start().await; |
| 163 | |
| 164 | // Use a schemaless collection so positional column names (col_0, col_1) |
| 165 | // are accepted without conflict with a declared schema. |
| 166 | srv.exec("CREATE COLLECTION copy_noheader_test") |
| 167 | .await |
| 168 | .expect("CREATE COLLECTION"); |
| 169 | |
| 170 | // Three rows, no header — columns become col_0, col_1 (positional names). |
| 171 | // Distinct first-column values ensure no key collision. |
| 172 | let csv = "alice,9.5\nbob,8.1\ncarol,7.7\n"; |
| 173 | let f = write_temp(csv, ".csv"); |
| 174 | let path = f.path().to_string_lossy().to_string(); |
| 175 | |
| 176 | srv.exec(&format!( |
| 177 | "COPY copy_noheader_test FROM '{path}' WITH (FORMAT csv, HEADER false)" |
| 178 | )) |
| 179 | .await |
| 180 | .expect("COPY CSV HEADER false"); |
| 181 | |
| 182 | assert_eq!(count_rows(&srv, "copy_noheader_test").await, 3); |
| 183 | } |
| 184 | |
| 185 | // ── test 7: path with .. rejected ──────────────────────────────────────────── |
| 186 |
nothing calls this directly
no test coverage detected