(t *testing.T)
| 1769 | |
| 1770 | func TestGetOrgOmitsMaxConnections(t *testing.T) { |
| 1771 | store := newFakeAPIStore() |
| 1772 | store.orgs["analytics"] = &configstore.Org{ |
| 1773 | Name: "analytics", |
| 1774 | } |
| 1775 | router := newTestAPIRouter(store) |
| 1776 | |
| 1777 | req := httptest.NewRequest(http.MethodGet, "/api/v1/orgs/analytics", nil) |
| 1778 | rec := httptest.NewRecorder() |
| 1779 | router.ServeHTTP(rec, req) |
| 1780 | |
| 1781 | if rec.Code != http.StatusOK { |
| 1782 | t.Fatalf("status = %d, want %d: %s", rec.Code, http.StatusOK, rec.Body.String()) |
| 1783 | } |
| 1784 | if bytes.Contains(rec.Body.Bytes(), []byte(`"max_connections"`)) { |
| 1785 | t.Fatalf("expected org response to omit max_connections, got %s", rec.Body.String()) |
| 1786 | } |
| 1787 | } |
| 1788 | |
| 1789 | func TestManagedWarehouseUpsertColumnsExcludeCreatedAt(t *testing.T) { |
| 1790 | columns := managedWarehouseUpsertColumns() |
| 1791 | |
| 1792 | if slices.Contains(columns, "created_at") { |
| 1793 | t.Fatal("expected created_at to be excluded from managed warehouse upserts") |
| 1794 | } |
| 1795 | if slices.Contains(columns, "org_id") { |
| 1796 | t.Fatal("expected org_id to be excluded from managed warehouse upserts") |
| 1797 | } |
| 1798 | if !slices.Contains(columns, "updated_at") { |
| 1799 | t.Fatal("expected updated_at to be included in managed warehouse upserts") |
nothing calls this directly
no test coverage detected