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

Function TestCreateUserAcceptsMaxVCPUs

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

Source from the content-addressed store, hash-verified

307 now := time.Now().UTC()
308 g.RevokedAt = &now
309 g.PasswordHash = ""
310 }
311 s.revokedGrants = append(s.revokedGrants, credentialID)
312 return nil
313 }
314 }
315 return configstore.ErrServiceCredentialNotFound
316}
317
318func (s *fakeAPIStore) GetManagedWarehouse(orgID string) (*configstore.ManagedWarehouse, error) {
319 warehouse, ok := s.warehouses[orgID]
320 if !ok {
321 return nil, gorm.ErrRecordNotFound
322 }
323 return copyWarehouse(warehouse), nil
324}
325
326func (s *fakeAPIStore) UpsertManagedWarehouse(orgID string, warehouse *configstore.ManagedWarehouse) (*configstore.ManagedWarehouse, bool, error) {
327 org, ok := s.orgs[orgID]
328 if !ok {
329 return nil, false, nil
330 }
331 clone := copyWarehouse(warehouse)
332 clone.OrgID = orgID
333 s.warehouses[orgID] = clone
334 org.Warehouse = copyWarehouse(clone)
335 return copyWarehouse(clone), true, nil
336}
337

Callers

nothing calls this directly

Calls 3

newFakeAPIStoreFunction · 0.85
newTestAPIRouterFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected