MCPcopy Create free account
hub / github.com/PostHog/duckgres / TestUpdateUserMaxVCPUsCanClearToZero

Function TestUpdateUserMaxVCPUsCanClearToZero

controlplane/admin/api_test.go:380–400  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

378}
379
380func newTestAPIRouter(store apiStore) *gin.Engine {
381 gin.SetMode(gin.TestMode)
382 r := gin.New()
383 registerAPIWithStore(r.Group("/api/v1"), store, nil, nil)
384 return r
385}
386
387// newTestAPIRouterWithFetcher is newTestAPIRouter plus a PeerFetcher, for
388// tests asserting the create/update/delete user reload + peer fan-out.
389func newTestAPIRouterWithFetcher(store apiStore, fetcher PeerFetcher) *gin.Engine {
390 gin.SetMode(gin.TestMode)
391 r := gin.New()
392 registerAPIWithStore(r.Group("/api/v1"), store, nil, fetcher)
393 return r
394}
395
396func seedOrgWithWarehouse(store *fakeAPIStore, name string) {
397 warehouse := &configstore.ManagedWarehouse{
398 OrgID: name,
399 DucklingName: name,
400 WarehouseDatabase: configstore.ManagedWarehouseDatabase{
401 Endpoint: fmt.Sprintf("%s.cluster.example", name),
402 Port: 5432,
403 },

Callers

nothing calls this directly

Calls 3

newFakeAPIStoreFunction · 0.85
newTestAPIRouterFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected