(t *testing.T)
| 444 | IdentityState: configstore.ManagedWarehouseStateReady, |
| 445 | SecretsState: configstore.ManagedWarehouseStateReady, |
| 446 | } |
| 447 | store.orgs[name] = &configstore.Org{ |
| 448 | Name: name, |
| 449 | Warehouse: copyWarehouse(warehouse), |
| 450 | } |
| 451 | store.warehouses[name] = warehouse |
| 452 | } |
| 453 | |
| 454 | func TestCreateUserIgnoresRemovedDefaultCatalogField(t *testing.T) { |
| 455 | // default_catalog was removed with Iceberg support. The users endpoints do |
| 456 | // not reject unknown JSON fields, so a legacy body carrying it still |
| 457 | // creates the user — the field is just silently ignored. |
| 458 | store := newFakeAPIStore() |
| 459 | router := newTestAPIRouter(store) |
| 460 | |
| 461 | body := []byte(`{ |
| 462 | "org_id": "analytics", |
| 463 | "username": "reader", |
| 464 | "password": "secret", |
| 465 | "default_catalog": "iceberg" |
| 466 | }`) |
| 467 | req := httptest.NewRequest(http.MethodPost, "/api/v1/users", bytes.NewReader(body)) |
| 468 | req.Header.Set("Content-Type", "application/json") |
| 469 | rec := httptest.NewRecorder() |
nothing calls this directly
no test coverage detected