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

Function newTestAPIRouter

controlplane/admin/api_test.go:215–220  ·  view source on GitHub ↗
(store apiStore)

Source from the content-addressed store, hash-verified

213 key := user.OrgID + "/" + user.Username
214 if _, ok := s.users[key]; ok {
215 return errors.New("duplicate user")
216 }
217 clone := *user
218 s.users[key] = &clone
219 return nil
220}
221
222func (s *fakeAPIStore) GetUser(orgID, username string) (*configstore.OrgUser, error) {
223 key := orgID + "/" + username

Calls 1

registerAPIWithStoreFunction · 0.85

Tested by

no test coverage detected